:root {
  color-scheme: dark;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #04101f;
  color: #edf2f7;
  --primary: #2a8df0;
  --primary-soft: rgba(42,141,240,0.16);
  --surface: rgba(10,24,51,0.88);
  --surface-strong: rgba(8,20,41,0.96);
  --border: rgba(255,255,255,0.08);
  --text-muted: #94a3b8;
  --shadow: 0 30px 80px rgba(0,0,0,0.35);
}

body {
  background: radial-gradient(circle at top, rgba(42,141,240,0.16), transparent 32%), #04101f;
  min-height: 100vh;
}

.top-banner {
  background: linear-gradient(90deg, rgba(42,141,240,0.18), rgba(67,56,202,0.18));
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.top-banner a { color: #cbd5e1; text-decoration: none; }
.top-banner a:hover { color: #ffffff; }

.main-header { background: rgba(4,16,31,0.98); }
.brand-logo {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}
.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #2a8df0, #6d5bff);
  color: #fff;
  font-weight: 800;
}
.brand-title { display:block; font-size: 0.96rem; letter-spacing: .05em; }
.brand-subtitle { display:block; font-size: 0.75rem; color: #94a3b8; }

.search-bar { min-width: 430px; }
.category-dropdown .dropdown-menu { background: rgba(8,20,41,0.95); border: 1px solid rgba(255,255,255,0.08); }
.category-dropdown .dropdown-item { color: #e2e8f0; }
.category-dropdown .dropdown-item:hover { background: rgba(42,141,240,0.12); }

.icon-btn { color: #cbd5e1; font-size: 1.2rem; text-decoration: none; position: relative; }
.icon-btn:hover { color: #ffffff; }

.main-header .navbar-nav .nav-link { color: #cbd5e1; transition: color .2s; }
.main-header .navbar-nav .nav-link:hover, .main-header .navbar-nav .nav-link.active { color: #ffffff; }

.glass-panel {
  background: rgba(10,24,51,0.82);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.section-title { font-size: 0.95rem; text-transform: uppercase; letter-spacing: .15em; color: #8b97b0; }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .15em; color: #94a3b8; font-size: .8rem; }

.hero-card { background: linear-gradient(180deg, rgba(10,24,51,0.95), rgba(3,9,26,0.95)); }
.hero-card .display-5 { font-size: clamp(2.5rem, 4vw, 3.5rem); line-height: 1.05; }
.hero-image-wrap { position: relative; }
.hero-phone { width: 100%; max-width: 320px; margin-top: 1rem; }
.highlight-panel { background: linear-gradient(180deg, rgba(42,141,240,0.18), rgba(10,24,51,0.9)); }
.sale-timer { background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.06)); }
.countdown { font-size: 1.4rem; font-weight: 700; letter-spacing: .05em; }

.flash-sale-section { background: linear-gradient(135deg, #0b1b36, #071426 75%); }
.sale-card { transition: transform .25s ease, box-shadow .25s ease; }
.sale-card:hover { transform: translateY(-8px); box-shadow: 0 30px 80px rgba(0,0,0,0.32); }
.sale-card .price { font-size: 1.1rem; font-weight: 700; }

.glass-panel h5, .glass-panel h6 { color: #fff; }
.feature-list li { margin-bottom: .5rem; color: #cbd5e1; }
.feature-list li::before { content: '•'; margin-right:.6rem; color: #2a8df0; }

.video-card { background: #0b172f; border: 1px solid rgba(255,255,255,0.08); }
.video-meta h6 { margin-bottom: .5rem; }
.video-meta span { font-size: .95rem; }

.app-preview-section { background: #061123; }
.app-preview-device { max-width: 420px; border: 1px solid rgba(255,255,255,0.08); background: rgba(4,16,31,0.86); padding: 1rem; }

.dashboard-section { background: linear-gradient(180deg, #04101f, #0b1b36 65%); }
.dashboard-metric, .admin-stat { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 18px; padding: 1rem; text-align: center; }
.dashboard-metric .metric-value { display: block; font-size: 1.8rem; font-weight: 700; color: #ffffff; }
.dashboard-metric .metric-label, .admin-stat .stat-label { color: #94a3b8; font-size: .85rem; }
.analytics-graph { height: 180px; background: linear-gradient(135deg, rgba(42,141,240,0.22), rgba(106,17,203,0.18)); border-radius: 22px; }

.site-footer { background: #020b18; }
.site-footer h5, .site-footer h6 { color: #ffffff; }
.footer-links a { color: #94a3b8; text-decoration: none; }
.footer-links a:hover { color: #ffffff; }

.footer-bottom a { color: #94a3b8; }
.footer-bottom a:hover { color: #ffffff; }

@media (max-width: 992px) {
  .search-bar { min-width: 260px; }
}

@media (max-width: 768px) {
  .top-banner { flex-direction: column; align-items: flex-start; gap: .75rem; }
  .hero-section .row { flex-direction: column-reverse; }
  .hero-card { padding: 2rem 1.5rem; }
}

/* Homepage specific layout */
body.homepage { background: #f8fafc; color: #0f172a; }
body.homepage .topbar { background: #ffffff; color: #0f172a; }
body.homepage .main-header { background: #ffffff; border-bottom: 1px solid #e8edf6; box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08); }
body.homepage .brand-logo { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px; background: #ffffff; overflow: hidden; }
body.homepage .brand-logo img { width: 100%; height: 100%; object-fit: contain; }

/* Service worker update banner */
.sw-update-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 20px;
  z-index: 2200;
  background: rgba(18, 25, 40, 0.98);
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  display: none;
}
.sw-update-banner .btn { margin-left: 8px; }

/* AUTH PAGES */
.auth-page { min-height: 72vh; display: grid; place-items: center; padding: 3rem 1rem; }
.auth-card.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; width: min(1000px, 96%); }
.auth-card.centered { width: min(720px, 96%); }
.auth-left { padding: 2rem; display:flex; flex-direction:column; gap:1.5rem; justify-content:center; }
.brand-block { color: #fff; }
.brand-img { width:90px; height:90px; }
.promo-image { background: radial-gradient(circle at top left, rgba(42,141,240,0.16), transparent 20%), linear-gradient(135deg,#0ea5e9,#7c3aed); border-radius:12px; min-height:220px; box-shadow: 0 20px 60px rgba(12,18,40,0.45); }
.auth-right { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); }

.btn-gradient { background: linear-gradient(90deg,#7c3aed,#06b6d4); border: none; color:#fff; padding: .6rem 1rem; border-radius:10px; box-shadow: 0 8px 30px rgba(124,58,237,0.18); transition: transform .18s ease, box-shadow .18s ease; }
.btn-gradient:hover { transform: translateY(-3px); box-shadow: 0 18px 50px rgba(6,182,212,0.14); }

.divider { text-align:center; color: #94a3b8; margin: 1rem 0; }
.social-login .social { flex:1; }

.pw-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: transparent; border: none; color: #94a3b8; }
.pw-strength { font-weight:600; }

@media (max-width: 900px) {
  .auth-card.split { grid-template-columns: 1fr; }
  .auth-left { order: 2; }
  .auth-right { order: 1; }
}

/* Light/dark mode helpers */
body.light-mode .auth-right { background: rgba(255,255,255,0.9); color: #0f172a; }
body.dark-mode .auth-right { background: rgba(8,10,20,0.6); color: #f8fafc; }
body.homepage .brand-title { font-size: 1rem; font-weight: 700; color: #0f172a; }
body.homepage .brand-subtitle { font-size: 0.85rem; color: #64748b; }
body.homepage .search-bar form { width: 100%; }
body.homepage .search-bar .form-control { border-radius: 999px 0 0 999px; border: 1px solid #dbe4f0; height: 50px; }
body.homepage .search-bar .btn { border-radius: 0 999px 999px 0; height: 50px; }
body.homepage .header-actions { gap: 0.75rem; }
body.homepage .action-link { color: #334155; text-decoration: none; font-weight: 600; padding: 0.65rem 1rem; border-radius: 999px; background: #f8fafc; transition: background .2s ease; }
body.homepage .action-link:hover { background: #eef2ff; }
body.homepage .cart-badge { position: absolute; top: 0; right: -8px; background: #2563eb; color: #ffffff; border-radius: 999px; padding: 0.15rem 0.45rem; font-size: 0.72rem; }
body.homepage .home-nav { background: #f8fafc; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; }
body.homepage .nav-menu .nav-link { color: #475569; font-weight: 600; transition: color .2s ease; }
body.homepage .nav-menu .nav-link:hover, body.homepage .nav-menu .nav-link.active { color: #0f172a; }
body.homepage .nav-badges .badge-soft { background: #eff6ff; color: #2563eb; border-radius: 999px; padding: 0.65rem 0.9rem; font-weight: 600; }
body.homepage .hero-section { background: #f8fafc; padding-bottom: 3rem; }
body.homepage .hero-title { font-size: clamp(2.8rem, 5vw, 4.4rem); line-height: 1.03; letter-spacing: -0.03em; color: #0f172a; }
body.homepage .hero-section .lead { color: #475569; }
body.homepage .hero-stats { gap: 1rem; }
body.homepage .hero-stat { background: #ffffff; border-radius: 18px; padding: 1.1rem 1.2rem; box-shadow: 0 18px 40px rgba(15,23,42,0.05); min-width: 160px; }
body.homepage .hero-stat strong { display: block; font-size: 1.2rem; margin-bottom: 0.35rem; color: #0f172a; }
body.homepage .hero-visual { position: relative; max-width: 520px; margin: 0 auto; }
body.homepage .hero-phone { width: 100%; border-radius: 30px; }
body.homepage .hero-card-glow { position: absolute; inset: 0; background: radial-gradient(circle at top, rgba(42,141,240,0.15), transparent 45%); pointer-events: none; }
body.homepage .hero-overlay-card { position: absolute; width: 180px; background: #ffffff; border-radius: 22px; padding: 1rem; box-shadow: 0 24px 60px rgba(15,23,42,0.08); }
body.homepage .hero-overlay-card.card-flash { top: 16%; left: -8%; }
body.homepage .hero-overlay-card.card-wallet { bottom: 8%; right: 0; }
body.homepage .hero-overlay-card .badge-soft { background: #eff6ff; color: #2563eb; }
body.homepage .category-strip { justify-content: center; }
body.homepage .category-pill { border-radius: 999px; padding: 0.85rem 1.2rem; background: #ffffff; color: #0f172a; text-decoration: none; box-shadow: 0 18px 40px rgba(15,23,42,0.04); transition: transform .2s ease; display: inline-flex; align-items: center; gap: 0.5rem; }
body.homepage .category-pill:hover { transform: translateY(-4px); }
body.homepage .flash-deals { background: #ffffff; }
body.homepage .section-header h2 { margin: 0.25rem 0 0; font-size: 2rem; color: #0f172a; }
body.homepage .deal-countdown { background: #eff6ff; color: #2563eb; border-radius: 999px; padding: 0.6rem 1rem; font-weight: 700; }
body.homepage .deal-card { border: 1px solid #e2e8f0; transition: transform .25s ease, box-shadow .25s ease; }
body.homepage .deal-card:hover { transform: translateY(-10px); box-shadow: 0 30px 80px rgba(15,23,42,0.08); }
body.homepage .deal-label { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 36px; border-radius: 999px; background: #eff6ff; color: #2563eb; font-weight: 700; margin-bottom: 1rem; }
body.homepage .deal-card h5 { margin-bottom: 0.65rem; }
body.homepage .rating { color: #f59e0b; font-size: 0.95rem; }
body.homepage .video-showcase { background: #f8fafc; }
body.homepage .video-panel { border: 1px solid #e2e8f0; }
body.homepage .video-card { border: 1px solid #e2e8f0; overflow: hidden; background: #ffffff; }
body.homepage .video-meta { background: #ffffff; }
body.homepage .feature-grid { background: #ffffff; }
body.homepage .feature-card { background: #f8fafc; border: 1px solid #e2e8f0; }
body.homepage .newsletter { background: #0f172a; }
body.homepage .newsletter h2 { font-size: clamp(2.2rem, 3vw, 2.8rem); }
body.homepage .newsletter-form input { border-radius: 999px; max-width: 420px; }
body.homepage .newsletter-form button { border-radius: 999px; }
body.homepage .text-muted { color: #64748b !important; }
@media (max-width: 992px) {
  body.homepage .topbar { flex-direction: column; align-items: stretch; }
  body.homepage .search-bar { order: 3; }
  body.homepage .header-actions { justify-content: space-between; }
  body.homepage .home-nav { flex-direction: column; align-items: stretch; }
}
@media (max-width: 768px) {
  body.homepage .hero-section { padding-bottom: 2rem; }
  body.homepage .hero-visual { max-width: 100%; }
  body.homepage .hero-overlay-card.card-flash { left: 0; top: -20px; width: calc(100% - 40px); }
  body.homepage .hero-overlay-card.card-wallet { right: auto; left: 0; bottom: -20px; width: calc(100% - 40px); }
  body.homepage .hero-stats { flex-direction: column; }
  body.homepage .category-pill { flex: 1 1 auto; }
  body.homepage .nav-menu { justify-content: center; }
  body.homepage .header-actions { justify-content: center; }
  body.homepage .deal-card { min-height: auto; }
  body.homepage .feature-card { text-align: left; }
  body.homepage .newsletter-form { flex-direction: column; }
}
