/* ==========================================================================
   RODAN.FUN — AI VIDEO SCRIPT GENERATOR STYLES
   OBSIDIAN & ELECTRIC VIOLET / NEON CRIMSON
   • High-Retention Short-Form & Long-Form Video Scripting Studio
   • Visual Scene Cues & Voiceover Directives
   • Built-in Fullscreen Teleprompter Mode
   ========================================================================== */

/* DARK THEME SCOPED OVERRIDES */
body.script-page.dark-theme {
  --bg-canvas: #030206;
  --bg-card-glass: linear-gradient(165deg, rgba(17, 13, 24, 0.94) 0%, rgba(10, 7, 15, 0.97) 50%, rgba(5, 3, 8, 0.99) 100%);
  --bg-nav-glass: rgba(10, 6, 14, 0.92);
  --bg-pill: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-top: rgba(255, 255, 255, 0.28);
  --glass-border-hover: rgba(168, 85, 247, 0.45);
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.82);
  --text-muted: rgba(255, 255, 255, 0.52);
  --accent-violet: #8B5CF6;
  --accent-fuchsia: #EC4899;
  --accent-dot: #C084FC;
  background-color: #030206;
}

/* CINEMATIC ATMOSPHERIC DARK VIGNETTE */
body.script-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, rgba(139, 92, 246, 0.08) 0%, rgba(3, 2, 6, 0.85) 70%, #030206 100%);
  pointer-events: none;
  z-index: 1;
}

/* SCRIPT GENERATOR MAIN WRAPPER */
.script-wrapper {
  max-width: 1040px;
  margin: 0 auto;
  padding: 108px 24px 70px;
  position: relative;
  z-index: 2;
}

/* HERO TITLE SECTION */
.script-hero {
  text-align: center;
  margin-bottom: 36px;
}

.script-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18) 0%, rgba(236, 72, 153, 0.18) 100%);
  border: 1px solid rgba(192, 132, 252, 0.35);
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #E9D5FF;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.25);
}

.script-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #C084FC;
  box-shadow: 0 0 10px #C084FC;
  animation: pulse 2s infinite ease-in-out;
}

.script-hero-title {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: #FFFFFF;
  margin: 0 0 14px;
}

.script-gradient-text {
  background: linear-gradient(135deg, #FFFFFF 20%, #C084FC 60%, #F472B6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.script-hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.55;
  font-weight: 500;
}

/* STUDIO GLASS CARD CONTAINER */
.script-card-glass {
  background: var(--bg-card-glass);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-border-top);
  border-radius: 26px;
  padding: 36px 36px 40px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  position: relative;
  overflow: hidden;
  margin-bottom: 36px;
}

/* FORM GROUPS */
.script-form-group {
  margin-bottom: 26px;
}

.script-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.script-label {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #E2E8F0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.script-label-hint {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* TOPIC TEXTAREA */
.script-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 16px 18px;
  font-family: inherit;
  font-size: 0.98rem;
  color: #FFFFFF;
  line-height: 1.5;
  resize: vertical;
  min-height: 105px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.script-textarea:focus {
  outline: none;
  border-color: #A855F7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.25);
  background: rgba(0, 0, 0, 0.6);
}

.script-textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

/* QUICK IDEA PILLS STRIP */
.prompt-chips-wrapper {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.prompt-chips-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

.prompt-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #D8B4FE;
  cursor: pointer;
  transition: all 0.2s ease;
}

.prompt-chip:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: #C084FC;
  color: #FFFFFF;
  transform: translateY(-1px);
}

/* CHIP SELECTORS (PLATFORM, TONE, DURATION) */
.chip-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.select-chip-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px 14px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: all 0.22s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.select-chip-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
}

.select-chip-btn.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.22) 0%, rgba(236, 72, 153, 0.22) 100%);
  border-color: #C084FC;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.3);
}

.chip-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chip-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.select-chip-btn.active .chip-title {
  color: #F5D0FE;
}

.select-chip-btn.active .chip-desc {
  color: #E9D5FF;
}

/* GENERATE BUTTON */
.script-generate-btn {
  width: 100%;
  background: linear-gradient(135deg, #8B5CF6 0%, #D946EF 50%, #EC4899 100%);
  border: none;
  border-radius: 18px;
  padding: 18px 24px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #FFFFFF;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 10px;
}

.script-generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(168, 85, 247, 0.6);
  filter: brightness(1.08);
}

.script-generate-btn:active {
  transform: translateY(1px);
}

/* OUTPUT RESULTS CARD */
.script-output-section {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.script-output-section.active {
  display: block;
}

/* METRICS HUD */
.script-hud-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 14px 18px;
  margin-bottom: 24px;
}

.hud-stat {
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.hud-stat:last-child {
  border-right: none;
}

.hud-value {
  font-size: 1.25rem;
  font-weight: 900;
  color: #A855F7;
  letter-spacing: -0.02em;
}

.hud-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.ai-live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: pulseLiveDot 2s infinite ease-in-out;
}

@keyframes pulseLiveDot {
  0%, 100% { transform: scale(0.9); opacity: 0.75; box-shadow: 0 0 4px #10B981; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #34D399; }
}

/* HOOK VARIATIONS SELECTOR */
.hook-bank-box {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.28);
  border-radius: 18px;
  padding: 16px 20px;
  margin-bottom: 26px;
}

.hook-bank-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #E9D5FF;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hook-option {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: 0.88rem;
  color: #FFFFFF;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.hook-option:last-child {
  margin-bottom: 0;
}

.hook-option:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #C084FC;
}

.hook-option.selected {
  background: rgba(168, 85, 247, 0.25);
  border-color: #C084FC;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}

.hook-tag {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: #A855F7;
  color: #FFFFFF;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* SCRIPT TIMELINE BEATS */
.script-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.script-beat-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px 20px;
  position: relative;
  transition: border-color 0.2s ease;
}

.script-beat-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

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

.beat-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 8px;
}

.tag-hook { background: rgba(236, 72, 153, 0.2); color: #F472B6; border: 1px solid rgba(236, 72, 153, 0.3); }
.tag-agitation { background: rgba(245, 158, 11, 0.2); color: #FBBF24; border: 1px solid rgba(245, 158, 11, 0.3); }
.tag-solution { background: rgba(16, 185, 129, 0.2); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.3); }
.tag-twist { background: rgba(139, 92, 246, 0.2); color: #C084FC; border: 1px solid rgba(139, 92, 246, 0.3); }
.tag-cta { background: rgba(6, 182, 212, 0.2); color: #22D3EE; border: 1px solid rgba(6, 182, 212, 0.3); }

.beat-time {
  font-family: monospace;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
}

.beat-visual-cue {
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid #8B5CF6;
  border-radius: 4px 10px 10px 4px;
  padding: 8px 12px;
  font-size: 0.82rem;
  color: #D8B4FE;
  margin-bottom: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.beat-audio-text {
  font-size: 1.02rem;
  line-height: 1.55;
  color: #FFFFFF;
  font-weight: 600;
}

/* CAPTION & HASHTAGS */
.script-caption-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 16px 20px;
  margin-bottom: 26px;
}

.caption-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #E2E8F0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.caption-body {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.hashtag-cluster {
  font-size: 0.82rem;
  color: #A855F7;
  font-weight: 600;
  word-break: break-all;
}

/* SCRIPT ACTION TOOLBAR */
.script-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.action-btn-pill {
  flex: 1;
  min-width: 140px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 13px 18px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.action-btn-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.action-btn-prompter {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3) 0%, rgba(236, 72, 153, 0.3) 100%);
  border-color: #C084FC;
  color: #F5D0FE;
}

.action-btn-prompter:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.45) 0%, rgba(236, 72, 153, 0.45) 100%);
  color: #FFFFFF;
}

/* TELEPROMPTER OVERLAY MODAL */
.teleprompter-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: #020104;
  z-index: 1000;
  flex-direction: column;
  color: #FFFFFF;
}

.teleprompter-modal.active {
  display: flex;
}

.prompter-top-bar {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 7, 15, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 10;
}

.prompter-title {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #C084FC;
}

.prompter-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.prompter-stage {
  flex: 1;
  overflow-y: auto;
  padding: 60px 24px 200px;
  display: flex;
  justify-content: center;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.prompter-stage::-webkit-scrollbar {
  display: none;
}

.prompter-text-container {
  max-width: 820px;
  width: 100%;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.6;
  text-align: center;
  color: #FFFFFF;
  transition: transform 0.2s ease, font-size 0.2s ease;
}

.prompter-text-container.mirrored {
  transform: scaleX(-1);
}

.prompter-cue-line {
  color: #A855F7;
  font-size: 0.6em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 30px 0 10px;
  display: block;
}

/* PROMPTER CONTROLS BAR (STICKY BOTTOM) */
.prompter-controls-bar {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 10, 22, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.9);
  z-index: 20;
}

.prompter-ctrl-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.prompter-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.prompter-ctrl-btn.active {
  background: #A855F7;
  border-color: #C084FC;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
  .script-wrapper {
    padding-top: 92px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .script-hero-title {
    font-size: 2.2rem;
  }

  .script-card-glass {
    padding: 24px 18px;
    border-radius: 20px;
  }

  .chip-group-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .script-hud-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 8px;
  }

  .hud-stat:nth-child(2) {
    border-right: none;
  }

  .prompter-text-container {
    font-size: 1.6rem;
  }

  .prompter-controls-bar {
    width: 92%;
    justify-content: center;
    gap: 8px;
  }

  .prompter-ctrl-btn {
    padding: 6px 10px;
    font-size: 0.74rem;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
