/* =========================================
   BinGenie — modern, clean UI (no frameworks)
   Paste into: static/css/style.css
========================================= */

/* ---------- Theme tokens ---------- */
:root{
  --bg: #f7fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;

  --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);

  --primary: #111827;
  --primary-hover: #0b1220;
  --secondary: #eef2f7;
  --secondary-hover: #e6ebf2;

  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --danger-bg: #fff1f2;
  --danger-border: #fecdd3;

  --radius: 18px;
  --radius-sm: 14px;
}

/* ---------- Global ---------- */
*{ box-sizing: border-box; }

body{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 5% -10%, rgba(16,185,129,0.12), transparent 55%),
    radial-gradient(1200px 600px at 95% 0%, rgba(59,130,246,0.14), transparent 60%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  margin: 0;
  padding: 32px 40px 40px;
  line-height: 1.5;


  align-items: flex-start;
}

.page-header{
  margin: 4px 0 18px;
}

h1{
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.02em;
}

.muted{
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 14px;
}

/* ---------- Card / Layout ---------- */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.98));
  border: 1px solid rgba(226,232,240,0.85);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  backdrop-filter: blur(6px);
}

.form-section{
  margin-top: 14px;
}

.section-title{
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

hr{
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 18px 0;
  opacity: 0.9;
}

/* ---------- Buttons ---------- */
.button-row{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.btn{
  appearance: none;
  border: 1px solid rgba(2,6,23,0.10);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
  user-select: none;
}

.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(2,6,23,0.10);
}

.btn:active{
  transform: translateY(0px);
  box-shadow: 0 4px 10px rgba(2,6,23,0.08);
}

.btn-primary{
  background: linear-gradient(180deg, var(--primary), #0b1220);
  color: #fff;
  border-color: rgba(255,255,255,0.12);
}

.btn-primary:hover{
  background: linear-gradient(180deg, var(--primary-hover), #070c17);
}

.btn-secondary{
  background: linear-gradient(180deg, var(--secondary), #e9eef6);
  color: var(--text);
  border-color: rgba(2,6,23,0.08);
}

.btn-secondary:hover{
  background: linear-gradient(180deg, var(--secondary-hover), #dfe6ef);
}

button:disabled{
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ---------- Hide file inputs ---------- */
#cameraInput,
#uploadInput,
#capturedFileInput{
  display: none;
}

/* ---------- Preview & Camera ---------- */
#preview{
  display: none;
  width: 100%;
  margin-top: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(226,232,240,0.9);
  box-shadow: 0 10px 25px rgba(2,6,23,0.08);
}

.webcam-wrap{
  margin-top: 8px;
}

#video{
  display: none;
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(226,232,240,0.9);
  box-shadow: 0 10px 25px rgba(2,6,23,0.08);
}

#canvas{
  display: none;
}

/* ---------- Results ---------- */
.results{
  margin-top: 14px;
}

.result{
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #f8fafc;
}

.result h2{
  margin: 0 0 10px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.result p{
  margin: 8px 0;
}

.result details{
  margin-top: 10px;
}

.result summary{
  cursor: pointer;
  font-weight: 650;
  color: var(--text);
}

.result ul{
  margin: 10px 0 0 18px;
  color: var(--muted);
}

/* Optional: make “Recycle/Waste” feel like status cards (no HTML changes needed) */
.result:has(h2){
  position: relative;
  overflow: hidden;
}
.result:has(h2)::before{
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.9;
  pointer-events: none;
}


/* ---------- Small polish ---------- */
label b{
  display: inline-block;
  margin-bottom: 8px;
}

.form-section--actions{
  margin-top: 18px;
}

/* ---------- Responsive ---------- */
@media (max-width: 520px){
  .card{ padding: 16px; }
  .btn{ width: 100%; justify-content: center; text-align: center; }
  .button-row{ gap: 10px; }
}

.site-container{
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header{
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(155, 192, 172, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(226,232,240,0.8);
  border-radius: 10px;
  margin-bottom: 20px;
}

/* 📱 Mobile */
@media (max-width: 400px){
  .site-header{
    border-radius: 0;        /* cleaner on mobile */
    margin-bottom: 10px;
  }
}

.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand{
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.02em;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.brand span{
  font-size: 16px;
}

.nav{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 auto;            /* centers nav container */
  width: fit-content;        /* shrink to content */
}

.nav-link{
  text-decoration: none;
  color: var(--muted);
  font-weight: 650;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: 0.15s;
  font-size: xx-large;
}

/* 📱 Mobile screens */
@media (max-width: 600px){
  .nav-link{
    font-size: small;   /* choose size you like */
    padding: 6px 10px; /* optional: smaller padding */
  }
}

.nav-link:hover{
  color: var(--text);
  background: rgba(226,232,240,0.6);
  border-color: rgba(226,232,240,0.9);
}

.nav-link.active{
  color: var(--text);
  background: rgba(17,24,39,0.06);
  border-color: rgba(17,24,39,0.10);
}

.site-footer{
  margin-top: 24px;
  padding: 18px 0 26px;
  color: var(--muted);
  font-size: 13px;
}

.footer-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links a{
  color: var(--muted);
  text-decoration: none;
  font-weight: 650;
}

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

.page-card{
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.98));
  border: 1px solid rgba(226,232,240,0.85);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.page-title{
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.feature-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.feature{
  border: 1px solid rgba(226,232,240,0.9);
  border-radius: 14px;
  padding: 14px;
  background: #f8fafc;
}

.feature h3{
  margin: 0 0 6px;
}

.about-list{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

.about-item{
  border: 1px solid rgba(226,232,240,0.9);
  border-radius: 14px;
  padding: 14px;
  background: #f8fafc;
}

.about-item h3{
  margin: 0 0 8px;
}

@media (max-width: 720px){
  .feature-grid{ grid-template-columns: 1fr; }
}

.logo{
  height: 100px;
  width: auto;
  margin-right: 8px;
  margin-left: 20px;
  vertical-align: middle;
}

.brand{
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== Intro Hero ===== */
.hero{
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 18px;
  margin-top: 18px;
}

.hero-content{
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.98));
  border: 1px solid rgba(226,232,240,0.85);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}

.hero-kicker{
  display: inline-block;
  margin: 0 0 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(17,24,39,0.06);
  border: 1px solid rgba(17,24,39,0.08);
  color: var(--text);
  font-weight: 750;
  font-size: 13px;
}

.hero-title{
  margin: 0 0 10px;
  font-size: clamp(28px, 3.2vw, 44px);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero-subtitle{
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15.5px;
  max-width: 60ch;
}

.hero-actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.hero-badges{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.badge{
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(226,232,240,0.95);
  background: #f8fafc;
  color: var(--text);
  font-weight: 650;
  font-size: 13px;
}

/* Right-side panel */
.hero-panel{
  display: grid;
  gap: 12px;
  align-content: start;
}

.hero-panel-card{
  background: #ffffff;
  border: 1px solid rgba(226,232,240,0.9);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.06);
  padding: 16px;
}

.hero-panel-row{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.hero-panel-text{
  font-weight: 750;
  color: var(--text);
}

.hero-panel-result{
  font-weight: 850;
  font-size: 18px;
  margin-bottom: 6px;
}

.hero-panel-result.ok{
  color: #065f46;
}

.hero-panel-result.warn{
  color: #9f1239;
}

.hero-panel-mini{
  font-size: 13px;
}

.dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-green{ background: #10b981; }
.dot-amber{ background: #f59e0b; }

/* Responsive */
@media (max-width: 900px){
  .hero{ grid-template-columns: 1fr; }
}

/* ===== Brand Showcase Section ===== */

.brand-showcase{
  margin-top: 26px;
  padding: 40px 20px;
  text-align: center;

  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.85),
    rgba(255,255,255,0.95)
  );

  border: 1px solid rgba(226,232,240,0.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.brand-showcase-inner{
  max-width: 500px;
  margin: 0 auto;
}

.brand-showcase-logo{
  height: 200px;
  width: auto;
  margin-bottom: 14px;
}

.brand-showcase-tagline{
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* ===== How It Works ===== */
.how-it-works{
  margin-top: 22px;
  padding: 26px;
  background: #ffffff;
  border: 1px solid rgba(226,232,240,0.85);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.06);
}

.how-header{
  margin-bottom: 14px;
}

.section-heading{
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.how-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.how-card{
  border: 1px solid rgba(226,232,240,0.9);
  background: #f8fafc;
  border-radius: 16px;
  padding: 16px;
}

.how-icon{
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(17,24,39,0.06);
  border: 1px solid rgba(17,24,39,0.08);
  margin-bottom: 10px;
  font-size: 20px;
}

.how-title{
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.how-text{
  margin: 0;
  font-size: 14px;
}

.how-cta{
  margin-top: 16px;
  display: flex;
  justify-content: flex-start;
}

/* Responsive */
@media (max-width: 900px){
  .how-grid{ grid-template-columns: 1fr; }
  .how-cta{ justify-content: stretch; }
  .how-cta .btn{ width: 100%; text-align: center; }
}

/* ===== Environmental Impact Section ===== */

.impact-section{
  margin-top: 26px;
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid rgba(226,232,240,0.85);
  background: linear-gradient(
    180deg,
    rgba(16,185,129,0.06),
    rgba(255,255,255,0.95)
  );
  box-shadow: 0 10px 24px rgba(2,6,23,0.06);
}

.impact-content{
  max-width: 760px;
  margin: 0 auto;
}

.impact-title{
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.impact-lead{
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 15px;
}

.impact-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.impact-card{
  background: white;
  border: 1px solid rgba(226,232,240,0.9);
  border-radius: 14px;
  padding: 16px;
}

.impact-icon{
  font-size: 26px;
  margin-bottom: 8px;
}

.impact-card h3{
  margin: 0 0 6px;
  font-size: 16px;
}

.impact-footer{
  margin-top: 18px;
  font-weight: 650;
  color: var(--text);
  text-align: center;
}

/* responsive */
@media (max-width: 900px){
  .impact-grid{
    grid-template-columns: 1fr;
  }
}

/* ===== Professional Footer ===== */

.site-footer{
  margin-top: 40px;
  padding: 28px 0 32px;
  border-top: 1px solid rgba(226,232,240,0.8);
  background: rgba(247,250,252,0.6);
}

.footer-inner{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-left{
  max-width: 420px;
}

.footer-project{
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.footer-meta{
  margin: 4px 0;
  color: var(--muted);
  font-size: 13px;
}

.footer-right{
  text-align: right;
}

.footer-links{
  margin: 0 0 6px;
}

.footer-links a{
  color: var(--muted);
  text-decoration: none;
  font-weight: 650;
}

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

.footer-copy{
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* mobile */
@media (max-width: 640px){
  .footer-inner{
    flex-direction: column;
    text-align: left;
  }

  .footer-right{
    text-align: left;
  }
}

/* ===== AI Model Section ===== */

.model-section{
  margin-top: 26px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid rgba(226,232,240,0.85);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(2,6,23,0.06);
}

.model-stats{
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.model-card{
  border: 1px solid rgba(226,232,240,0.9);
  border-radius: 14px;
  padding: 16px;
  background: #f8fafc;
}

.model-card h3{
  margin: 0 0 6px;
  font-size: 16px;
}

.model-note{
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
}

/* responsive */
@media (max-width: 900px){
  .model-stats{
    grid-template-columns: 1fr;
  }
}

/* ================================
   About: Comparison (Standout)
================================ */
.compare-section{
  margin-top: 26px;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(226,232,240,0.85);
  background:
    radial-gradient(900px 300px at 0% 0%, rgba(16,185,129,0.12), transparent 60%),
    radial-gradient(900px 300px at 100% 0%, rgba(59,130,246,0.12), transparent 60%),
    #ffffff;
  box-shadow: 0 14px 34px rgba(2,6,23,0.08);
}

.compare-header{
  margin-bottom: 14px;
}

.compare-title{
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.compare-subtitle{
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  max-width: 70ch;
}

.compare-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.compare-card{
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(226,232,240,0.9);
  background: #f8fafc;
}

.compare-card-title{
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 850;
}

.compare-list{
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.compare-list li{
  margin: 8px 0;
}

.compare-card--plain{
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.compare-card--bingenie{
  background: linear-gradient(180deg, rgba(17,24,39,0.92), rgba(2,6,23,0.98));
  color: #ffffff;
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 18px 40px rgba(2,6,23,0.18);
}

.compare-card--bingenie .compare-list{
  color: rgba(255,255,255,0.78);
}

.compare-highlight{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.compare-pill{
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.16);
  font-size: 13px;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 900px){
  .compare-grid{ grid-template-columns: 1fr; }
}


/* ================================
   About: Future Vision (Standout)
================================ */
.future-section{
  margin-top: 26px;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(226,232,240,0.85);
  background: linear-gradient(180deg, rgba(17,24,39,0.05), rgba(255,255,255,0.95));
  box-shadow: 0 14px 34px rgba(2,6,23,0.08);
}

.future-header{
  margin-bottom: 14px;
}

.future-title{
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.future-subtitle{
  margin: 0;
  max-width: 75ch;
}

.future-timeline{
  margin-top: 16px;
  display: grid;
  gap: 12px;
  position: relative;
}

.future-step{
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(226,232,240,0.9);
  background: #ffffff;
}

.future-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  border-radius: 999px;
  font-weight: 850;
  font-size: 13px;
  letter-spacing: -0.01em;
  border: 1px solid rgba(17,24,39,0.10);
  background: rgba(17,24,39,0.06);
  color: var(--text);
}

.future-body h3{
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 850;
}

.future-body p{
  margin: 0;
}

.future-cta{
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(148,163,184,0.6);
}

/* Responsive */
@media (max-width: 620px){
  .future-step{
    grid-template-columns: 1fr;
  }
  .future-badge{
    width: fit-content;
    padding: 0 12px;
  }
}

/* ================================
   Creator Spotlight (Fancy)
================================ */

.creator-section{
  margin-top: 28px;
  display: flex;
  justify-content: center;
}

.creator-card{
  width: 100%;
  max-width: 850px;
  text-align: center;
  padding: 32px 28px;
  border-radius: 24px;

  background:
    linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.98));

  border: 1px solid rgba(226,232,240,0.8);
  box-shadow: 0 20px 50px rgba(2,6,23,0.12);

  position: relative;
  overflow: hidden;
}

/* subtle glow */
.creator-card::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right,
    rgba(16,185,129,0.18),
    transparent 60%);
  pointer-events: none;
}

/* logo */
.creator-logo{
  height: 42px;
  margin-bottom: 12px;
  opacity: 0.9;
}

/* photo */
.creator-photo{
  width: 140px;
  height: 140px;
  object-fit: cover;
  object-position: 50% 1%;  /* move crop upward */ 
  border-radius: 50%;
  display: block;            /* ensures proper centering */
  margin: 10px auto 14px;

  border: 4px solid white;
  box-shadow: 0 12px 28px rgba(2,6,23,0.15);
  transition: transform 0.3s ease;
}

.creator-photo:hover{
  transform: scale(1.05);
}

/* name */
.creator-name{
  margin: 8px 0 4px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

/* role */
.creator-role{
  margin: 0 0 14px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

/* bio */
.creator-bio{
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
  max-width: 420px;
  margin: 0 auto;
}

/* responsive */
@media (max-width: 600px){
  .creator-photo{
    width: 120px;
    height: 120px;
  }
}

/* ===== Fancy JS UI: Toasts + Loading Overlay ===== */
#toastHost{
  position: fixed;
  right: 16px;
  top: 78px;
  display: grid;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast{
  pointer-events: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .25s ease, transform .25s ease;
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid rgba(226,232,240,0.9);
  box-shadow: 0 12px 28px rgba(2,6,23,0.14);
  background: rgba(255,255,255,0.95);
  color: var(--text);
}

.toast--show{
  opacity: 1;
  transform: translateY(0);
}

.toast--success{
  border-color: rgba(16,185,129,0.35);
  background: rgba(236,253,245,0.9);
}

.toast--error{
  border-color: rgba(244,63,94,0.35);
  background: rgba(255,241,242,0.92);
}

.toast--info{
  border-color: rgba(59,130,246,0.30);
  background: rgba(239,246,255,0.92);
}

#loadingOverlay{
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,0.38);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

#loadingOverlay.show{
  display: flex;
}

.loadingCard{
  width: min(520px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(226,232,240,0.9);
  box-shadow: 0 20px 60px rgba(2,6,23,0.25);
}

.spinner{
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 3px solid rgba(15,23,42,0.18);
  border-top-color: rgba(15,23,42,0.85);
  animation: spin 0.9s linear infinite;
}

.loadingTitle{
  font-weight: 900;
  letter-spacing: -0.01em;
}

.loadingSub{
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}

@keyframes spin{
  to{ transform: rotate(360deg); }
}

/* Progress bar */
.progressWrap{ margin-top: 10px; }
.progressBar{
  height: 10px;
  border-radius: 999px;
  background: rgba(15,23,42,0.10);
  overflow: hidden;
  border: 1px solid rgba(226,232,240,0.9);
}
.progressFill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(16,185,129,0.95), rgba(14,165,233,0.95));
  transition: width .14s ease;
}
.progressMeta{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 800;
}

/* Confetti canvas */
#confettiCanvas{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
}