/* 3D PITCH STUDIO STYLES */
:root {
  --bg-dark: #070a0f;
  --panel-bg: rgba(12, 17, 29, 0.86);
  --panel-border: rgba(0, 230, 153, 0.2);
  --accent: #00e699;
  --accent-glow: rgba(0, 230, 153, 0.35);
  --gold: #f59e0b;
  --blue: #38bdf8;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body {
  background-color: var(--bg-dark);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

#viewport {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* TOP HEADER */
.top-header {
  position: absolute;
  top: 16px;
  left: 20px;
  right: 20px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(16px);
  padding: 8px 18px;
  border-radius: 999px;
  pointer-events: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.brand-icon {
  font-size: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 230, 153, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 230, 153, 0.3);
}

.brand-badge h1 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
}

.brand-badge h1 span {
  background: linear-gradient(135deg, #00e699, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.subtitle {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.status-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
  background: rgba(0, 230, 153, 0.12);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.header-actions {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.btn {
  background: var(--panel-bg);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(12px);
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.btn-primary {
  background: linear-gradient(135deg, #00e699, #059669);
  color: #042f2e;
  border: none;
  font-weight: 700;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #10b981, #047857);
  color: #fff;
  box-shadow: 0 0 20px rgba(0, 230, 153, 0.5);
}

.btn-rec.recording {
  background: #ef4444;
  color: #fff;
  border-color: #f87171;
  animation: pulse-red 1.2s infinite;
}

@keyframes pulse-red {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(0.98); }
}

/* CAMERA PRESETS */
.cam-presets {
  position: absolute;
  bottom: 95px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 8px;
  background: rgba(10, 15, 26, 0.7);
  padding: 4px 8px;
  border-radius: 12px;
  border: 1px solid rgba(0, 230, 153, 0.2);
  backdrop-filter: blur(12px);
}

.cam-btn {
  background: rgba(13, 19, 32, 0.75);
  border: 1px solid rgba(255,255,255,0.15);
  color: #cbd5e1;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s;
}

.cam-btn:hover, .cam-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

/* LEFT PANEL */
.left-panel {
  position: absolute;
  top: 80px;
  left: 20px;
  bottom: 115px;
  width: 330px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 16px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  overflow: visible;
}

.left-panel.collapsed {
  transform: translateX(calc(-100% - 24px));
}

.panel-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}

.panel-desc {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.control-label {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.control-label span.val {
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
}

input[type="range"] {
  width: 100%;
  height: 5px;
  border-radius: 5px;
  background: rgba(255,255,255,0.1);
  outline: none;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent);
}

.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.03);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.05);
}

.switch-row label {
  font-size: 12px;
  font-weight: 500;
  color: #e2e8f0;
}

.emotion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.emo-chip {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: #cbd5e1;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.emo-chip:hover {
  background: rgba(0, 230, 153, 0.1);
  color: #fff;
  border-color: rgba(0, 230, 153, 0.3);
}

.emo-chip.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(0, 230, 153, 0.2));
  border-color: var(--gold);
  color: #fff;
  font-weight: 600;
}

.vocal-meter-wrap {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 24px;
  background: rgba(0,0,0,0.3);
  padding: 4px 8px;
  border-radius: 8px;
}

.meter-bar {
  flex: 1;
  height: 4px;
  background: rgba(0, 230, 153, 0.3);
  border-radius: 2px;
  transition: height 0.05s ease;
}

/* RIGHT PANEL */
.right-panel {
  position: absolute;
  top: 80px;
  right: 20px;
  bottom: 115px;
  width: 380px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 16px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  overflow: visible;
}

.right-panel.collapsed {
  transform: translateX(calc(100% + 24px));
}

.slide-preview {
  width: 100%;
  height: 195px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  background: #000;
  position: relative;
}

.slide-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: rgba(8, 11, 17, 0.85);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(6px);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
}

.teleprompter {
  flex: 1;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 14px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.65;
  color: #cbd5e1;
}

.teleprompter strong {
  color: var(--accent);
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  letter-spacing: 0.5px;
}

/* BOTTOM BAR */
.bottom-bar {
  position: absolute;
  bottom: 18px;
  left: 20px;
  right: 20px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(24px);
  border-radius: 20px;
  padding: 12px 24px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.7);
}

.chip-scroll-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  border-radius: 8px;
  width: 28px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.chip-scroll-btn:hover {
  background: rgba(0, 230, 153, 0.25);
  color: #fff;
  border-color: var(--accent);
}

.scenes-selector {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-behavior: smooth;
}

.scene-chip {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.scene-chip:hover {
  background: rgba(0, 230, 153, 0.1);
  color: #fff;
  border-color: rgba(0, 230, 153, 0.3);
}

.scene-chip.active {
  background: linear-gradient(135deg, rgba(0, 230, 153, 0.22), rgba(56, 189, 248, 0.22));
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(0, 230, 153, 0.25);
}

.scene-chip.star {
  border-color: rgba(245, 158, 11, 0.4);
  color: #fef08a;
}

.audio-playback-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.time-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  min-width: 90px;
}

/* =========================================================================
   PANEL INNER SCROLL & COLLAPSIBLE TABS
   ========================================================================= */
.panel-inner-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-right: 4px;
}

.panel-inner-scroll::-webkit-scrollbar {
  width: 5px;
}

.panel-inner-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 230, 153, 0.3);
  border-radius: 4px;
}

.panel-inner-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.panel-toggle-tab {
  position: absolute;
  top: 14px;
  width: 32px;
  height: 48px;
  background: rgba(13, 19, 32, 0.95);
  border: 1px solid var(--panel-border);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(14px);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.panel-toggle-tab:hover {
  background: rgba(0, 230, 153, 0.25);
  color: #fff;
  border-color: var(--accent);
}

.panel-toggle-tab.left-tab {
  right: -32px;
  border-left: none;
  border-radius: 0 10px 10px 0;
}

.panel-toggle-tab.right-tab {
  left: -32px;
  border-right: none;
  border-radius: 10px 0 0 10px;
}

/* =========================================================================
   RESPONSIVE LAYOUTS: SMART TV, LAPTOP, TABLET & MOBILE
   ========================================================================= */

/* 1. TABLET (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .left-panel {
    width: 280px;
    left: 12px;
    top: 75px;
    bottom: 110px;
    padding: 12px;
  }
  .right-panel {
    width: 300px;
    right: 12px;
    top: 75px;
    bottom: 110px;
    padding: 12px;
  }
  .slide-preview {
    height: 160px;
  }
  .bottom-bar {
    left: 12px;
    right: 12px;
    padding: 10px 16px;
    gap: 12px;
  }
  .cam-presets {
    bottom: 85px;
  }
}

/* 2. MOBILE (<= 768px) */
@media (max-width: 768px) {
  .top-bar {
    height: 58px;
    padding: 0 12px;
  }
  .brand-tag {
    display: none;
  }
  .header-actions {
    gap: 6px;
  }
  .header-actions .action-btn {
    padding: 6px 10px;
    font-size: 11px;
  }
  .cam-presets {
    bottom: 128px;
    width: 92%;
    justify-content: center;
    padding: 3px 6px;
    gap: 4px;
  }
  .cam-btn {
    padding: 5px 8px;
    font-size: 10px;
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .left-panel {
    width: calc(100vw - 44px);
    max-width: 340px;
    left: 12px;
    top: 66px;
    bottom: 140px;
    padding: 14px;
  }
  .left-panel.collapsed {
    transform: translateX(calc(-100% - 16px));
  }
  .right-panel {
    width: calc(100vw - 44px);
    max-width: 340px;
    right: 12px;
    top: 66px;
    bottom: 140px;
    padding: 14px;
  }
  .right-panel.collapsed {
    transform: translateX(calc(100% + 16px));
  }
  .slide-preview {
    height: 140px;
  }
  .bottom-bar {
    bottom: 8px;
    left: 8px;
    right: 8px;
    padding: 8px 12px;
    flex-direction: column;
    gap: 8px;
    border-radius: 14px;
  }
  .audio-playback-controls {
    width: 100%;
    justify-content: space-between;
  }
  .audio-playback-controls .btn {
    flex: 1;
    text-align: center;
    justify-content: center;
    padding: 8px 14px;
    font-size: 12px;
  }
  .time-display {
    min-width: 75px;
    font-size: 12px;
    text-align: right;
  }
  .scene-chip {
    padding: 6px 10px;
    font-size: 11px;
  }
}

/* 3. SMART TV / 4K DISPAYS (>= 2000px) */
@media (min-width: 2000px) {
  .top-bar {
    height: 85px;
    padding: 0 40px;
  }
  .brand-title {
    font-size: 24px;
  }
  .brand-tag {
    font-size: 13px;
    padding: 5px 12px;
  }
  .action-btn {
    font-size: 15px;
    padding: 12px 22px;
    border-radius: 12px;
  }
  .left-panel {
    width: 440px;
    top: 105px;
    bottom: 140px;
    left: 40px;
    padding: 24px;
    border-radius: 24px;
  }
  .right-panel {
    width: 480px;
    top: 105px;
    bottom: 140px;
    right: 40px;
    padding: 24px;
    border-radius: 24px;
  }
  .panel-section-title {
    font-size: 15px;
  }
  .panel-desc {
    font-size: 13px;
  }
  .control-label {
    font-size: 14px;
  }
  .slide-preview {
    height: 250px;
  }
  .teleprompter {
    font-size: 17px;
    line-height: 1.8;
  }
  .bottom-bar {
    bottom: 24px;
    left: 40px;
    right: 40px;
    padding: 18px 36px;
    border-radius: 26px;
  }
  .scene-chip {
    font-size: 15px;
    padding: 12px 20px;
  }
  .btn-primary {
    font-size: 16px;
    padding: 12px 24px;
  }
  .time-display {
    font-size: 17px;
  }
  .cam-presets {
    bottom: 115px;
    padding: 8px 16px;
    border-radius: 16px;
  }
  .cam-btn {
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 12px;
  }
}


/* =========================================================================
   PANEL HEADER BAR & FLOATING DOCK TABS
   ========================================================================= */
.panel-header-bar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding-bottom: 10px !important;
  margin-bottom: 8px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}
.panel-header-title {
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  color: #00e699 !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.panel-collapse-btn {
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(56, 189, 248, 0.5) !important;
  color: #38bdf8 !important;
  padding: 5px 12px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}
.panel-collapse-btn:hover {
  background: rgba(56, 189, 248, 0.25) !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4) !important;
}

.floating-dock-tab {
  position: fixed !important;
  top: 90px !important;
  z-index: 1000 !important;
  background: rgba(11, 19, 36, 0.95) !important;
  border: 1px solid #00e699 !important;
  color: #00e699 !important;
  padding: 10px 14px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  box-shadow: 0 8px 30px rgba(0, 230, 153, 0.4) !important;
  backdrop-filter: blur(16px) !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.floating-dock-tab:hover {
  background: #00e699 !important;
  color: #022c22 !important;
  box-shadow: 0 8px 35px rgba(0, 230, 153, 0.7) !important;
  transform: scale(1.05) !important;
}
.floating-dock-tab.dock-left {
  left: 0 !important;
  border-left: none !important;
  border-radius: 0 12px 12px 0 !important;
}
.floating-dock-tab.dock-right {
  right: 0 !important;
  border-right: none !important;
  border-radius: 12px 0 0 12px !important;
}
