/* =========================================
   Ethio Nurse Academy – Real Nursing CSS
   v3.1: Book Colors Fixed, Larger Lead Font
   ========================================= */

/* ---------- 1. THEME VARIABLES ---------- */
:root {
  --bg: #050810;
  --ink: #e6eefc;
  --muted: #a0aec0;
  --panel: rgba(10, 15, 30, 0.55);
  --primary: #00a5a5;
  --secondary: #1b4d89;
  --border: rgba(135, 150, 184, 0.2);
  --shadow: 0 16px 10px rgba(0, 0, 0, 0.35);
}

/* Theme variants */
:root.theme-ocean { --primary: #00a5a5; --secondary: #1b4d89; --bg: #041820; }
:root.theme-sunset { --primary: #ff7e5f; --secondary: #feb47b; --bg: #26140b; }
:root.theme-forest { --primary: #4caf50; --secondary: #2e7d32; --bg: #08190a; }
:root.theme-candy { --primary: #ff66cc; --secondary: #ffcc33; --bg: #2a102e; }

/* White Theme Colors */
:root.theme-white {
  --primary: #00bfa5;
  --secondary: #00796b;
  --bg: #f0f2f5;
  --ink: #1c1e21;
  --panel: #ffffff;
  --muted: #606770;
  --border: rgba(0, 0, 0, 0.1);
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  color-scheme: light;
}

/* Darkglass Theme */
:root.theme-darkglass {
  --primary: #00c2c2;
  --secondary: #1b4d89;
  --bg: #080a0f;
  --ink: #f0f5ff;
  --panel: rgba(15, 25, 45, 0.6);
  --muted: #a0aec0;
  --border: rgba(135, 150, 184, 0.25);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.theme-darkglass .header,
.theme-darkglass .card,
.theme-darkglass .ac-item,
.theme-darkglass .btn,
.theme-darkglass select.theme,
.theme-darkglass .breaking-news {
  backdrop-filter: blur(16px) saturate(1.2);
}
.theme-darkglass .btn { background: rgba(15, 25, 45, 0.4); }

/* ---------- 2. GLOBAL / TYPOGRAPHY ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, 'Noto Sans Ethiopic', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  
  /* Centered Text & Larger Font */
  font-size: 1.22rem; 
  line-height: 1.75;
  text-align: center; 
  
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  
  /* UPDATE: Smooth theme background transition */
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--panel);
  border: 1px solid var(--primary);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* Canvas background glow */
#interactive-canvas {
  position: fixed; inset: 0; z-index: -1;
  box-shadow: inset 0 0 120px 60px color-mix(in oklab, var(--primary) 35%, transparent);
  transition: box-shadow .3s ease;
}
.theme-white #interactive-canvas { display: none; }

/* Reveal Animation */
.reveal {
  opacity: 1; transform: none;
  transition: opacity 0.8s cubic-bezier(.215, .61, .355, 1), transform 0.8s cubic-bezier(.215, .61, .355, 1);
}
.reveal.show { opacity: 1; transform: translateY(0); }

/* ========== TYPOGRAPHY ANIMATIONS ========== */
/* Titles adopt theme color & have animated underline */
h1, h2, h3, .title, .section-title {
  position: relative;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  color: var(--primary);
  cursor: default;
  line-height: 1.2;
}

/* Animated Underline Effect */
h1::after, h2::after, h3::after, .title::after, .section-title::after {
  content: ''; position: absolute; width: 100%; transform: scaleX(0); height: 3px;
  bottom: -2px; left: 0; background-color: var(--primary);
  transform-origin: bottom right; transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-radius: 2px; box-shadow: 0 0 10px var(--primary);
}
h1:hover::after, h2:hover::after, h3:hover::after, .title:hover::after, .section-title:hover::after {
  transform: scaleX(1); transform-origin: bottom left;
}

/* Left-align specific titles inside Hero if desired */
.hero h1, .hero h2 { margin-left: auto; margin-right: auto; }

/* ---------- 3. HEADER / NAV ---------- */
.header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--panel); backdrop-filter: blur(24px); border-bottom: 1px solid var(--border);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--primary) 15%, transparent), 0 14px 40px rgba(0, 0, 0, 0.45);
  text-align: left; /* Keep internal nav alignment standard */
}
.theme-white .header { background: #ffffff; border-color: rgba(15, 23, 42, 0.08); }

.nav {
  max-width: 1200px; margin: 0 auto; padding: 1rem 1.2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
}

.brand {
  display: inline-flex; align-items: center; gap: 0.8rem;
  text-decoration: none; color: var(--ink); font-weight: 900;
}
.brand svg {
  width: 30px; height: 30px; color: var(--primary); filter: drop-shadow(0 0 10px var(--primary));
}
/* Double Logo Size */
.brand img {
  width: 64px; height: 64px; border-radius: 16px; object-fit: cover;
  box-shadow: 0 0 15px color-mix(in oklab, var(--primary) 60%, transparent);
}

.menu { display: flex; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.menu a {
  color: var(--muted); text-decoration: none; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.9rem; padding: 0.65rem 0;
}
.menu a:hover { color: var(--ink); text-shadow: 0 0 8px color-mix(in oklab, var(--ink) 70%, transparent); }
.theme-white .menu a:hover { color: var(--primary); text-shadow: none; }

.controls { display: flex; align-items: center; gap: 0.5rem; }
select.theme {
  background: var(--panel); border: 1px solid var(--border); color: var(--ink);
  padding: 0.4rem 0.6rem; border-radius: 12px; font-weight: 800;
}
.btn-icon {
  background: none; border: 1px solid var(--border); color: var(--ink);
  border-radius: 12px; padding: 0.5rem 0.65rem; cursor: pointer;
}
.btn-icon .close { display: none; }

/* Mobile nav */
@media (max-width: 900px) {
  .menu {
    position: fixed; inset: 0 0 0 auto; width: min(92vw, 420px); height: 100dvh;
    background: var(--bg); flex-direction: column; align-items: center; justify-content: center;
    padding: 6rem 1.2rem; gap: 1.2rem; transform: translateX(100%);
    transition: transform .3s ease; box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
    text-align: center;
  }
  .menu.open { transform: none; }
  select.theme span { display: none; }
  select.theme { width: 60px; text-align: center; padding-inline: 0.5rem; background-position: right 0.3rem center; }
}

/* Dropdowns */
.menu li { position: relative; }
.dropdown-toggle::after { content: " ▾"; font-size: 0.8em; margin-left: 2px; }
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 0.5rem; margin: 0; list-style: none; min-width: 240px; z-index: 1100;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); text-align: center;
}
.dropdown-menu a {
  display: block; padding: 0.6rem 0.8rem; border-radius: 8px; font-size: 0.95rem; font-weight: 600;
}
.dropdown-menu a:hover { background: var(--primary); color: #fff !important; text-shadow: none; }
.theme-white .dropdown-menu { box-shadow: var(--shadow); }
.theme-white .dropdown-menu a { color: var(--muted); }
@media (min-width: 901px) { .menu li:hover > .dropdown-menu { display: block; } }
@media (max-width: 900px) {
  .dropdown-menu { position: static; background: none; border: none; box-shadow: none; display: none; transform: none; }
  .dropdown-menu.open { display: block; }
}

.fab-menu {
  position: fixed; left: 16px; bottom: 18px; z-index: 1100;
  background: var(--primary); color: #000; border: none;
  border-radius: 999px; padding: 0.7rem 1rem; font-weight: 900;
  display: none; box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}
.fab-menu.show { display: inline-flex; }
.theme-white .fab-menu { color: #fff; }

/* ---------- 4. BREAKING NEWS ---------- */
.breaking-news {
  position: sticky; top: 73px; z-index: 999;
  /* UPDATE: Slightly stronger background for better text readability */
  background: color-mix(in oklab, var(--primary) 30%, var(--bg)); 
  backdrop-filter: blur(12px); padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--border); color: var(--ink);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--primary) 15%, transparent), 0 12px 30px rgba(0, 0, 0, 0.4);
}
.theme-white .breaking-news { background: color-mix(in oklab, var(--primary) 15%, #fff); color: var(--ink); }

.breaking-news .badge {
  background: var(--primary); color: #fff; padding: 0.25rem 0.7rem;
  border-radius: 999px; font-size: 0.8rem; margin-right: 0.75rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.breaking-news__text {
  display: inline-block; font-weight: 600; font-size: 0.98rem;
  max-width: 960px; vertical-align: middle; opacity: 0;
  transform: translateY(6px); transition: opacity 0.35s ease, transform 0.35s ease;
}
.breaking-news__text.is-visible { opacity: 1; transform: translateY(0); }
@media (max-width: 900px) { .breaking-news { top: 73px; } }

/* ========== 5. HERO BANNER (Smart Hide) ========== */
.hero-banner {
  display: block; width: 100%; height: 280px; object-fit: cover;
  position: relative; z-index: 1;
  border-bottom: 1px solid var(--border); margin-bottom: 2rem;
  mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
  /* Transition for hiding */
  transition: opacity 0.5s ease, height 0.5s ease, margin 0.5s ease;
  opacity: 1;
}
.hero-banner.hidden {
  opacity: 0; height: 0; margin-bottom: 0; pointer-events: none;
}

/* ---------- 6. SLIDERS ---------- */
/* Hero Slider */
[data-slider] { position: relative; overflow: hidden; }
[data-slider] .slide {
  position: relative; opacity: 0; transform: translateY(16px);
  transition: opacity 0.8s ease, transform 0.8s ease; display: none;
}
[data-slider] .slide.is-active { display: block; opacity: 1; transform: none; }

.slider-dots { display: flex; gap: 0.5rem; justify-content: center; margin-top: 0.6rem; }
.slider-dot {
  width: 11px; height: 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.35);
  transition: transform 0.2s ease, background 0.2s ease; cursor: pointer;
}
.slider-dot.is-active {
  background: var(--primary); transform: scale(1.2);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 40%, transparent);
}
.theme-white .slider-dot { background: rgba(0, 0, 0, 0.2); }
.theme-white .slider-dot.is-active { background: var(--primary); }

.hero-slider-controls { margin-top: 1.5rem; }
.slider-arrows { display: flex; gap: 0.75rem; justify-content: center; margin-bottom: 0.75rem; }
.arrow-btn {
  background: none; border: 1px solid var(--border); color: var(--ink);
  border-radius: 12px; padding: 0.5rem 0.9rem; cursor: pointer;
  font-weight: 900; font-size: 1rem; transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.arrow-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 45%, transparent), 0 14px 40px rgba(0, 0, 0, 0.4);
}

/* Book Slideshow */
.book-slideshow-container {
  max-width: 1100px; margin: 0 auto; padding: 20px;
  /* Inherits .card glow */
}
.book-slideshow-wrapper { overflow: hidden; }
.book-slideshow { display: flex; width: max-content; animation: book-marquee 26s linear infinite; }
.book-slideshow:hover { animation-play-state: paused; }
.book-slide { width: 180px; flex-shrink: 0; text-align: center; margin-right: 1.5rem; }
.book-slide img {
  width: 100%; max-width: 260px; height: 280px; object-fit: cover; object-position: center top;
  border-radius: 12px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.30); margin-bottom: 10px; background: #ffffff;
}
.theme-white .book-slide img { background: #f9fafb; }

/* UPDATE: Book Store Name Colors & Size */
.book-slide p {
  font-size: 1rem;       /* Increased size */
  font-weight: 700;      /* Bold for visibility */
  color: var(--ink);     /* Bright text color (white in dark mode) */
  margin-top: 0.5rem;
}
.theme-white .book-slide p { color: var(--ink); /* Dark text in white mode */ }

@keyframes book-marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ---------- 7. UNIFIED CARDS & GLOW ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 3rem 1.2rem; }
@media (max-width: 800px) { .container { padding: 2.2rem 1rem; } }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 1.1rem; }

/* MASTER CARD STYLE */
.card, .hero, .book-slideshow-container, .ac-item, .language-card, article.program-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  /* HALF GLOW DEFAULT */
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--primary) 30%, transparent), 0 12px 30px rgba(0, 0, 0, 0.35);
  transition: box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.3s ease;
}

/* WHITE THEME CARD */
.theme-white .card, .theme-white .hero, .theme-white .book-slideshow-container,
.theme-white .language-card, .theme-white .ac-item, .theme-white article.program-card {
  background: #ffffff; border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

/* BRIGHT GLOW HOVER */
.card:hover, .ac-item:hover, .language-card:hover, article.program-card:hover {
  box-shadow: 0 0 0 2px var(--primary), 0 0 25px color-mix(in oklab, var(--primary) 40%, transparent), 0 22px 70px rgba(0, 0, 0, 0.60);
  transform: translateY(-5px) scale(1.01);
  border-color: transparent; z-index: 10;
}

/* Specific: Hero */
.hero {
  min-height: calc(100vh - 80px); display: grid; grid-template-columns: 1fr;
  gap: 2rem; align-items: center; padding: 2.4rem 1.8rem;
}
@media (min-width: 900px) { .hero { grid-template-columns: 1.1fr 0.9fr; gap: 3rem; } }
@media (max-width: 500px) { .hero { padding: 1.5rem 1rem; } .hero .lead { font-size: 1rem; } }

.title {
  font-size: clamp(2.1rem, 5.6vw, 4.6rem); font-weight: 900;
  text-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
}
.theme-white .title { text-shadow: 0 0 40px rgba(0, 0, 0, 0.1); }

/* UPDATE: Increased Lead Font Size */
.lead { color: var(--muted); max-width: 60ch; margin-left: auto; margin-right: auto; }
.hero .lead { font-size: 1.35rem; line-height: 1.6; }

.img-hero { width: 100%; border-radius: 24px; border: 1px solid var(--border); box-shadow: var(--shadow); }

/* Specific: Program Card */
article.program-card { text-align: center; position: relative; overflow: hidden; }
article.program-card::before {
  content: ''; position: absolute; top: -10px; right: -10px; width: 40px; height: 40px;
  background: var(--primary); filter: blur(20px); opacity: 0.4;
  transform: rotate(45deg); transition: opacity .3s ease; pointer-events: none;
}
article.program-card:hover::before { opacity: 1; }
.theme-white article.program-card::before { opacity: 0.3; }

.program-card img {
  width: 100%; height: 280px; object-fit: cover; object-position: center top;
  border-radius: 16px; margin-bottom: 1rem; background: rgba(0, 0, 0, 0.08);
  mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}
.program-card .small { font-size: 1.05rem; color: var(--muted); }

/* Specific: Language Card */
.language-card { text-align: center; padding: 1.5rem 1.2rem; }
.language-card h2 { font-size: clamp(1.4rem, 4vw, 2.2rem); letter-spacing: -0.02em; }
.lang-points {
  display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; margin: 1.5rem 0; font-size: 1.1rem; font-weight: 600;
}
.lang-cta { margin-top: 0.6rem; display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; justify-content: center; }

.section-title { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.section-sub { color: var(--muted); max-width: 780px; margin: 0 auto 1.5rem; font-size: 1.2rem; line-height: 1.7; }

/* ---------- 8. BUTTONS (Slim & Large) ---------- */
.btn, .button, .cta {
  display: inline-block; text-decoration: none; font-weight: 900;
  border-radius: 999px; border: 1px solid var(--border);
  
  /* SLIM + LARGE UPDATE */
  padding: 0.7rem 2rem; 
  min-width: 250px; 
  text-align: center;
  
  background: var(--panel); color: var(--ink); position: relative;
  /* Half Glow Default */
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--primary) 40%, transparent), 0 10px 25px rgba(0, 0, 0, 0.3);
  transition: all 0.25s ease;
}
.btn-solid {
  background: var(--primary); color: #fff;
  box-shadow: 0 10px 25px color-mix(in oklab, var(--primary) 40%, transparent);
}
.theme-white .btn-solid { color: #fff; }

.btn:hover, .button:hover, .cta:hover {
  transform: translateY(-2px); filter: saturate(1.1);
  /* Bright Glow Hover */
  box-shadow: 0 0 0 2px var(--primary), 0 0 20px color-mix(in oklab, var(--primary) 50%, transparent), 0 15px 40px rgba(0, 0, 0, 0.5);
}

.badge {
  display: inline-block; background: var(--primary); color: #fff; font-weight: 900;
  font-size: 0.7rem; padding: 0.35rem 0.65rem; border-radius: 999px; margin-bottom: 0.4rem;
}

/* ---------- 9. UP BUTTON (Fixed) ---------- */
.back-to-top {
  position: fixed; right: 18px; bottom: 18px; background: var(--primary); color: #fff;
  border-radius: 999px; padding: 0.6rem 0.9rem; font-weight: 900; text-decoration: none;
  display: flex; gap: 0.3rem; box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45); z-index: 1200;
  
  /* Hidden Default */
  opacity: 0; visibility: hidden; transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.back-to-top.show {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.back-to-top:hover {
  background: var(--ink); color: var(--bg); transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

/* ---------- 10. ACCORDION / FAQ ---------- */
.accordion { display: grid; gap: 0.6rem; }
.ac-item { overflow: hidden; /* Inherits glow from .card rule */ }
.ac-btn {
  width: 100%; text-align: center; background: none; border: none; color: var(--ink);
  font-weight: 900; padding: 0.9rem 1rem; cursor: pointer; font-size: 1.15rem;
}
.ac-body {
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1rem; color: var(--muted);
}
.ac-item.open .ac-body { max-height: 480px; padding: 0 1rem 1rem; }

/* ---------- 11. CEO / TESTIMONIALS ---------- */
.ceo { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 900px) { .ceo { grid-template-columns: 0.9fr 1.1fr; } }
.ceo img { width: 100%; max-width: 400px; border-radius: 20px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.ceo p { font-size: 1rem; text-align: center; } 

.testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.quote { border-left: 4px solid var(--primary); padding: 1rem; }
.quote p { font-size: 1rem; }

/* ---------- 12. FORMS ---------- */
.form-field { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.7rem; text-align: left; }
.form-field label { align-self: center; } 
input, textarea {
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
  border-radius: 12px; color: var(--ink); padding: 0.8rem 1rem; text-align: center;
}
input:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 30%, transparent);
}
.theme-white input, .theme-white textarea { background: color-mix(in oklab, var(--bg) 80%, #fff); }
.theme-white input:focus, .theme-white textarea:focus { background: #fff; }

/* ---------- 13. FOOTER ---------- */
footer {
  margin-top: 3rem; padding: 2rem 1.2rem; border-top: 1px solid rgba(148, 163, 184, 0.6);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.98));
  color: var(--muted);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--primary) 15%, transparent), 0 -18px 40px rgba(0, 0, 0, 0.55);
}
.footer-inner {
  max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.5rem;
  font-size: 0.88rem; text-align: center;
}
.footer-logo { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; margin-bottom: 0.5rem; }
.footer-logo .logo-mark {
  width: 32px; height: 32px; border-radius: 12px; display: grid; place-items: center;
  background: radial-gradient(circle at top, var(--primary), #0f172a);
  box-shadow: 0 0 18px color-mix(in oklab, var(--primary) 70%, transparent);
}
.footer-links { display: grid; gap: 0.3rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--primary); }
.footer-socials { display: flex; justify-content: center; gap: 0.6rem; margin-top: 0.6rem; }
.footer-socials a { color: var(--muted); transition: color 0.2s ease, transform 0.2s ease; }
.footer-socials a:hover { color: var(--primary); transform: translateY(-2px); }
.footer-socials svg { width: 24px; height: 24px; }
@media (max-width: 800px) { .footer-inner { grid-template-columns: 1fr; gap: 1rem; } }

/* ---------- 14. TOAST & PRELOADER ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px;
  background: #182035; color: #fff; padding: 0.7rem 1rem; border-radius: 12px; border: 1px solid var(--border);
  opacity: 0; pointer-events: none; transition: opacity 0.25s; z-index: 1200;
}
.toast.show { opacity: 1; }
.theme-white .toast { background: var(--ink); color: var(--bg); }

#ena-preloader {
  position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center;
  background: var(--bg); transition: opacity .6s ease, visibility .6s ease;
  visibility: visible; opacity: 1; box-shadow: inset 0 0 120px 60px color-mix(in oklab, var(--primary) 35%, transparent);
}
#ena-preloader .glass {
  padding: 2rem; border-radius: 16px;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.8), 0 20px 50px rgba(0, 0, 0, 0.85);
  max-width: 420px; width: 90%; position: relative; overflow: hidden;
}
#ena-preloader .logo {
  width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center;
  background: radial-gradient(circle at top, #22d3ee, #0f172a);
  box-shadow: 0 0 25px rgba(34, 211, 238, 0.6), 0 0 0 1px rgba(15, 23, 42, 0.85); font-size: 1.5rem;
}
#ena-preloader h1 { margin: 0; font-size: 1.25rem; }
#ena-preloader .accent { color: var(--primary); }
#ena-preloader .meta { font-size: 0.85rem; color: var(--muted); margin-top: 0.25rem; }
#ena-preloader .loading-bar {
  margin-top: 1.5rem; position: relative; height: 6px; background: rgba(15, 23, 42, 0.9);
  border-radius: 999px; overflow: hidden; border: 1px solid rgba(148, 163, 184, 0.7);
}
#ena-preloader .loading-bar span {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, #22d3ee, #38bdf8, #a855f7); background-size: 200% 100%;
  animation: loadingBarAnim 1.4s ease-in-out infinite; box-shadow: 0 0 18px rgba(56, 189, 248, 0.7);
}
#ena-preloader .tip {
  margin-top: 1rem; font-size: 0.78rem; color: var(--muted); display: flex; align-items: center; gap: 0.5rem;
}
#ena-preloader .tip-badge {
  font-size: 0.7rem; border-radius: 999px; padding: 0.15rem 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.8); text-transform: uppercase;
}
.ekg-line {
  position: absolute; left: -120%; top: calc(50% + 40px); width: 240%; height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--primary) 35%, transparent 70%);
  filter: drop-shadow(0 0 8px var(--primary)); opacity: 0.85; animation: ekg-scan 3.6s ease-in-out infinite;
}
.stethoscope-pulse {
  display: grid; place-items: center; margin-top: 1.5rem; animation: anim-pulse 1.3s ease-in-out infinite;
}
.stethoscope-pulse svg {
  width: 60px; height: 60px; color: var(--primary); filter: drop-shadow(0 0 15px var(--primary));
}
#ena-preloader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.content {
  display: block; opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility .8s ease;
  position: relative; z-index: 1;
}
.content.is-visible { opacity: 1; visibility: visible; }

/* Keyframes */
@keyframes anim-pulse { 0% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); opacity: 0.8; } }
@keyframes ekg-scan { 0% { transform: translateX(0); } 45% { transform: translateX(55%); } 100% { transform: translateX(120%); } }
@keyframes loadingBarAnim { 0% { transform: translateX(-40%) scaleX(0.3); background-position: 0 0; } 50% { transform: translateX(15%) scaleX(1); background-position: 100% 0; } 100% { transform: translateX(100%) scaleX(0.3); background-position: 0 0; } }

/* Hero Text Gradient Animation */
.hero-gradient {
  background: linear-gradient(120deg, var(--primary), #fff, var(--primary));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 4s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }