/* Reduced transitions to avoid scroll lag */
*, *::before, *::after {
  transition-timing-function: cubic-bezier(0.33, 1, 0.68, 1) !important;
  will-change: auto;
}

/* Glowing text selection */
::selection{
  background:linear-gradient(90deg, rgba(255,64,129,0.6), rgba(0,122,255,0.4));
  color:#fff;
  text-shadow:0 0 10px rgba(255,64,129,0.9), 0 0 20px rgba(0,122,255,0.7);
}
::-moz-selection{
  background:linear-gradient(90deg, rgba(255,64,129,0.6), rgba(0,122,255,0.4));
  color:#fff;
  text-shadow:0 0 10px rgba(255,64,129,0.9), 0 0 20px rgba(0,122,255,0.7);
}

/* Boot overlay (shared site-wide) */
.boot-overlay{
  position:fixed;
  top:0;
  left:0;
  right:0;
  bottom:0;
  width:100vw;
  height:100vh;
  display:grid;
  place-items:center;
  background:rgba(4,6,10,0.75);
  z-index:9999;
  transition:opacity .35s ease;
  overflow:hidden;
}

.boot-inner{
  padding:28px 36px;
  border-radius:18px;
  position:relative;
  background:linear-gradient(135deg, rgba(20,20,30,0.95), rgba(10,10,20,0.98));
  border:1px solid rgba(255,64,129,0.25);
  box-shadow:0 24px 60px rgba(2,6,23,0.72), inset 0 1px 0 rgba(255,255,255,0.08), 0 0 40px rgba(255,64,129,0.1);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}

.boot-inner::before{
  /* moving sheen */
  content:"";
  position:absolute;
  left:-70%;
  top:-20%;
  width:80%;
  height:140%;
  background:linear-gradient(120deg, rgba(255,255,255,0.18), rgba(255,255,255,0.02));
  transform:skewX(-18deg) translateX(-100%);
  animation:liquidSheen 2.6s linear infinite;
  opacity:0.95;
  pointer-events:none;
  filter:blur(10px);
  mix-blend-mode:overlay;
}

.boot-inner::after{
  /* subtle inner glow / rim */
  content:"";
  position:absolute;
  inset:0;
  border-radius:18px;
  box-shadow: inset 0 6px 24px rgba(255,255,255,0.02), inset 0 -8px 30px rgba(0,0,0,0.25);
  pointer-events:none;
}

.boot-logo{
  font-family:Orbitron,Inter,system-ui,Segoe UI,Roboto,Arial;
  font-weight:900;
  color:#ff6fa3;
  font-size:clamp(28px,8vw,72px);
  letter-spacing:1px;
  text-transform:none;
  opacity:0;
  transform:translateY(6px) scale(.98);
  animation:bootLogo 900ms cubic-bezier(.2,.9,.2,1) forwards .15s;
  text-shadow:0 10px 30px rgba(255,111,163,0.12), 0 30px 80px rgba(0,0,0,0.65);
}

.boot-sub{color:rgba(255,255,255,0.78);font-size:14px;opacity:0;transform:translateY(6px);animation:bootLogo 900ms cubic-bezier(.2,.9,.2,1) forwards .25s}

/* Modern circular spinner with glass glow */
.boot-ring{display:flex;align-items:center;justify-content:center;margin-top:16px;position:relative}
.boot-ring::before{
  content:"";
  position:absolute;
  width:100px;height:100px;border-radius:50%;
  background:radial-gradient(circle at 30% 30%, rgba(255,111,163,0.06), transparent 30%), radial-gradient(circle at 70% 70%, rgba(0,122,255,0.04), transparent 40%);
  filter:blur(8px);
  pointer-events:none;
}
.spinner{width:68px;height:68px;display:block;filter:drop-shadow(0 8px 30px rgba(0,0,0,0.6))}
.spinner .path{stroke:#ff74a3;stroke-linecap:round;stroke-dasharray:89,200;stroke-dashoffset:0;animation:dash 1.4s ease-in-out infinite, spin 2s linear infinite;transform-origin:50% 50%;filter:drop-shadow(0 8px 28px rgba(255,111,163,0.12))}

@keyframes spin{100%{transform:rotate(360deg)}}
@keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:100,200;stroke-dashoffset:-15px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}
@keyframes bootLogo{to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes liquidSheen{0%{transform:skewX(-18deg) translateX(-100%)}50%{transform:skewX(-18deg) translateX(160%)}100%{transform:skewX(-18deg) translateX(160%)}}
@keyframes liquidFlow{0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%}}
@keyframes glassPulse{0%,100%{box-shadow:0 0 20px rgba(255,64,129,0.15), inset 0 1px 0 rgba(255,255,255,0.05)}50%{box-shadow:0 0 40px rgba(255,64,129,0.35), inset 0 1px 0 rgba(255,255,255,0.1)}}
@keyframes glassShimmer{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}
@keyframes liquidBorder{0%{border-color:rgba(255,64,129,0.3)}50%{border-color:rgba(138,43,226,0.5)}100%{border-color:rgba(255,64,129,0.3)}}

@media (prefers-reduced-motion: reduce){
  .spinner .path{animation:none}
  .boot-inner::before{animation:none}
}

/* Base styles with dark gaming background */
*{margin:0;padding:0;box-sizing:border-box}
html,body{
  min-height:100vh;
  background:#000;
  color:#fff;
  font-family:'Orbitron',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  transform:translateZ(0);
  scroll-behavior:smooth;
}

/* Dark gradient background with gaming aesthetic */
body{
  background:radial-gradient(ellipse at 50% 0%, rgba(255,64,129,0.08), transparent 60%),
             radial-gradient(ellipse at 100% 50%, rgba(0,122,255,0.06), transparent 50%),
             radial-gradient(ellipse at 0% 50%, rgba(138,43,226,0.05), transparent 50%),
             linear-gradient(180deg, #000 0%, #0a0a0f 50%, #000 100%);
  background-attachment:fixed;
}

/* Animated background pattern */
body::before{
  content:'';
  position:fixed;
  inset:0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.015) 2px, rgba(255,255,255,0.015) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,0.015) 2px, rgba(255,255,255,0.015) 4px);
  opacity:0.3;
  pointer-events:none;
  z-index:0;
}

/* Animated glow orbs in background */
body::after{
  content:'';
  position:fixed;
  width:600px;
  height:600px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(255,64,129,0.1), transparent 70%);
  top:20%;
  left:10%;
  filter:blur(80px);
  animation:floatOrb 20s ease-in-out infinite;
  pointer-events:none;
  z-index:0;
}

@keyframes floatOrb{
  0%,100%{transform:translate(0,0) scale(1)}
  33%{transform:translate(100px,-50px) scale(1.1)}
  66%{transform:translate(-50px,100px) scale(0.9)}
}

/* Hero section - main landing area */
.hero{
  position:relative;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:100px 20px 60px;
  text-align:center;
  z-index:1;
  overflow:visible;
}

/* Glow effect behind hero title */
.glow{
  position:absolute;
  width:800px;
  height:400px;
  border-radius:50%;
  background:radial-gradient(ellipse, rgba(255,64,129,0.25), rgba(138,43,226,0.15) 40%, transparent 70%);
  filter:blur(100px);
  top:35%;
  left:50%;
  transform:translateX(-50%);
  pointer-events:none;
  z-index:-1;
  animation:driftX 10s ease-in-out infinite;
  will-change:transform,filter;
}

/* Main title */
.title{
  font-size:clamp(60px,10vw,140px);
  font-weight:900;
  margin:0 0 24px;
  background:linear-gradient(135deg, #fff 0%, #ff6fa3 50%, #8a2be2 100%);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
  text-shadow:0 0 80px rgba(255,64,129,0.5);
  letter-spacing:-0.02em;
  line-height:1.1;
  animation:floatY 8s ease-in-out infinite;
  will-change:transform;
  white-space:nowrap;
  word-spacing:normal;
}

/* Subtitle */
.sub{
  font-size:clamp(16px,2.5vw,22px);
  color:rgba(255,255,255,0.8);
  max-width:700px;
  margin:0 auto 12px;
  font-weight:400;
  line-height:1.6;
}

/* Credit text */
.credit{
  font-size:14px;
  color:rgba(255,111,163,0.7);
  margin-top:8px;
  font-weight:500;
}

.home-page .cta-row{display:flex;gap:12px;justify-content:center;align-items:center;flex-wrap:nowrap;margin-top:22px}
@media (max-width:768px){.home-page .cta-row{flex-wrap:nowrap;gap:10px;justify-content:center}}
@media (max-width:520px){.home-page .cta-row{flex-wrap:nowrap;gap:10px;justify-content:center}}

/* CTA Buttons */
.cta{
  display:inline-block;
  padding:16px 32px;
  background:linear-gradient(135deg, rgba(255,64,129,0.15), rgba(138,43,226,0.1));
  border:1px solid rgba(255,64,129,0.3);
  color:#fff;
  text-decoration:none;
  border-radius:12px;
  font-weight:700;
  font-size:15px;
  position:relative;
  overflow:hidden;
  box-shadow:0 8px 32px rgba(255,64,129,0.2), inset 0 1px rgba(255,255,255,0.1), 0 0 20px rgba(255,64,129,0.1);
  transition:transform 240ms cubic-bezier(.2,.9,.2,1), box-shadow 240ms ease, border-color 240ms ease;
  animation:glassPulse 4s ease-in-out infinite;
}

.cta::before{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(135deg, rgba(255,64,129,0.2), rgba(138,43,226,0.15));
  opacity:0;
  transition:opacity 300ms ease;
}

.cta::after{
  content:'';
  position:absolute;
  left:-100%;
  top:0;
  width:100%;
  height:100%;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform:skewX(-18deg);
  transition:left 600ms ease;
  animation:glassShimmer 3s ease-in-out infinite;
}

.cta:hover{
  transform:translateY(-4px) scale(1.02);
  border-color:rgba(255,111,163,0.5);
  box-shadow:0 12px 48px rgba(255,64,129,0.4), inset 0 1px rgba(255,255,255,0.15);
}

.cta:hover::before{opacity:1}
.cta:hover::after{left:100%}

/* Container for content pages */
.container{
  max-width:1200px;
  margin:0 auto;
  padding:100px 24px 60px;
  position:relative;
  z-index:1;
  background:linear-gradient(135deg, rgba(255,64,129,0.02), rgba(138,43,226,0.01));
  border-radius:24px;
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);
}

.container h1{
  font-size:clamp(48px,8vw,80px);
  font-weight:900;
  margin:0 0 40px;
  background:linear-gradient(135deg, #fff, #ff6fa3);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
  text-align:center;
}

/* Content page styling */
.container p, .container li{
  color:rgba(255,255,255,0.85);
  line-height:1.7;
  font-size:16px;
}

.container ol, .container ul{
  margin:20px 0;
  padding-left:24px;
}

.container ol li, .container ul li{
  margin:12px 0;
}

.container label{
  display:block;
  color:rgba(255,255,255,0.9);
  font-weight:600;
  margin-bottom:6px;
  font-size:14px;
}

.container input, .container textarea{
  width:100%;
  padding:12px 16px;
  border-radius:10px;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,64,129,0.25);
  color:#fff;
  font-family:inherit;
  font-size:15px;
  transition:border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.05);
}

.container input:focus, .container textarea:focus{
  outline:none;
  border-color:rgba(255,64,129,0.5);
  background:rgba(255,255,255,0.08);
  box-shadow:0 0 0 3px rgba(255,64,129,0.15), inset 0 1px 0 rgba(255,255,255,0.08), inset 0 0 20px rgba(255,64,129,0.05);
}

.container input::placeholder, .container textarea::placeholder{
  color:rgba(255,255,255,0.3);
}

/* Cards and Steps */
.card, .step{
  background:linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border:1px solid rgba(255,64,129,0.2);
  border-radius:16px;
  padding:32px;
  backdrop-filter:blur(20px) saturate(140%);
  -webkit-backdrop-filter:blur(20px) saturate(140%);
  box-shadow:0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.08), 0 0 30px rgba(255,64,129,0.08);
  transition:transform 420ms cubic-bezier(.2,.9,.2,1), box-shadow 300ms ease, border-color 300ms ease;
  animation:floatY 9s ease-in-out infinite;
  will-change:transform;
  position:relative;
  overflow:hidden;
}

.card::before, .step::before{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(135deg, rgba(255,64,129,0.1), rgba(138,43,226,0.05));
  opacity:0;
  transition:opacity 300ms ease;
  pointer-events:none;
}

.card:hover, .step:hover{
  transform:translateY(-8px) scale(1.01);
  box-shadow:0 20px 48px rgba(2,6,23,0.6), inset 0 1px rgba(255,255,255,0.02), 0 0 50px rgba(255,64,129,0.2);
  border-color:rgba(255,64,129,0.4);
  animation:liquidBorder 2s ease-in-out infinite;
}

.card:hover::before, .step:hover::before{
  opacity:1;
}

.back{
  display:inline-block;
  padding:12px 24px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,64,129,0.25);
  color:#fff;
  text-decoration:none;
  border-radius:10px;
  font-weight:600;
  transition:all 220ms ease;
  backdrop-filter:blur(15px) saturate(120%);
  -webkit-backdrop-filter:blur(15px) saturate(120%);
  box-shadow:0 4px 16px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.05);
}

.back:hover{
  background:rgba(255,64,129,0.15);
  border-color:rgba(255,64,129,0.4);
  transform:translateY(-2px);
  box-shadow:0 8px 24px rgba(255,64,129,0.2), inset 0 1px 0 rgba(255,255,255,0.08);
}

.boot-overlay, .boot-inner, .cta, .step, .back{
  will-change: transform, opacity;
  backface-visibility: hidden;
}
.cta, .step, .back{transition:transform 220ms cubic-bezier(.2,.9,.2,1), box-shadow 220ms cubic-bezier(.2,.9,.2,1), opacity 180ms ease}
.boot-inner{transition:transform 360ms cubic-bezier(.2,.9,.2,1), opacity 360ms cubic-bezier(.2,.9,.2,1)}

/* Fluid, subtle animations */
@keyframes floatY { 0%{transform:translateY(0)}50%{transform:translateY(-8px)}100%{transform:translateY(0)} }
@keyframes driftX { 0%{transform:translateX(0) rotate(0)}50%{transform:translateX(6px) rotate(.25deg)}100%{transform:translateX(0) rotate(0)} }
@keyframes glowShift { 0%{filter:blur(60px) opacity:.28}50%{filter:blur(72px) opacity:.36}100%{filter:blur(60px) opacity:.28} }

/* apply gentle motion to hero elements */
.glow{animation:driftX 10s ease-in-out infinite; will-change:transform,filter}
.title{animation:floatY 8s ease-in-out infinite; will-change:transform}

/* float cards slightly with stagger when visible */
.card, .step{animation:floatY 9s ease-in-out infinite; animation-delay:0s; will-change:transform}
.card:nth-of-type(2), .step:nth-of-type(2){animation-delay:1.2s}
.card:nth-of-type(3), .step:nth-of-type(3){animation-delay:2.4s}

/* add a slow shimmer on CTA for life */
.cta::after{transition:transform 2.8s linear;}
.cta:hover::after{transform:skewX(-18deg) translateX(180%)}

/* subtle dynamic glow behind spinner */
.boot-ring::before{animation:glowShift 6.5s ease-in-out infinite}

@media (prefers-reduced-motion: reduce){
  .glow, .title, .card, .step, .boot-ring::before{animation:none}
}

/* Mouse hover / parallax smoothing */
.hero{position:relative;overflow:visible}
.title{transition:transform 420ms cubic-bezier(.2,.9,.2,1)}
.glow{transition:transform 700ms cubic-bezier(.2,.9,.2,1), opacity 420ms ease}
.card, .step{transition:transform 420ms cubic-bezier(.2,.9,.2,1), box-shadow 300ms ease}
.cta{transition:transform 240ms cubic-bezier(.2,.9,.2,1), box-shadow 240ms ease}

/* Subtle pointer effect for interactive items */
.card:hover, .step:hover{transform:translateY(-8px) scale(1.01)}
.cta:hover{transform:translateY(-6px) scale(1.03)}

@media (prefers-reduced-motion: reduce){
  .title, .glow, .card, .step, .cta{transition:none}
}

/* Subtle glass borders for site boxes */
.card, .step, .cta, .back{
  border: 1px solid rgba(255,64,129,0.2);
  outline: 1px solid rgba(255,64,129,0.1);
  border-radius: 10px;
}
.card:hover, .step:hover, .cta:hover, .back:hover{
  border-color: rgba(255,64,129,0.4);
  box-shadow: 0 20px 48px rgba(2,6,23,0.6), inset 0 1px rgba(255,255,255,0.08), 0 0 40px rgba(255,64,129,0.15);
}

/* Light mode toggle styles */
body.light-mode{
  background:linear-gradient(180deg,#f7f9fc 0%,#edf1f7 50%,#f7f9fc 100%);
  color:#0f1115;
}
body.light-mode .site-header{
  background:rgba(255,255,255,0.7);
  border-bottom:1px solid rgba(0,0,0,0.08);
}
body.light-mode .logo{color:#d12b7a}
body.light-mode .nav-link{color:#0f1115}
body.light-mode .nav-link:hover{background:rgba(0,0,0,0.06)}
body.light-mode .nav-link.active{background:rgba(0,0,0,0.1);border-bottom:2px solid #d12b7a;padding-bottom:6px}
body.light-mode .header-actions .theme-toggle{border-color:rgba(0,0,0,0.08);background:rgba(0,0,0,0.04);color:#0f1115}
body.light-mode .cta{
  color:#0f1115;
  background:linear-gradient(135deg, rgba(0,0,0,0.04), rgba(0,0,0,0.02));
  border:1px solid rgba(0,0,0,0.08);
  box-shadow:0 8px 24px rgba(0,0,0,0.12);
}
body.light-mode .card, body.light-mode .step, body.light-mode .device-card{
  background:linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.75));
  border:1px solid rgba(0,0,0,0.08);
  box-shadow:0 8px 28px rgba(0,0,0,0.12);
  color:#0f1115;
}
body.light-mode .device-name, body.light-mode .rom-title, body.light-mode .title{color:#0f1115; -webkit-text-fill-color:unset; background:unset}
body.light-mode .sub, body.light-mode .page-subtitle, body.light-mode .device-subtitle, body.light-mode p, body.light-mode li{color:rgba(15,17,21,0.85)}
body.light-mode .device-status{border-color:rgba(0,0,0,0.12); background:rgba(0,0,0,0.05); color:#0f1115}
body.light-mode .download-btn{color:#0f1115; border:1px solid rgba(0,0,0,0.1); background:linear-gradient(135deg, rgba(0,0,0,0.06), rgba(0,0,0,0.03))}
body.light-mode .back-btn{color:#0f1115; border:1px solid rgba(0,0,0,0.1); background:rgba(0,0,0,0.04)}
body.light-mode .rom-card:hover, body.light-mode .device-card:hover{box-shadow:0 14px 36px rgba(0,0,0,0.16); border-color:rgba(0,0,0,0.14)}
body.light-mode h1, body.light-mode h2, body.light-mode h3, body.light-mode strong{color:#0f1115}
body.light-mode label{color:#0f1115}
body.light-mode .credit{color:rgba(15,17,21,0.6)}
body.light-mode .rom-card{color:#0f1115}
body.light-mode .rom-card p{color:rgba(15,17,21,0.8)}

@media (max-width:720px){
  body.light-mode .site-nav{background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(242,242,245,0.98)); border-left:1px solid rgba(0,0,0,0.08)}
  body.light-mode .nav-link{border-bottom:1px solid rgba(0,0,0,0.06)}
}

/* stronger focus for keyboard navigation */
.card:focus-within, .step:focus-within, .cta:focus, .back:focus{
  box-shadow: 0 22px 60px rgba(2,6,23,0.72), 0 0 0 4px rgba(255,111,163,0.06);
  border-color: rgba(255,111,163,0.18);
}

/* One-time magic effect (first visit) */
.magic-overlay{position:fixed;inset:0;pointer-events:none;display:flex;align-items:center;justify-content:center;z-index:14000}
.magic-particle{position:absolute;width:12px;height:12px;border-radius:50%;opacity:0;transform:translateY(0) scale(0.8);mix-blend-mode:screen}
.magic-particle.small{width:8px;height:8px}
.magic-particle.large{width:16px;height:16px}

@media (prefers-reduced-motion: reduce){
  .magic-overlay, .magic-particle{display:none}
}
/* Auth UI removed */

/* Mobile performance fallback: reduce blurs/shadows and disable heavy effects */
@media (max-width:720px){
  .boot-overlay{ -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(4,6,10,0.75); }
  .boot-inner{ -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow:0 8px 18px rgba(2,6,23,0.6); padding:18px 20px 22px; min-width:min(88vw, 340px); }
  .boot-inner::before{ display:none }
  .glow{ display:none !important; }
  .cta{ -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow:none; border:1px solid rgba(255,255,255,0.04) }
  .card, .step{ box-shadow:none; border:1px solid rgba(255,255,255,0.04); }
  .magic-overlay, .magic-particle{ display:none !important }
  .title, .hero, .sub{ will-change:auto }
}

/* prevent scrolling on home page for small/touch devices (keeps visuals intact) */
@media (max-width:720px){
  /* Allow scrolling on mobile to view all content */
  .home-page, .home-page body, .home-page html{ 
    overflow-y: auto !important; 
    overflow-x: hidden !important;
    touch-action: pan-y !important; 
    height: auto !important;
    min-height: 100vh !important;
  }
  .home-page .hero{ 
    min-height: 100vh; 
    overflow: visible;
    padding-bottom: 40px;
  }
}

/* Mobile: keep headings centered on phones */
@media (max-width:720px){
  /* Home page hero stays centered both vertically and horizontally */
  .home-page .hero{
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    padding-top:24px;
    padding-left:20px;
    padding-right:20px;
    box-sizing:border-box;
  }
  .home-page .title{font-size: clamp(48px,12vw,120px); line-height:1.02; margin:0 0 16px 0;}
  .home-page .sub, .home-page .credit{ text-align:center; margin-left:0; }
  .home-page .cta{ margin-top:18px }

  /* Ensure other pages' headings are centered on mobile */
  .container h1, h1{ text-align:center; margin-top:8px; }
  .container{ padding-top:12px; }
}

/* Further mobile perf: stop animations, transitions and filters on touch/small screens
   We keep the visual styles but make them static to avoid jank on high-refresh phones. */
@media (max-width:720px){
  .glow, .title, .card, .step, .boot-ring::before, .boot-inner::before, .boot-inner::after,
  .boot-logo, .boot-sub, .cta::after{
    animation: none !important;
    transition: none !important;
    filter: none !important;
    will-change: auto !important;
  }
  /* Keep spinner animation visible on mobile */
  .spinner, .spinner .path{
    animation: spin 2s linear infinite, dash 1.4s ease-in-out infinite !important;
  }

  /* Keep appearance but lower shadow / glow cost */
  .card, .step, .cta{ box-shadow: 0 6px 14px rgba(2,6,23,0.45) !important; }
  .boot-ring::before{ display:none !important }

  /* Ensure boot visuals are fully visible (no entrance anim) but visually similar */
  .boot-logo, .boot-sub{ opacity:1 !important; transform:none !important }

  /* Reduce paint cost for spinner */
  .spinner{ filter:none !important }
  .spinner .path{ stroke-opacity:0.95 }
}

/* Site header - Modern sleek navigation */
.site-header{
  position:fixed;
  left:0;right:0;top:0;
  z-index:1200;
  padding:0;
  background:rgba(0,0,0,0.85);
  border-bottom:1px solid rgba(255,64,129,0.15);
  box-shadow:0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
}

.header-inner{
  max-width:1400px;
  margin:0 auto;
  position:relative;
  padding:0 40px;
  height:70px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

/* Logo container */
.logo-container{
  display:flex;
  align-items:center;
  z-index:2;
}

.logo{
  font-family:Orbitron,Inter,system-ui,Segoe UI,Roboto,Arial;
  font-weight:900;
  color:#fff;
  font-size:26px;
  letter-spacing:1.2px;
  white-space:nowrap;
  background:linear-gradient(135deg, #ff6fa3 0%, #8a2be2 100%);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}

/* Navigation */
.site-nav{
  display:flex;
  gap:8px;
  align-items:center;
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%, -50%);
}

.nav-link{
  color:rgba(255,255,255,0.7);
  text-decoration:none;
  font-weight:600;
  padding:10px 20px;
  border-radius:8px;
  transition:all 0.3s ease;
  font-size:14px;
  position:relative;
  letter-spacing:0.3px;
  backdrop-filter:blur(10px) saturate(120%);
  -webkit-backdrop-filter:blur(10px) saturate(120%);
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,64,129,0.1);
  box-shadow:0 4px 12px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.05);
}

.nav-link:hover{
  color:rgba(255,255,255,0.95);
  background:rgba(255,64,129,0.15);
  border-color:rgba(255,64,129,0.3);
  box-shadow:0 8px 20px rgba(255,64,129,0.15), inset 0 1px 0 rgba(255,255,255,0.1);
}

.nav-link.active{
  color:#ff6fa3;
  background:rgba(255,64,129,0.2);
  border-color:rgba(255,64,129,0.4);
  box-shadow:0 0 30px rgba(255,64,129,0.2), inset 0 1px 0 rgba(255,255,255,0.1);
}

/* Header actions - theme toggle */
.header-actions{
  display:flex;
  align-items:center;
  gap:12px;
  z-index:2;
}

.theme-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  border-radius:50%;
  border:2px solid rgba(255,64,129,0.3);
  background:linear-gradient(135deg, rgba(255,64,129,0.12), rgba(138,43,226,0.08));
  color:#ff6fa3;
  cursor:pointer;
  transition:all 0.3s ease;
  box-shadow:0 0 20px rgba(255,64,129,0.15), inset 0 1px 0 rgba(255,255,255,0.1);
  backdrop-filter:blur(15px) saturate(130%);
  -webkit-backdrop-filter:blur(15px) saturate(130%);
  animation:glassPulse 5s ease-in-out infinite;
}

.theme-toggle:hover{
  background:linear-gradient(135deg, rgba(255,64,129,0.25), rgba(138,43,226,0.15));
  border-color:rgba(255,64,129,0.6);
  box-shadow:0 0 40px rgba(255,64,129,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
  transform:scale(1.1);
}

.theme-toggle svg{
  transition:all 0.3s ease;
}

.user-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  border-radius:50%;
  border:2px solid rgba(255,64,129,0.3);
  background:linear-gradient(135deg, rgba(255,64,129,0.1), rgba(138,43,226,0.05));
  color:#ff6fa3;
  cursor:pointer;
  transition:all 0.3s ease;
  box-shadow:0 0 20px rgba(255,64,129,0.15);
}

.user-icon:hover{
  background:linear-gradient(135deg, rgba(255,64,129,0.2), rgba(138,43,226,0.1));
  border-color:rgba(255,64,129,0.5);
  box-shadow:0 0 30px rgba(255,64,129,0.3);
  transform:scale(1.05);
}

/* Hamburger menu */
.menu-toggle{
  display:none;
  flex-direction:column;
  gap:5px;
  background:rgba(255,64,129,0.1);
  border:1px solid rgba(255,64,129,0.3);
  border-radius:8px;
  cursor:pointer;
  padding:10px;
  z-index:1201;
  position:fixed;
  left:20px;
  top:15px;
  backdrop-filter:blur(15px) saturate(130%);
  -webkit-backdrop-filter:blur(15px) saturate(130%);
  box-shadow:0 4px 16px rgba(255,64,129,0.1), inset 0 1px 0 rgba(255,255,255,0.1);
  transition:all 0.3s ease;
}

.menu-toggle span{
  display:block;
  width:22px;
  height:2px;
  background:#ff6fa3;
  border-radius:2px;
  transition:all .3s ease;
}

.menu-toggle.active span:nth-child(1){
  transform:rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2){
  opacity:0;
}

.menu-toggle.active span:nth-child(3){
  transform:rotate(-45deg) translate(6px, -6px);
}

/* Mobile responsive header */
@media (max-width:968px){
  .header-inner{
    padding:0 20px;
    height:60px;
    justify-content:center;
  }
  
  .logo{
    font-size:18px;
    text-align:center;
  }
  
  .logo-container{
    position:static;
    transform:none;
    z-index:10;
  }
  
  .logo-icon{
    width:28px;
    height:28px;
  }
  
  .menu-toggle{
    display:flex;
  }
  
  .site-nav{
    position:fixed;
    top:0;
    left:-100%;
    width:80%;
    max-width:320px;
    height:100vh;
    background:linear-gradient(180deg, rgba(0,0,0,0.98), rgba(10,10,15,0.98));
    backdrop-filter:blur(30px);
    -webkit-backdrop-filter:blur(30px);
    flex-direction:column;
    gap:4px;
    padding:100px 24px 40px;
    box-shadow:20px 0 60px rgba(0,0,0,0.7);
    transition:left .3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y:auto;
    border-right:1px solid rgba(255,64,129,0.15);
    transform:none;
    left:-100%;
  }
  
  .site-nav.active{
    left:0;
  }
  
  .nav-link{
    width:100%;
    padding:16px 20px;
    font-size:15px;
    text-align:left;
    border-radius:12px;
  }
  
  .nav-link:hover{
    background:rgba(255,111,163,0.1);
    transform:translateX(5px);
  }

  .header-actions{
    position:fixed;
    right:20px;
    top:15px;
    z-index:1201;
  }
}

/* Tablet screens */
@media (max-width:900px) and (min-width:769px){
  .site-nav{gap:12px}
  .nav-link{font-size:13px;padding:6px 8px}
}

/* Desktop: keep nav fully centered */
@media (min-width:901px){
  .site-nav{transform:translate(-50%, -50%)}
}

/* Theme Toggle Button */
.theme-toggle {
  padding: 8px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.theme-toggle:hover {
  background: rgba(255,255,255,0.12);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(255,64,129,0.2);
}

body.light-mode .theme-toggle {
  background: rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.1);
}

body.light-mode .theme-toggle:hover {
  background: rgba(0,0,0,0.12);
}

/* ROM Card - Liquid Glass Style */
.rom-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,64,129,0.2);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.08), 0 0 30px rgba(255,64,129,0.08);
  transition: all 320ms cubic-bezier(0.2, 0.9, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.rom-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,64,129,0.1), rgba(138,43,226,0.05));
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}

.rom-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(255,64,129,0.4);
  box-shadow: 0 16px 48px rgba(255,64,129,0.2), inset 0 1px 0 rgba(255,255,255,0.1), 0 0 50px rgba(255,64,129,0.15);
  animation: liquidBorder 2s ease-in-out infinite;
}

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

/* Device Card - Liquid Glass Style */
.device-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,64,129,0.2);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.08), 0 0 30px rgba(255,64,129,0.08);
  transition: all 320ms cubic-bezier(0.2, 0.9, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.device-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,64,129,0.1), rgba(138,43,226,0.05));
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}

.device-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(255,64,129,0.4);
  box-shadow: 0 16px 48px rgba(255,64,129,0.2), inset 0 1px 0 rgba(255,255,255,0.1), 0 0 50px rgba(255,64,129,0.15);
  animation: liquidBorder 2s ease-in-out infinite;
}

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

/* Code - Liquid Glass Style */
code {
  background: linear-gradient(135deg, rgba(255,64,129,0.1), rgba(138,43,226,0.05));
  color: #ff6fa3;
  padding: 4px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,64,129,0.25);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 4px 12px rgba(255,64,129,0.08);
  display: inline-block;
  transition: all 200ms ease;
}

code:hover {
  background: linear-gradient(135deg, rgba(255,64,129,0.2), rgba(138,43,226,0.1));
  border-color: rgba(255,64,129,0.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 20px rgba(255,64,129,0.15);
}

/* Pre - Code block - Liquid Glass Style */
pre {
  background: linear-gradient(135deg, rgba(0,20,40,0.8), rgba(0,10,30,0.9));
  border: 1px solid rgba(255,64,129,0.25);
  border-radius: 12px;
  padding: 24px;
  overflow-x: auto;
  backdrop-filter: blur(15px) saturate(130%);
  -webkit-backdrop-filter: blur(15px) saturate(130%);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05), 0 0 30px rgba(255,64,129,0.08);
  transition: all 300ms ease;
  position: relative;
}

pre:hover {
  border-color: rgba(255,64,129,0.4);
  box-shadow: 0 12px 40px rgba(255,64,129,0.15), inset 0 1px 0 rgba(255,255,255,0.08), 0 0 40px rgba(255,64,129,0.12);
}

/* Table - Liquid Glass Style */
table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid rgba(255,64,129,0.2);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  backdrop-filter: blur(15px) saturate(130%);
  -webkit-backdrop-filter: blur(15px) saturate(130%);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06);
}

th, td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid rgba(255,64,129,0.1);
}

th {
  background: linear-gradient(135deg, rgba(255,64,129,0.15), rgba(138,43,226,0.1));
  border-bottom: 2px solid rgba(255,64,129,0.25);
  font-weight: 700;
  color: #ff6fa3;
}

tr:hover {
  background: rgba(255,64,129,0.08);
}

/* Links - Liquid Glass Style */
a {
  color: #ff6fa3;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,64,129,0.3);
  transition: all 200ms ease;
  padding: 2px 4px;
  border-radius: 4px;
}

a:hover {
  background: rgba(255,64,129,0.1);
  border-bottom-color: rgba(255,64,129,0.6);
  box-shadow: 0 4px 12px rgba(255,64,129,0.2);
}

/* Blockquote - Liquid Glass Style */
blockquote {
  border-left: 3px solid rgba(255,64,129,0.4);
  padding: 16px 24px;
  margin: 24px 0;
  background: linear-gradient(135deg, rgba(255,64,129,0.08), rgba(138,43,226,0.04));
  border-radius: 8px;
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 4px 16px rgba(255,64,129,0.08);
  font-style: italic;
  color: rgba(255,255,255,0.8);
}

/* Button - Liquid Glass Style */
button {
  background: linear-gradient(135deg, rgba(255,64,129,0.12), rgba(138,43,226,0.08));
  border: 1px solid rgba(255,64,129,0.3);
  color: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 300ms cubic-bezier(0.2, 0.9, 0.2, 1);
  backdrop-filter: blur(15px) saturate(130%);
  -webkit-backdrop-filter: blur(15px) saturate(130%);
  box-shadow: 0 4px 16px rgba(255,64,129,0.1), inset 0 1px 0 rgba(255,255,255,0.08);
}

button:hover {
  background: linear-gradient(135deg, rgba(255,64,129,0.2), rgba(138,43,226,0.12));
  border-color: rgba(255,64,129,0.5);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(255,64,129,0.2), inset 0 1px 0 rgba(255,255,255,0.1);
}

button:active {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255,64,129,0.15), inset 0 1px 0 rgba(255,255,255,0.08);
}

/* Mobile responsive fixes for ROMs page */
@media (max-width:720px){
  .container{
    padding:16px !important;
    margin-left:16px !important;
    margin-right:16px !important;
    max-width: calc(100% - 32px) !important;
    overflow-x: hidden;
  }
}

/* Fix grid overflow on device pages */
@media (max-width: 1024px) {
  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* Ensure no horizontal overflow */
main, .container, body, html {
  overflow-x: hidden;
  max-width: 100%;
}

/* AI Chat Assistant Widget - Pinned Bottom Left */
.ai-chat-widget {
  position: fixed !important;
  bottom: 24px !important;
  left: 24px !important;
  z-index: 9998;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ai-chat-button {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4081 0%, #00d9ff 100%);
  border: 2px solid rgba(255,255,255,0.2);
  box-shadow: 0 8px 32px rgba(255,64,129,0.4), 0 0 60px rgba(0,217,255,0.2), inset 0 1px 0 rgba(255,255,255,0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 320ms cubic-bezier(0.33, 1, 0.68, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: aiButtonPulse 3s ease-in-out infinite;
}

.ai-chat-button:hover {
  transform: scale(1.12) rotate(5deg);
  box-shadow: 0 12px 48px rgba(255,64,129,0.6), 0 0 80px rgba(0,217,255,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
  animation: none;
}

.ai-chat-button:active {
  transform: scale(0.95);
}

@keyframes aiButtonPulse {
  0%, 100% {
    box-shadow: 0 8px 32px rgba(255,64,129,0.4), 0 0 60px rgba(0,217,255,0.2), inset 0 1px 0 rgba(255,255,255,0.2);
  }
  50% {
    box-shadow: 0 12px 40px rgba(255,64,129,0.6), 0 0 80px rgba(0,217,255,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
  }
}

.ai-chat-button svg {
  width: 32px;
  height: 32px;
  fill: white;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.ai-chat-window {
  position: absolute;
  bottom: 75px;
  left: 0;
  width: 380px;
  max-width: calc(100vw - 48px);
  height: 500px;
  max-height: calc(100vh - 120px);
  background: linear-gradient(180deg, rgba(10,14,26,0.95), rgba(26,10,46,0.95));
  border: 1px solid rgba(255,64,129,0.3);
  border-radius: 20px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.6), 0 0 60px rgba(255,64,129,0.2);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideUpFade 300ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.ai-chat-window.active {
  display: flex;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ai-chat-header {
  padding: 20px;
  background: linear-gradient(135deg, rgba(255,64,129,0.15), rgba(0,217,255,0.1));
  border-bottom: 1px solid rgba(255,64,129,0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-chat-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4081, #00d9ff);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(255,64,129,0.3);
}

.ai-chat-avatar svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.ai-chat-info h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.ai-chat-info p {
  margin: 0;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

.ai-chat-close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 200ms;
  line-height: 1;
}

.ai-chat-close:hover {
  color: #fff;
  transform: none;
  box-shadow: none;
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-chat-messages::-webkit-scrollbar {
  width: 8px;
}

.ai-chat-messages::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255,64,129,0.3);
  border-radius: 4px;
}

.ai-chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(255,64,129,0.5);
}

.ai-message {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.ai-message.user {
  flex-direction: row-reverse;
}

.ai-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.ai-message.ai .ai-message-avatar {
  background: linear-gradient(135deg, #ff4081, #00d9ff);
  box-shadow: 0 4px 12px rgba(255,64,129,0.3);
}

.ai-message.user .ai-message-avatar {
  background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.08));
  border: 1px solid rgba(255,255,255,0.2);
}

.ai-message-content {
  background: linear-gradient(135deg, rgba(255,64,129,0.1), rgba(138,43,226,0.08));
  border: 1px solid rgba(255,64,129,0.2);
  padding: 12px 16px;
  border-radius: 16px;
  max-width: 75%;
  color: rgba(255,255,255,0.9);
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.ai-message.user .ai-message-content {
  background: linear-gradient(135deg, rgba(0,217,255,0.15), rgba(138,43,226,0.1));
  border-color: rgba(0,217,255,0.3);
}

.ai-chat-input-area {
  padding: 16px;
  background: linear-gradient(180deg, rgba(255,64,129,0.08), rgba(138,43,226,0.05));
  border-top: 1px solid rgba(255,64,129,0.2);
  display: flex;
  gap: 12px;
}

.ai-chat-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 12px 16px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 200ms;
}

.ai-chat-input:focus {
  background: rgba(255,255,255,0.08);
  border-color: rgba(0,217,255,0.4);
  box-shadow: 0 0 0 3px rgba(0,217,255,0.1);
}

.ai-chat-input::placeholder {
  color: rgba(255,255,255,0.4);
}

.ai-chat-send {
  background: linear-gradient(135deg, #ff4081, #00d9ff);
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms;
  box-shadow: 0 4px 16px rgba(255,64,129,0.3);
}

.ai-chat-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255,64,129,0.5);
}

.ai-chat-send:active {
  transform: translateY(0);
}

/* AI Suggestion Buttons */
.ai-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ai-suggestion-btn {
  background: linear-gradient(135deg, rgba(0,217,255,0.15), rgba(138,43,226,0.1));
  border: 1px solid rgba(0,217,255,0.3);
  border-radius: 20px;
  padding: 8px 16px;
  color: #00d9ff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 300ms cubic-bezier(0.33, 1, 0.68, 1);
  box-shadow: 0 2px 8px rgba(0,217,255,0.1);
}

.ai-suggestion-btn:hover {
  background: linear-gradient(135deg, rgba(0,217,255,0.25), rgba(138,43,226,0.15));
  border-color: rgba(0,217,255,0.5);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 16px rgba(0,217,255,0.3);
}

.ai-suggestion-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Typing Indicator */
.typing-indicator .ai-message-content {
  padding: 12px 16px;
}

.typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  height: 20px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0,217,255,0.6);
  animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.6;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* Enhanced AI message styling */
.ai-message-content strong {
  color: #00d9ff;
  font-weight: 600;
}

.ai-message-content code {
  background: rgba(0,0,0,0.3);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #ff6fa3;
  border: 1px solid rgba(255,111,163,0.2);
}

.ai-message-content a {
  color: #00d9ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,217,255,0.3);
  transition: all 200ms cubic-bezier(0.33, 1, 0.68, 1);
}

.ai-message-content a:hover {
  border-bottom-color: #00d9ff;
  color: #33e0ff;
}

@media (max-width: 768px) {
  .ai-chat-widget {
    bottom: 16px;
    left: 16px;
  }

  .ai-chat-button {
    width: 56px;
    height: 56px;
  }

  .ai-chat-window {
    width: calc(100vw - 32px);
    height: calc(100vh - 120px);
  }
}


