:root {
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-script: 'Courier Prime', monospace;
  --primary-color: #3b82f6; /* A more tech/modern blue */
  --primary-hover: #2563eb;
  --bg-dark: #0f172a; /* Slate 900 */
  --bg-darker: #020617; /* Slate 950 */
  --text-light: #f8fafc;
  --text-muted-dark: #94a3b8;
}

[data-bs-theme="dark"] {
  --bs-body-bg: var(--bg-dark);
  --bs-body-color: var(--text-light);
  --bs-secondary-color: var(--text-muted-dark);
  --bs-border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] {
  --bs-body-bg: #ffffff;
  --bs-body-color: #1e293b;
  --bs-secondary-color: #64748b;
  --bs-border-color: rgba(0, 0, 0, 0.1);
}

body {
  font-family: var(--font-body);
  transition: background-color 0.3s ease, color 0.3s ease;
  padding-top: 120px; /* Prevent navbar overlap */
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
  font-family: var(--font-heading);
}

/* Typography Enhancements */
.display-1, .display-2, .display-3, .display-4 {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.script-font {
  font-family: var(--font-script);
}

.tracking-tight {
  letter-spacing: -0.02em;
}

/* Navigation */
.navbar-blur {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: rgba(var(--bs-body-bg-rgb), 0.8);
  border-bottom: 1px solid var(--bs-border-color);
  padding-top: 1rem;
  padding-bottom: 1rem;
}

[data-bs-theme="dark"] .navbar-blur {
  background-color: rgba(15, 23, 42, 0.8);
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
}

.logo-highlight {
  position: relative;
  color: var(--text-light);
  display: inline-block;
}

[data-bs-theme="light"] .logo-highlight {
  color: var(--bs-body-color);
}

.logo-highlight::before {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: logoFade 3s ease-in-out infinite;
}

@keyframes logoFade {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* Hero Section */
.hero-section {
  padding-top: 80px;
  padding-bottom: 120px;
  position: relative;
  overflow: hidden;
}

.hero-bg-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background: linear-gradient(-45deg, #0f172a, #4338ca, #be185d, #b45309, #059669);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  opacity: 0.8;
}

[data-bs-theme="light"] .hero-bg-accent {
  background: linear-gradient(-45deg, #eff6ff, #c7d2fe, #fbcfe8, #fcd34d);
  background-size: 400% 400%;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Film Strip Visuals */
.film-strip-border-top {
  background-image: linear-gradient(to right, transparent 50%, currentColor 50%);
  background-size: 20px 100%;
  height: 4px;
  opacity: 0.2;
}

/* Cards & Features */
.feature-card {
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  border-radius: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
}

[data-bs-theme="dark"] .feature-card {
  background: rgba(255, 255, 255, 0.03);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.feature-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Script Preview Element */
.script-preview {
  font-family: var(--font-script);
  background: #fdfbf7;
  color: #1a1a1a;
  padding: 3rem;
  border-radius: 4px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2), 0 0 0 1px #e5e5e5;
  border-left: none; 
  font-size: 1rem;
  line-height: 1.5; /* Improved line height */
  position: relative;
  transform: rotate(-2deg);
  max-width: 500px;
  margin: 0 auto;
}

/* Holes for script binding effect */
.script-preview::after {
  content: '';
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  height: 90%;
  width: 10px;
  background-image: radial-gradient(circle, #d4d4d4 3px, transparent 4px);
  background-size: 100% 40px; 
  background-repeat: repeat-y;
}

.script-preview::before {
  content: 'DRAFT 1.0';
  position: absolute;
  top: 15px;
  right: 20px;
  color: #a0a0a0;
  font-family: var(--font-script);
  font-size: 0.8rem;
  letter-spacing: 1px;
}

[data-bs-theme="dark"] .script-preview {
  filter: brightness(0.95);
}

.scene-heading {
  text-transform: uppercase;
  font-weight: bold;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em; /* Better spacing */
}

.action {
  margin-bottom: 1.5rem;
}

.character-name {
  text-align: center;
  margin-top: 1.5rem;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  padding-left: 0; /* Centered in modern scripts usually, but formatted via text-align */
}

.dialogue {
  margin: 0 15%;
  margin-bottom: 1.5rem;
}

.parenthetical {
  margin: 0 20%;
  margin-bottom: 0.2rem;
  font-style: normal;
  text-align: center; /* Usually centered under character */
}

/* Typing Animation */
.typewriter {
  overflow: hidden; 
  white-space: nowrap; 
  margin: 0 auto; 
  border-right: 2px solid var(--primary-color);
  animation: 
    typing 3s steps(40, end),
    blink-caret .75s step-end infinite;
  display: inline-block;
  vertical-align: bottom;
  max-width: 100%;
}

.typewriter-delayed {
    animation-delay: 2s;
    opacity: 0;
    animation: 
        fadeIn 0.1s forwards 3s,
        typing 3s steps(40, end) 3s,
        blink-caret .75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--primary-color); }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* UI Elements */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  padding: 0.6rem 1.5rem;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: inline-block;
}

/* Footer */
.footer-section {
  border-top: 1px solid var(--bs-border-color);
  background-color: var(--bs-body-bg);
}

.footer-links a {
  color: var(--bs-secondary-color);
  text-decoration: none;
  margin-bottom: 0.5rem;
  display: block;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.btn-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
