/* ==========================================================================
   MOLINA IT — ULTRA-PREMIUM 2027 DESIGN SYSTEM
   Aceternity Beams, MagicUI Border Beam, 3D Depth, Shimmer & Shaders
   ========================================================================== */

:root {
  --bg-dark: #06080D;
  --bg-surface: #0B0F17;
  --bg-card: rgba(14, 19, 31, 0.72);
  --bg-card-hover: rgba(20, 27, 45, 0.88);
  
  --cyan-primary: #00F5FF;
  --cyan-light: #70F9FF;
  --cyan-glow: rgba(0, 245, 255, 0.38);
  --cyan-subtle: rgba(0, 245, 255, 0.08);

  --indigo-accent: #6366F1;
  --violet-glow: rgba(99, 102, 241, 0.3);
  
  --sunset-pink: #F43F5E;
  --sunset-orange: #FB923C;

  --emerald-status: #10B981;
  --emerald-glow: rgba(16, 185, 129, 0.35);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-cyan: rgba(0, 245, 255, 0.32);
  --border-active: rgba(0, 245, 255, 0.7);

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --font-display: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Space Grotesk', -apple-system, sans-serif;
  --font-accent: 'Anton', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: #1E293B;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--cyan-primary);
  box-shadow: 0 0 10px var(--cyan-primary);
}

/* Base Styles */
html {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  background-color: var(--bg-dark);
  position: relative;
}

/* Selection Color */
::selection {
  background: rgba(0, 245, 255, 0.3);
  color: #FFFFFF;
}

/* Typography Helpers */
.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }
.font-sans { font-family: var(--font-sans); }
.font-accent { font-family: var(--font-accent); }

/* 35mm Analog Cine Grain (Ultra-Subtle) */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.038;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Cyber Grid Background */
.bg-cyber-grid {
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
}

/* Aceternity Lamp / Background Beams Lighting */
.lamp-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 480px;
  background: radial-gradient(ellipse at 50% 0%, rgba(0, 245, 255, 0.22) 0%, rgba(99, 102, 241, 0.12) 45%, transparent 75%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 1;
}

/* Text Shimmer Sweep (Aceternity style) */
.text-shimmer {
  background: linear-gradient(
    110deg,
    #FFFFFF 0%,
    #FFFFFF 35%,
    #00F5FF 50%,
    #FFFFFF 65%,
    #FFFFFF 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: text-shimmer-sweep 4.5s linear infinite;
}

@keyframes text-shimmer-sweep {
  0% { background-position: 220% 0; }
  100% { background-position: -220% 0; }
}

/* Text Gradients */
.text-gradient-cyan {
  background: linear-gradient(135deg, #FFFFFF 20%, #70F9FF 60%, #00F5FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-sunset {
  background: linear-gradient(135deg, #F43F5E 0%, #FB923C 60%, #FBBF24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Spotlight Card System */
.spotlight-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  overflow: hidden;
  transition: border-color 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.spotlight-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  background: radial-gradient(
    650px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(0, 245, 255, 0.14),
    transparent 45%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 1;
}

.spotlight-card:hover {
  border-color: var(--border-cyan);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.8), 0 0 30px -5px rgba(0, 245, 255, 0.18);
}

.spotlight-card:hover::before {
  opacity: 1;
}

/* Border Beam Animation (MagicUI style) */
.border-beam-box {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
}

.border-beam-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from 0deg, transparent 75%, var(--cyan-primary) 92%, var(--indigo-accent) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: beam-spin 5.5s linear infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes beam-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Shimmer Button */
.shimmer-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.shimmer-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 20%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 80%
  );
  transform: rotate(25deg) translateY(-100%);
  transition: transform 0.75s ease;
}

.shimmer-btn:hover::after {
  transform: rotate(25deg) translateY(100%);
}

.shimmer-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 245, 255, 0.4);
}

/* Before & After Interactive Comparison Slider */
.ba-container {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  user-select: none;
  width: 100%;
  height: 620px;
  min-height: 520px;
  background: #000;
}

.ba-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #000;
}

.ba-container.is-dragging iframe {
  pointer-events: none !important;
}

.ba-before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  clip-path: inset(0 calc(100% - var(--split-pos, 50%)) 0 0);
  z-index: 5;
}

.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split-pos, 50%);
  width: 3px;
  background: var(--cyan-primary);
  box-shadow: 0 0 20px var(--cyan-primary);
  transform: translateX(-50%);
  cursor: ew-resize;
  z-index: 10;
}

.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0B0F17;
  border: 2px solid var(--cyan-primary);
  box-shadow: 0 0 20px var(--cyan-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-primary);
  font-size: 14px;
  transition: transform 0.2s ease;
}

.ba-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}
.ba-open-btn-retro {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #CBD5E1;
}
.ba-open-btn-retro:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.ba-open-btn-modern {
  background: rgba(0, 245, 255, 0.1);
  border: 1px solid rgba(0, 245, 255, 0.35);
  color: var(--cyan-primary);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.15);
}
.ba-open-btn-modern:hover {
  background: rgba(0, 245, 255, 0.2);
  color: #fff;
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.35);
}

.ba-divider:hover .ba-handle {
  transform: translate(-50%, -50%) scale(1.1);
}

/* Terminal Cursor */
.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--cyan-primary);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 4px;
}

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

/* Ticker Animation */
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.animate-ticker {
  display: flex;
  width: max-content;
  animation: ticker-scroll 30s linear infinite;
}

.animate-ticker:hover {
  animation-play-state: paused;
}

/* Dynamic Island Navigation Dock */
.nav-island {
  background: rgba(11, 15, 23, 0.82);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.75), 0 0 25px -5px rgba(0, 245, 255, 0.1);
  transition: all 0.3s ease;
}

/* Modal Overlay — Full-Screen Immersive */
.modal-overlay {
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  background: rgba(2, 4, 8, 0.92);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Interactive Audio Visualizer Bars */
.audio-bar {
  animation: audio-bounce 1.2s ease-in-out infinite alternate;
}
@keyframes audio-bounce {
  0% { height: 15%; }
  100% { height: 95%; }
}

/* ==========================================================================
   CYBER BROWSER 2027 — LIVE IFRAME & DEVICE HARDWARE SIMULATOR
   ========================================================================== */
.device-viewport-container {
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 40px -10px rgba(0, 245, 255, 0.2);
}

.device-viewport-container.is-desktop {
  width: 100%;
  max-width: 620px;
  height: 420px;
  border-radius: 16px;
}

.device-viewport-container.is-mobile {
  width: 290px;
  height: 540px;
  border-radius: 38px;
  border-width: 6px;
  border-color: #1e293b;
}

.live-iframe-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.live-iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
}

/* Mobile responsive scaling inside iframe */
.is-mobile .live-iframe-wrapper iframe {
  width: 100%;
  height: 100%;
}

/* Scanner line animation when loading */
.scanner-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan-primary), transparent);
  box-shadow: 0 0 15px var(--cyan-primary);
  animation: scan-vertical 2s linear infinite;
  z-index: 20;
}

@keyframes scan-vertical {
  0% { top: 0%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* Hover Quick-Look Holographic Tag */
.hover-live-pill {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.spotlight-card:hover .hover-live-pill {
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.4);
}


/* Animated Neural Pulse Connector */
.neural-pulse {
  stroke-dasharray: 6 6;
  animation: neural-dash 1.5s linear infinite;
}
@keyframes neural-dash {
  to { stroke-dashoffset: -24; }
}
