/* ============================================================
   CINEMATIC ENHANCEMENTS — Danger All In One
   Layered on top of existing styles for premium upgrade
   ============================================================ */

/* ---- CSS Custom Properties ---- */
:root {
  --cin-gold: #c8a03c;
  --cin-gold-light: #e8c84c;
  --cin-cyan: #00eaff;
  --cin-cyan-dim: rgba(0, 234, 255, 0.15);
  --cin-purple: #7c3aed;
  --cin-neon: #39ff14;
  --cin-bg: #0a0a0a;
  --cin-bg-deep: #050508;
  --cin-text: #c8d0dc;
  --cin-glass: rgba(10, 14, 22, 0.75);
  --cin-glass-border: rgba(255, 255, 255, 0.08);
  --cin-transition: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   ENHANCED TYPOGRAPHY
   ============================================================ */
.hero-title {
  text-shadow:
    0 0 80px rgba(200, 160, 60, 0.15),
    0 0 40px rgba(0, 234, 255, 0.08);
}

.section-title {
  text-shadow: 0 0 60px rgba(200, 160, 60, 0.08);
}

.hero-question {
  letter-spacing: 0.03em;
}

.hero-desc strong,
.seo-support-copy strong {
  background: linear-gradient(90deg, var(--cin-gold), var(--cin-gold-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================================
   GLASSMORPHISM PANELS
   ============================================================ */
.trilogy-card,
.book-card,
.blog-card,
.emotional-card {
  background: var(--cin-glass) !important;
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--cin-glass-border) !important;
}

.trilogy-card:hover,
.book-card:hover,
.blog-card:hover {
  border-color: rgba(200, 160, 60, 0.25) !important;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(200, 160, 60, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* ============================================================
   ENHANCED BUTTONS — Hover Animations
   ============================================================ */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--cin-transition);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary:hover {
  box-shadow:
    0 8px 32px rgba(200, 160, 60, 0.35),
    0 0 60px rgba(200, 160, 60, 0.12);
}

.btn-secondary {
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--cin-transition);
}

.btn-secondary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 234, 255, 0.08), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.btn-secondary:hover::before {
  opacity: 1;
}

.btn-secondary:hover {
  box-shadow: 0 0 30px rgba(0, 234, 255, 0.12);
}

.btn-neon-blue {
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--cin-transition);
}

.btn-neon-blue:hover {
  box-shadow:
    0 0 20px rgba(0, 191, 255, 1),
    0 0 60px rgba(0, 191, 255, 0.3);
}

/* ============================================================
   BOOK CARDS — Cinematic Hover Reveals
   ============================================================ */
.book-card {
  transition: all 0.5s var(--cin-transition) !important;
}

.book-card:hover {
  transform: translateY(-8px) scale(1.02) !important;
}

.book-card-image {
  transition: transform 0.7s var(--cin-transition), filter 0.5s ease;
}

.book-card:hover .book-card-image {
  transform: scale(1.05);
  filter: brightness(1.1) contrast(1.05);
}

.book-card-body {
  position: relative;
}

.book-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cin-gold), var(--cin-cyan), var(--cin-purple));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.book-card:hover::after {
  opacity: 1;
}

.book-card {
  position: relative;
  overflow: hidden;
}

/* ============================================================
   TRILOGY CARDS — Enhanced Hover
   ============================================================ */
.trilogy-card {
  transition: all 0.5s var(--cin-transition) !important;
  position: relative;
  overflow: hidden;
}

.trilogy-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 50%,
    rgba(200, 160, 60, 0.03) 100%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.trilogy-card:hover::after {
  opacity: 1;
}

.trilogy-card:hover {
  transform: translateY(-8px) !important;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(200, 160, 60, 0.08) !important;
}

.trilogy-cover {
  transition: transform 0.7s var(--cin-transition);
}

.trilogy-card:hover .trilogy-cover {
  transform: scale(1.04);
}

/* ============================================================
   BLOG CARDS — Enhanced
   ============================================================ */
.blog-card {
  transition: all 0.4s var(--cin-transition) !important;
  position: relative;
  overflow: hidden;
}

.blog-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 234, 255, 0.03), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}

.blog-card:hover::after {
  left: 100%;
}

.blog-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

/* ============================================================
   EMOTIONAL CARDS — Enhanced Border Glow
   ============================================================ */
.emotional-card {
  transition: all 0.4s ease;
  border-left: 2px solid rgba(200, 160, 60, 0.2) !important;
  position: relative;
}

.emotional-card:hover {
  border-left-color: var(--cin-gold) !important;
  background: rgba(200, 160, 60, 0.03);
}

.emotional-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -1px;
  width: 2px;
  height: 0;
  background: linear-gradient(180deg, var(--cin-cyan), var(--cin-gold));
  transition: height 0.6s var(--cin-transition);
}

.emotional-card:hover::before {
  height: 100%;
}

/* ============================================================
   SCROLL REVEAL ENHANCEMENTS
   ============================================================ */
.reveal {
  transition: all 0.8s var(--cin-transition) !important;
}

[data-animate] {
  transition: all 0.7s var(--cin-transition) !important;
}

/* ============================================================
   SECTION DIVIDERS — Ambient Glow Lines
   ============================================================ */
.universe-section::after,
.books-section::after,
.emotional-section::after,
.soundtrack-section::after,
.blog-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(80%, 600px);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(200, 160, 60, 0.2),
    rgba(0, 234, 255, 0.15),
    rgba(200, 160, 60, 0.2),
    transparent
  );
}

/* ============================================================
   AUTHOR SECTION — Enhanced Image Glow
   ============================================================ */
.author-image-wrap img {
  transition: transform 0.6s var(--cin-transition), box-shadow 0.6s ease;
}

.author-image-wrap:hover img {
  transform: scale(1.03);
  box-shadow:
    0 20px 80px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(0, 234, 255, 0.08);
}

.author-quote {
  position: relative;
}

.author-quote::before {
  content: '\201C';
  position: absolute;
  top: -20px;
  left: -10px;
  font-size: 4rem;
  color: rgba(0, 234, 255, 0.08);
  font-family: Georgia, serif;
  line-height: 1;
}

/* ============================================================
   HERO BADGE — Animated Border
   ============================================================ */
@keyframes borderGlow {
  0%, 100% { border-color: rgba(0, 234, 255, 0.3); }
  50% { border-color: rgba(0, 234, 255, 0.6); }
}

.hero-badge {
  animation: fadeUp 0.8s ease 0.3s forwards, borderGlow 4s ease-in-out infinite 2s;
}

/* ============================================================
   SOCIAL PROOF — Counter Animation Enhancement
   ============================================================ */
.proof-number {
  text-shadow: 0 0 30px rgba(200, 160, 60, 0.3);
}

.proof-item {
  transition: all 0.6s var(--cin-transition) !important;
}

.proof-item:hover {
  transform: translateY(-4px) !important;
}

.proof-item:hover .proof-number {
  text-shadow: 0 0 40px rgba(200, 160, 60, 0.5);
}

/* ============================================================
   SEARCH — Enhanced UX
   ============================================================ */
.hero-search-input:focus,
.search-engine-input:focus {
  box-shadow:
    0 0 0 1px rgba(0, 234, 255, 0.2),
    0 0 30px rgba(0, 234, 255, 0.1),
    0 0 60px rgba(0, 234, 255, 0.04) !important;
}

.hero-search-suggestions,
.search-engine-suggestions {
  border-radius: 4px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.hero-search-item:hover,
.search-engine-result-item:hover {
  background: rgba(0, 234, 255, 0.08) !important;
}

.hero-search-item strong,
.search-engine-result-title strong {
  text-shadow: 0 0 8px rgba(0, 234, 255, 0.3);
}

/* ============================================================
   SOUNDTRACK SECTION — Enhanced Embed
   ============================================================ */
.soundtrack-embed {
  position: relative;
  transition: transform 0.5s var(--cin-transition), box-shadow 0.5s ease;
}

.soundtrack-embed:hover {
  transform: translateY(-4px);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 191, 255, 0.08);
}

.soundtrack-embed::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(0, 191, 255, 0.2), rgba(200, 160, 60, 0.2));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.soundtrack-embed:hover::before {
  opacity: 1;
}

/* ============================================================
   NAVIGATION — Enhanced Glassmorphism
   ============================================================ */
.nav.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

/* ============================================================
   FOOTER — Enhanced
   ============================================================ */
.footer {
  background: linear-gradient(180deg, #050505, #020204);
}

.footer-inner {
  position: relative;
}

/* ============================================================
   CURSOR GLOW (Desktop Only)
   ============================================================ */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 234, 255, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  mix-blend-mode: screen;
  will-change: transform;
}

@media (hover: none) {
  .cursor-glow { display: none; }
}

@media (max-width: 768px) {
  .cursor-glow { display: none; }
}

/* ============================================================
   AMBIENT NEBULA OVERLAYS
   ============================================================ */
.nebula-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.nebula-overlay::before {
  content: '';
  position: absolute;
  width: 800px;
  height: 800px;
  top: -200px;
  left: -200px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
  animation: nebulaFloat 20s ease-in-out infinite alternate;
}

.nebula-overlay::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  bottom: -100px;
  right: -100px;
  background: radial-gradient(circle, rgba(0, 234, 255, 0.04) 0%, transparent 70%);
  animation: nebulaFloat 25s ease-in-out infinite alternate-reverse;
}

@keyframes nebulaFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(100px, 50px) scale(1.2); }
  100% { transform: translate(-50px, 100px) scale(0.9); }
}

/* ============================================================
   SCROLL-REACTIVE GLOW (via JS class toggling)
   ============================================================ */
.section-glow-active .section-title {
  text-shadow: 0 0 40px rgba(200, 160, 60, 0.15);
  transition: text-shadow 0.6s ease;
}

.section-glow-active .section-label {
  text-shadow: 0 0 20px rgba(0, 234, 255, 0.3);
  transition: text-shadow 0.6s ease;
}

/* ============================================================
   PARALLAX DEPTH LAYERS
   ============================================================ */
.parallax-bg {
  will-change: transform;
  transition: transform 0.1s linear;
}

/* ============================================================
   SPLASH OVERLAY — Enhanced Atmospheric Depth
   ============================================================ */
.splash-overlay {
  background: linear-gradient(
    135deg,
    #030308 0%,
    #050510 30%,
    #08081a 60%,
    #050508 100%
  );
}

.splash-cover {
  transition: transform 0.6s var(--cin-transition);
}

.splash-cover:hover {
  transform: scale(1.05) rotateY(2deg);
}

.splash-enter-btn {
  position: relative;
  overflow: hidden;
}

.splash-enter-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(200, 160, 60, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.splash-enter-btn:hover::after {
  width: 300px;
  height: 300px;
}

/* ============================================================
   READING PROGRESS BAR — Enhanced
   ============================================================ */
.progress-bar {
  height: 2px;
  background: linear-gradient(90deg, var(--cin-gold), var(--cin-cyan), var(--cin-purple));
  box-shadow: 0 0 10px rgba(0, 234, 255, 0.3);
}

/* ============================================================
   BOOK ITEM LIST — Enhanced
   ============================================================ */
.book-item {
  transition: all 0.4s var(--cin-transition) !important;
}

.book-item:hover {
  transform: translateX(4px) !important;
  border-left: 2px solid var(--cin-gold);
}

.book-num {
  transition: color 0.3s ease;
}

.book-item:hover .book-num {
  color: var(--cin-gold);
  text-shadow: 0 0 20px rgba(200, 160, 60, 0.4);
}

/* ============================================================
   CINEMATIC INTRO TRANSITION
   ============================================================ */
@keyframes cinematicReveal {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.cin-reveal {
  animation: cinematicReveal 1s var(--cin-transition) forwards;
}

/* ============================================================
   TRAILER SECTION — Enhanced Cards
   ============================================================ */
#trailers [style*="border-radius"] {
  border: 1px solid rgba(200, 160, 60, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.4s var(--cin-transition);
}

#trailers [style*="border-radius"]:hover {
  border-color: rgba(200, 160, 60, 0.25);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 30px rgba(200, 160, 60, 0.06);
  transform: translateY(-4px);
}

/* ============================================================
   UNIVERSE VISUAL — Enhanced Depth
   ============================================================ */
.universe-visual img {
  transition: transform 0.7s var(--cin-transition), box-shadow 0.7s ease !important;
}

.universe-visual img:hover {
  transform: scale(1.04) rotateY(-2deg) !important;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(200, 160, 60, 0.08) !important;
}

/* ============================================================
   CONTACT SECTION — Enhanced
   ============================================================ */
.contact-email {
  position: relative;
  display: inline-block;
}

.contact-email::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--cin-cyan);
  transition: width 0.4s var(--cin-transition);
}

.contact-email:hover::after {
  width: 100%;
}

/* ============================================================
   FINAL CTA — Atmospheric Enhancement
   ============================================================ */
.final-cta-section::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(200, 160, 60, 0.04) 0%, transparent 70%);
  pointer-events: none;
  animation: nebulaFloat 15s ease-in-out infinite alternate;
}

/* ============================================================
   SMOOTH SCROLL IMPROVEMENTS
   ============================================================ */
html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(200, 160, 60, 0.3) transparent;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(200, 160, 60, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(200, 160, 60, 0.5);
}

/* ============================================================
   MOBILE OPTIMIZATIONS
   ============================================================ */
@media (max-width: 768px) {
  .nebula-overlay { opacity: 0.2; }

  .nebula-overlay::before {
    width: 400px;
    height: 400px;
  }

  .nebula-overlay::after {
    width: 300px;
    height: 300px;
  }

  .book-card:hover {
    transform: translateY(-4px) scale(1) !important;
  }

  .trilogy-card:hover {
    transform: translateY(-4px) !important;
  }

  .splash-cover:hover {
    transform: scale(1.02);
  }

  .author-image-wrap:hover img {
    transform: scale(1.02);
  }
}

@media (max-width: 480px) {
  .nebula-overlay { display: none; }
}

/* ============================================================
   REDUCED MOTION SUPPORT
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .nebula-overlay,
  .cursor-glow {
    display: none !important;
  }
}

/* ============================================================
   FOCUS STYLES — Accessibility
   ============================================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--cin-cyan);
  outline-offset: 2px;
}

/* ============================================================
   INSTALL BANNER — Enhanced
   ============================================================ */
.install-banner {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ============================================================
   FLOATING SEARCH BUTTON — Enhanced
   ============================================================ */
#floatingSearchBtn {
  transition: all 0.4s var(--cin-transition) !important;
}

#floatingSearchBtn:hover {
  box-shadow:
    0 0 30px rgba(200, 160, 60, 0.3),
    0 4px 20px rgba(0, 0, 0, 0.5) !important;
  transform: translateY(-2px);
}

/* ============================================================
   NAV LINKS — Subtle Hover Underline
   ============================================================ */
.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--cin-gold);
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
  left: 0;
}

/* Skip underline for boxed nav items */
.nav-links .nav-box-gold::after,
.nav-links .nav-box-neon-blue::after,
.nav-links .nav-cta-btn::after {
  display: none;
}
