:root {
  --bg-deep-dark: #07070E;
  --bg-card-glass: rgba(16, 19, 34, 0.94);
  --bg-card-hover: rgba(22, 27, 49, 0.98);
  --neon-cyan: #00FFFF;
  --neon-magenta: #FF00FF;
  --neon-gold: #FFD700;
  --neon-green: #39FF14;
  --neon-red: #FF3366;
  --text-main: #FFFFFF;
  --text-muted: #8E9BAE;
  --border-glass: rgba(0, 255, 255, 0.25);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-deep-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(0, 255, 255, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(255, 0, 255, 0.04) 0%, transparent 40%);
}

/* Header & Status Bar */
header.studio-header {
  padding: 14px 18px;
  background: rgba(7, 7, 14, 0.95);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-badge .wolf-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--neon-cyan);
}

.brand-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
  text-transform: uppercase;
}

.brand-title span {
  color: var(--neon-cyan);
}

.network-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: rgba(57, 255, 20, 0.12);
  color: var(--neon-green);
  border: 1px solid rgba(57, 255, 20, 0.4);
  transition: all 0.3s ease;
}

.network-pill.offline {
  background: rgba(255, 51, 102, 0.15);
  color: var(--neon-red);
  border-color: rgba(255, 51, 102, 0.5);
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Main Container */
main.studio-main {
  flex: 1;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Pending Banner */
.pending-banner {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(16, 19, 34, 0.9));
  border: 1px solid var(--neon-gold);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pending-banner-text {
  font-size: 13px;
  color: #FFE680;
}

.pending-banner-btn {
  background: var(--neon-gold);
  color: #000;
  border: none;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
}

/* Card General */
.studio-card {
  background: var(--bg-card-glass);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Angle Selector */
.angle-selector-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.angle-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.angle-pill-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 10px 6px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.angle-pill-btn.active {
  background: rgba(0, 255, 255, 0.16);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.3);
}

/* Viewfinder */
.viewfinder-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

video#liveVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

/* Rule of Thirds Grid Overlay */
.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(to right, transparent 33.1%, rgba(255,255,255,0.08) 33.3%, transparent 33.5%, transparent 66.4%, rgba(255,255,255,0.08) 66.6%, transparent 66.8%),
    linear-gradient(to bottom, transparent 33.1%, rgba(255,255,255,0.08) 33.3%, transparent 33.5%, transparent 66.4%, rgba(255,255,255,0.08) 66.6%, transparent 66.8%);
}

.rec-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 51, 102, 0.85);
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.5px;
  opacity: 0;
  transition: opacity 0.3s;
}

.rec-badge.recording {
  opacity: 1;
  animation: pulse-red 1s infinite;
}

.timer-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
}

/* Control Buttons */
.controls-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

.btn-primary {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: none;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.btn-record-start {
  background: linear-gradient(135deg, #FF3366, #FF0055);
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 51, 102, 0.4);
}

.btn-record-stop {
  background: linear-gradient(135deg, var(--neon-cyan), #00A3FF);
  color: #07070E;
  box-shadow: 0 4px 20px rgba(0, 255, 255, 0.4);
}

.btn-file-select {
  background: rgba(255, 255, 255, 0.06);
  color: var(--neon-cyan);
  border: 1px solid var(--border-glass);
  font-size: 13px;
  font-weight: 700;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Progress & Telemetry Card */
.progress-card {
  display: none;
}

.progress-card.active {
  display: block;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.progress-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--neon-cyan);
}

.progress-percent {
  font-size: 18px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--neon-green);
}

.progress-bar-track {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 12px;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-green));
  border-radius: 6px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.telemetry-item {
  display: flex;
  flex-direction: column;
}

.telemetry-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.telemetry-val {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #fff;
  margin-top: 2px;
}

/* Drive Success Box */
.drive-success-box {
  display: none;
  background: rgba(57, 255, 20, 0.12);
  border: 1px solid var(--neon-green);
  border-radius: 12px;
  padding: 14px;
  margin-top: 12px;
}

.drive-success-box.show {
  display: block;
}

.drive-success-title {
  color: var(--neon-green);
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.drive-link-btn {
  display: inline-block;
  background: var(--neon-green);
  color: #07070E;
  text-decoration: none;
  font-weight: 800;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 8px;
  margin-top: 8px;
}

/* Terminal Console */
.console-card {
  margin-top: auto;
}

.console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  margin-bottom: 8px;
}

.console-header span {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.console-body {
  background: #030307;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
  height: 120px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: #9cdcfe;
}

.log-entry {
  margin-bottom: 4px;
}

.log-entry.error { color: var(--neon-red); }
.log-entry.success { color: var(--neon-green); }
.log-entry.warn { color: var(--neon-gold); }
.log-entry.info { color: var(--neon-cyan); }
