/* ==========================================================================
   PDF Tool Promo Video Player & Studio Styling
   Luxury Dark Mode & Glassmorphic UI with Full HD 16:9 Cinema Container
   ========================================================================== */

:root {
  --bg-primary: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-elevated: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-primary: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.5);
  --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-active: rgba(59, 130, 246, 0.6);
  --success: #10b981;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-cinema: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 40px rgba(59, 130, 246, 0.15);
}

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

body {
  font-family: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  direction: rtl;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Background Ambient Glows */
.ambient-glow-1 {
  position: fixed;
  top: -10%;
  right: 15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, rgba(0, 0, 0, 0) 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.ambient-glow-2 {
  position: fixed;
  bottom: 5%;
  left: 10%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

/* Top Navigation Header */
.promo-header {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.promo-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #fff;
}

.brand-icon-box {
  width: 42px;
  height: 42px;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.brand-meta h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-meta p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.badge-tag {
  padding: 0.35rem 0.8rem;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid var(--border-active);
  color: #60a5fa;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-launch-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-launch-tool:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

/* Main Studio Layout */
.studio-main {
  position: relative;
  z-index: 5;
  flex: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Video Stage Area */
.video-cinema-card {
  position: relative;
  background: #000;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  box-shadow: var(--shadow-cinema);
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s ease;
}

.video-cinema-card:focus-within,
.video-cinema-card.playing {
  border-color: var(--border-active);
}

/* 16:9 Aspect Ratio Canvas Stage */
.canvas-stage-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #050811;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#promo-canvas {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* Floating Big Play Overlay */
.stage-overlay-play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(11, 15, 25, 0.7);
  backdrop-filter: blur(8px);
  cursor: pointer;
  z-index: 20;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.stage-overlay-play.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.big-play-btn {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.5rem;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.4);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stage-overlay-play:hover .big-play-btn {
  transform: scale(1.12);
}

.play-prompt-text {
  margin-top: 1.25rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.play-prompt-sub {
  margin-top: 0.3rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Floating Subtitle / Narration Bar */
.narration-capsule {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  padding: 0.6rem 1.6rem;
  max-width: 85%;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  z-index: 15;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.narration-badge {
  background: var(--accent-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.narration-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.4;
}

.narration-text strong {
  color: #60a5fa;
  font-weight: 700;
}

/* Custom Bottom Player Control Bar */
.player-controls-bar {
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 25;
}

/* Timeline & Scrubber */
.timeline-wrapper {
  position: relative;
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: height 0.15s ease;
}

.timeline-wrapper:hover {
  height: 14px;
}

.timeline-progress-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 9999px;
  width: 0%;
  position: relative;
}

.timeline-scrub-head {
  position: absolute;
  top: 50%;
  transform: translate(50%, -50%);
  width: 16px;
  height: 16px;
  background: #ffffff;
  border: 2px solid var(--accent-primary);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.timeline-wrapper:hover .timeline-scrub-head {
  opacity: 1;
}

.timeline-scene-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
}

.scene-marker {
  width: 3px;
  height: 100%;
  background: rgba(255, 255, 255, 0.25);
  position: absolute;
  transform: translateX(-50%);
}

/* Control Buttons Row */
.controls-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.left-ctrls, .right-ctrls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ctrl-btn {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.15rem;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, color 0.2s;
}

.ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #60a5fa;
}

.ctrl-btn:active {
  transform: scale(0.94);
}

.ctrl-btn-primary {
  width: 44px;
  height: 44px;
  background: var(--accent-primary);
  color: #fff;
  border-radius: 50%;
  font-size: 1.3rem;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.ctrl-btn-primary:hover {
  background: #2563eb;
  color: #fff;
  transform: scale(1.06);
}

.time-display {
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  margin-right: 0.5rem;
}

/* Sound & Ambient Controls */
.music-ctrl-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.music-vol-slider {
  width: 70px;
  height: 4px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.speed-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  cursor: pointer;
  direction: ltr;
}

.btn-export-video {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-export-video:hover {
  background: rgba(16, 185, 129, 0.28);
  border-color: #34d399;
  transform: translateY(-1px);
}

.btn-export-video.recording {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #f87171;
  animation: pulse-border 1.5s infinite;
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Scene Quick Jump Tabs */
.scene-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.scene-step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.scene-step-card:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-active);
  transform: translateY(-2px);
}

.scene-step-card.active {
  background: rgba(59, 130, 246, 0.12);
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.scene-card-num {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.scene-step-card.active .scene-card-num {
  color: #60a5fa;
}

.scene-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Info & Music Selection Section */
.studio-info-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

@media (max-width: 860px) {
  .studio-info-row {
    grid-template-columns: 1fr;
  }
}

.info-box-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-box-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.feature-bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.feature-bullet-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.feature-bullet-list li strong {
  color: #e2e8f0;
}

.check-icon {
  color: #10b981;
  font-weight: bold;
}

/* Music preset buttons */
.music-presets-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.music-track-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: right;
}

.music-track-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.music-track-btn.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent-primary);
  color: #93c5fd;
  font-weight: 600;
}

.music-track-btn .track-meta {
  display: flex;
  flex-direction: column;
}

.music-track-btn .track-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Toast Notifications */
.promo-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #1e293b;
  border: 1px solid var(--border-active);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  animation: slide-toast 0.3s ease;
}

@keyframes slide-toast {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
