/* ============================================================
   FASTCHARGE PORTAL — THEME + LAYOUT
   ============================================================ */

/* -------------- Base & fonts -------------- */
:root{
  --accent:#0B84FF;
  --accent-2:#00D084;
  --bg-dark-1:#0a0f14;
  --bg-dark-2:#0b141b;
  --card:#0D131A;
  --muted:#A8B3C2;
  --white:#E6EEF3;
  --glass: rgba(255,255,255,0.04);
}

/* ===== Theme classes (body) ===== */
body.dark-bg {
    background: radial-gradient(circle at top, #0a0f14, #0b141b, #0e181f);
    color: var(--white);
    font-family: "Segoe UI", sans-serif;
    margin: 0;
    padding: 0;
    transition: background 400ms ease, color 300ms ease;
}
body.light-bg {
    background: linear-gradient(180deg, #f6fbff, #e9f7ff);
    color: #0b1720;
    font-family: "Segoe UI", sans-serif;
    margin: 0;
    padding: 0;
    transition: background 400ms ease, color 300ms ease;
}

/* ===== Portal card ===== */
.portal-card {
    background: rgba(20, 28, 36, 0.85);
    border-radius: 14px;
    padding: 20px 22px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    color: var(--white);
    transition: background 350ms ease, color 250ms ease, transform 220ms ease;
}
body.light-bg .portal-card {
    background: rgba(255,255,255,0.9);
    color: #082430;
    box-shadow: 0 10px 36px rgba(12, 30, 40, 0.08);
}

/* header row */
.top-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.portal-logo { width: 180px; height:auto; display:inline-block; }
.theme-toggle button {
    background: transparent; border:none; font-size:18px; cursor:pointer; padding:6px 10px; border-radius:8px;
    transition: transform 150ms ease, background 200ms ease;
}
.theme-toggle button:hover { transform: scale(1.06); background: rgba(255,255,255,0.03); }

/* welcome */
h2 { margin:10px 0 4px; font-size:20px; }
.info { color:var(--muted); margin-bottom:14px; }

/* battery card */
.battery-box {
    border-radius: 12px;
    padding: 14px;
    background: rgba(255,255,255,0.02);
    transition: box-shadow 240ms ease, transform 220ms ease;
}
body.light-bg .battery-box { background: rgba(6,20,30,0.03); }

/* battery head */
.battery-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.battery-label { font-size:0.95rem; opacity:0.9; }
.battery-percent { font-weight:800; font-size:1.4rem; }

/* visual */
.battery-visual-wrap { padding:6px 0; }
.battery-visual {
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(0,0,0,0.06));
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.03);
}
body.light-bg .battery-visual { background: linear-gradient(90deg, rgba(0,0,0,0.03), rgba(0,0,0,0.06)); border: 1px solid rgba(0,0,0,0.06); }

/* fill */
.battery-fill {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 900ms cubic-bezier(.2,.9,.2,1), filter 400ms ease;
    box-shadow: 0 6px 20px rgba(11,132,255,0.12) inset;
}

/* glow */
.battery-glow {
    position:absolute; right:0; top: -40%; width: 120px; height: 120px;
    pointer-events:none; filter: blur(30px); opacity: 0.09; transition: opacity 420ms ease;
    background: radial-gradient(circle, rgba(11,132,255,0.9) 0%, rgba(0,208,132,0.6) 50%, rgba(0,0,0,0) 70%);
}

/* spark animation */
.battery-spark {
    position:absolute; right:6px; top:4px; width:14px; height:14px; border-radius:50%; background:rgba(255,255,255,0.06);
    opacity:0; transform: scale(0.6);
}
.spark-animate {
    animation: sparkPop 820ms ease;
    opacity:1;
}
@keyframes sparkPop {
    0% { transform: scale(0.4); opacity:0.0; }
    40% { transform: scale(1.3); opacity:1; }
    100% { transform: scale(1); opacity:0; }
}

/* low/high states */
.low-battery { box-shadow: 0 8px 28px rgba(255,80,80,0.06); }
.high-battery { box-shadow: 0 8px 28px rgba(0,208,132,0.06); }

/* AI estimate text */
.ai-estimate { margin-top:8px; color:var(--muted); font-size:0.92rem; }

/* Request button */
.request-btn {
    margin-top:12px;
    width:100%;
    padding:12px;
    border-radius:10px;
    background: var(--accent);
    color: white;
    border: none;
    cursor:pointer;
    font-weight:700;
    transition: transform 150ms ease, background 200ms ease;
}
.request-btn:hover { transform: translateY(-2px); background: #1C9BFF; }

/* small links */
.small-link { color: rgba(255,255,255,0.75); font-size:0.92rem; text-decoration:none; }
body.light-bg .small-link { color: #0b1720; }

/* flash */
.flash { padding:10px; border-radius:8px; background:var(--accent); color:#fff; margin-bottom:10px; }

/* notification bubbles (in-page) */
.notif-wrap { position:fixed; right:20px; bottom:20px; z-index:9999; }
.inpage-notif {
    background: rgba(20,28,36,0.96);
    color: #fff;
    padding:10px 14px;
    border-radius:10px;
    margin-top:8px;
    opacity:0; transform: translateY(8px) scale(0.98);
    transition: all 280ms cubic-bezier(.2,.9,.2,1);
    box-shadow: 0 12px 36px rgba(0,0,0,0.35);
}
.inpage-notif.visible { opacity:1; transform: translateY(0) scale(1); }
.inpage-notif.success { background: linear-gradient(90deg,#00D084,#00B86B); color:#031114; }

/* responsive */
@media (max-width:600px) {
    .portal-card { padding:16px; }
    .portal-logo { width:140px; }
    .battery-visual { height:28px; }
    .battery-percent { font-size:1.2rem; }
}

/* small accessibility */
[role="progressbar"] { outline: none; }

/* a few helpers for light theme overrides */
body.light-bg .inpage-notif { background:#ffffff; color:#082430; box-shadow: 0 8px 20px rgba(14,30,40,0.06); }