/* ===== Theme Tokens ===== */
/* Prevent transition during the initial theme set */
.theme-init, .theme-init * {
  transition: none !important;
}

/* 🌞 Light Theme (default when no data-theme="dark") */
:root {
  --bg: #ffffff;
  --text: #000000;
  --muted: #6b7280;
  --card: rgba(255, 255, 255, 0.423);
  --card-text: #1f2937;
  --card-alt: #f9fafb;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --surface: #f9fafb;
  --surface-hover: #e5e7eb;
  --border: #4b478b;
  --shadow: 0 4px 10px rgba(0,0,0,0.10);
  --pill-bg: #ffffff;
  --popup: rgba(18,18,18,0.2);
}

/* 🌚 Dark Theme */
[data-theme="dark"] {
  --bg: #121212;
  --text: #e5e7eb;
  --muted: #9aa4b2;
  --card: rgba(0, 0, 0, 0.45);
  --card-text: #f3f4f6;
  --card-alt: #2a2a2a;
  --accent: #60a5fa;
  --accent-hover: #3b82f6;
  --surface: #1e293b;
  --surface-hover: #2a3a55;
  --border: #955bec;
  --shadow: 0 4px 10px rgba(255,255,255,0.06);
  --pill-bg: #121212;
  --popup: rgba(255,255,255,0.1);
}


/* ===== Base ===== */
*{ box-sizing:border-box; }
body{
  margin:0; padding:0;
  font-family:'Segoe UI', Tahoma, sans-serif;
  background:var(--bg); color:var(--text);
  transition:none; width:100%;
}

body {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

/* === Page Background Layer for Glass Effect === */
body {
  background: radial-gradient(
      circle at top left,
      rgba(100, 100, 255, 0.12),
      transparent 60%
    ),
    linear-gradient(
      180deg,
      rgba(18, 18, 18, 0.95),
      rgba(10, 10, 10, 0.98)
    );
  background-attachment: scroll;   /* no fixed */
  background-size: cover;
}
header,
.mobile-nav-inner,
.glass-card {
  backdrop-filter: blur(7px) saturate(140%);
  -webkit-backdrop-filter: blur(7px) saturate(140%);
}

html[data-theme="light"] body {
  background: linear-gradient(180deg, #f0f4ff, #e4e9f7);
}

main {
  opacity: 0;
  filter: blur(8px);
}
/* ensure main is visible */
html.loaded main {
  opacity: 1 !important;
  filter: none !important;
  transition: opacity .25s ease-in-out;
}


/* ===== Header / Navbar ===== */
/* ===== Header / Navbar (Frosted Glass) ===== */
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1200;
  border-radius: 10px;

  /* 🌫️ Frosted Glass Effect */
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45),
              0 0 20px rgba(255, 255, 255, 0.05) inset;
  transition: all 0.3s ease;
}

/* 🌞 Light mode variation */
[data-theme="light"] header {
  background: rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.header-top{ display:flex; justify-content:space-between; align-items:center; width:100%; }
.header-top,.icon-row{ width:min(1100px,92%); margin:0 auto; }
.nav-right{ display:flex; align-items:center; gap:10px; font-weight:bold; color:var(--accent); }
.icon-row{ display:flex; justify-content:center; gap:30px; font-size:1.5rem; margin-top:8px; }
.icon-row a{ text-decoration:none; color:var(--text); transition:color .2s; }
.icon-row a:hover{ color:var(--accent); }
.notif-badge{
  position:absolute; top:-5px; right:-10px; background:#ef4444; color:#fff;
  font-size:.7rem; padding:2px 5px; border-radius:999px;
}

/* ===== Theme Toggle ===== */
/* ===== Theme Toggle (Animated) ===== */
.theme-toggle {
  position: relative;
  width: 56px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: background .4s ease, box-shadow .3s ease;
}
.theme-toggle:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* light icon */
.theme-toggle::before {
  content: '☀️';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  color: #fbbf24;
  transition: transform .45s ease, background .3s ease, color .3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

/* dark icon */
[data-theme="dark"] .theme-toggle {
  background: linear-gradient(135deg, #1f2937, #374151);
}
[data-theme="dark"] .theme-toggle::before {
  content: '🌙';
  transform: translateX(28px) rotate(360deg);
  background: #475569;
  color: #fff;
}


/* ===== Flash Messages ===== */
.flashes{ margin:12px 20px; }
.flash{
  text-align:center; background:rgba(220,53,69,.10); border-left:4px solid #dc3545;
  padding:10px; margin:6px 0; border-radius:6px; color:#c0392b;
}
.flash-success{ background:rgba(25,135,84,.10); border-left-color:#198754; color:#0f5132; }
.flash-info{ background:rgba(13,110,253,.10); border-left-color:#0d6efd; color:#084298; }
.flash-warning{ background:rgba(255,193,7,.12); border-left-color:#ffc107; color:#664d03; }
.flash-error,.flash-danger{ background:rgba(220,53,69,.10); border-left-color:#dc3545; color:#842029; }

/* ===== Buttons (mobile-first, tappable) ===== */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:5px; padding:8px 14px; border-radius:10px;
  font-weight:700; font-size:.95rem; line-height:1; text-decoration:none;
  border:1px solid transparent; cursor:pointer; user-select:none;
  background:var(--surface); color:var(--text);
  transition:transform .15s, background .2s, border-color .2s, color .2s;
}
.btn:hover{ transform:translateY(-2px); }
.btn:active{ transform:translateY(0); }

/* sizes */
.btn.sm{ padding:7px 12px; border-radius:10px; font-size:.9rem; }
.btn.xs{ padding:6px 10px; border-radius:10px; font-size:.85rem; }
.btn.block{ display:flex; width:100%; }

/* variants */
.btn.primary{ background:var(--accent); color:#fff; }
.btn.primary:hover{ background:var(--accent-hover); color:#fff; }
.btn.success{ background:#22c55e; color:#fff; border-color:#16a34a; }
.btn.success:hover{ background:#16a34a; color:#fff; }
.btn.neutral{ background:var(--card); border-color:var(--border); color:var(--text); }
.btn.neutral:hover{ background:var(--surface-hover); }
.btn.outline{ background:transparent; border-color:var(--border); color:var(--text); }
.btn.outline:hover{ background:var(--surface-hover); }

/* icon-only */
.btn.icon{ padding:8px; width:38px; height:38px; }

/* ===== Inputs & selects ===== */
input[type="text"], input[type="search"], select{
  padding:10px 12px; border-radius:10px; border:1px solid var(--border);
  background:var(--card); color:var(--text); font-size:1rem;
  transition:border-color .2s, box-shadow .2s;
}
input:focus, select:focus{
  outline:none; border-color:var(--accent); box-shadow:0 0 0 2px rgba(59,130,246,.25);
}

/* ===== Cards & text helpers ===== */
.card{
  background:var(--card); color:var(--card-text);
  border:1px solid var(--border); border-radius:14px; box-shadow:var(--shadow);
  padding:12px;
}
.muted{ color:var(--muted); }

/* ===== Logo w/ sparkle ===== */
.logo-link{ display:inline-flex; text-decoration:none; color:inherit; }
.logo-mark{ display:grid; line-height:1; }
.logo-top{ display:flex; align-items:center; gap:6px; }
.cap-icon{ font-size:1.1rem; color:var(--accent); }
.logo-pro{ font-size:16px; font-weight:900; letter-spacing:.3px; }
.logo-text{ font-size:16px; }
.sparkles{ font-size:.9rem; opacity:.6; animation:spark 2.8s infinite ease-in-out; }
.sparkles.s2{ animation-delay:1.2s; }
.logo-bottom .logo-text{ font-weight:800; letter-spacing:.4px; }

/* ===== Badges & User pill ===== */
.badge{
  display:inline-flex; align-items:center; gap:6px; padding:2px 8px;
  border-radius:999px; border:1px solid var(--border);
  font-size:.75rem; font-weight:600; line-height:1; vertical-align:middle;
}
.badge.pro{ border-color:#f59e0b; color:#b45309; background:rgba(245,158,11,.10); }
.badge.ad{ border-color:#22c55e; color:#166534; background:rgba(34,197,94,.10); }
.user-pill{
  display:inline-flex; align-items:center; gap:6px; padding:4px 10px;
  border-radius:999px; background:var(--surface); border:1px solid var(--border);
  font-weight:600;
}

/* ===== Ads (shared wrapper) ===== */
.ad{
  width:100%; border:1px solid var(--border); padding:15px; margin:20px 0;
  border-radius:8px; text-align:center;
}
.ad img,.ad video{ max-width:100%; border-radius:6px; display:block; margin:auto; }

/* ===== Modern Footer ===== */
.site-footer{
  background:var(--card);
  border-top:1px solid var(--border);
  margin-top:40px;
  color:var(--muted);
  font-size:.9rem;
  align-items: center;
}
.footer-container{
  display:grid;
  grid-template-columns:1.2fr 1fr 1fr;
  gap:20px;
  max-width:1100px;
  margin:auto;
  padding:24px 16px;
  align-items: center;
}
.footer-left{ display:center; flex-direction:column; gap:8px; }
.footer-left .logo-pro{ font-size:1.2rem; font-weight:900; }
.footer-tagline{ font-size:.85rem; color:var(--muted); }

.footer-links{
  display:center; flex-wrap:wrap; gap:10px 16px; align-items:flex-start;
}
/* 🌈 Colorful Footer Quick Links */
.footer-links a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 600;
  transition: color 0.25s ease, transform 0.25s ease, filter 0.25s ease;
  position: relative;
  padding: 4px 8px;
  border-radius: 8px;
}

/* Hover animation */
.footer-links a:hover {
  transform: translateY(-3px);
  color: #fff;
  filter: brightness(1.1);
}

/* Add a soft glow when hovered (dark mode only) */
[data-theme="dark"] .footer-links a:hover {
  box-shadow: 0 0 10px currentColor;
}

/* 🎨 Individual Icon Colors */
.footer-links a[href*="privacy"] i     { color: #60a5fa; }  /* Blue */
.footer-links a[href*="terms"] i       { color: #facc15; }  /* Yellow */
.footer-links a[href*="refund"] i      { color: #34d399; }  /* Green */
.footer-links a[href*="about"] i       { color: #a78bfa; }  /* Violet */
.footer-links a[href*="messages"] i    { color: #fb7185; }  /* Pink (Contact) */
.footer-links a[href*="faq"] i         { color: #f472b6; }  /* Light Pink */

/* Icons animate gently on hover */
.footer-links a:hover i {
  transform: scale(1.2) rotate(-5deg);
  transition: transform 0.3s ease;
}


.footer-social{ text-align:right; }
.footer-social p{ margin:0 0 6px; font-weight:700; color:var(--text); }
.social-row{ display:flex; gap:12px; justify-content:flex-end; }
/* 🌈 Footer Social Icons (Colorful + Animated) */
.social-row a {
  font-size: 1.3rem;
  text-decoration: none;
  transition: transform .25s ease, color .25s ease, filter .25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card-alt);
  color: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.social-row a:hover {
  transform: translateY(-4px) scale(1.1);
  filter: brightness(1.1);
  color: #fff;
}

/* 🎨 Brand-specific colors */
.social-row a[aria-label="Facebook"] {
  background: #1877F2; /* Facebook Blue */
}
.social-row a[aria-label="Instagram"] {
  background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}
.social-row a[aria-label="YouTube"] {
  background: #FF0000; /* YouTube Red */
}

/* Optional glow for dark theme */
[data-theme="dark"] .social-row a:hover {
  box-shadow: 0 0 10px currentColor, 0 0 20px currentColor inset;
}

.footer-bottom{
  border-top:1px solid var(--border);
  text-align:center; padding:12px; font-size:.8rem; color:var(--muted);
}

/* ===== Responsive ===== */
@media(max-width:768px){
  header{ flex-direction:row; justify-content:space-between; flex-wrap:wrap; padding:10px; gap:8px; }
  .footer-container{
    grid-template-columns:1fr;
    text-align:center;
  }
  .footer-social{ text-align:center; }
  .social-row{ justify-content:center; }
}

/* mobile spacing */
@media (max-width:640px){
  .btn{ padding:9px 14px; border-radius:12px; }
}

/* ===== ProQuizzers global print fixes ===== */
@media print {
  /* Hide site chrome from base.html */
  header, .header-top, .icon-row, .site-footer, footer,
  .theme-toggle, .notif-link, .flashes { display: none !important; }

  /* Un-stick everything (avoid overlays) */
  * { position: static !important; }

  /* Flatten layout containers */
  html, body, main, .page-container {
    display: block !important;
    background: #fff !important;
    color: #000 !important;
    overflow: visible !important;
  }

  /* Page margins */
  @page { margin: 16mm; } /* tweak if you want tighter margins */

  /* Calculator-specific: keep content tidy */
  .steps-toolbar,
  .addRow,
  #resetBtn,
  #copyAllLatex,
  #copyAllText,
  #printPdf { display: none !important; }

  .card, .steps, .calc-table, .step-table {
    box-shadow: none !important;
    background: #fff !important;
    border: 1px solid #999 !important;
  }

  .calc-table th, .calc-table td,
  .step-table th, .step-table td {
    color: #000 !important;
    border-color: #aaa !important;
  }

  /* Keep headings with their content */
  .steps h3 { break-after: avoid-page; page-break-after: avoid; }

  /* Keep each step together; don't split formulas */
  .step-list, .step-item, .formula { break-inside: avoid; page-break-inside: avoid; }

  /* Final answer should not jump to a new page alone */
  .final-answer { break-before: avoid-page; page-break-before: avoid; margin-top: 12px; font-weight: 700; font-size: 1.15rem; }

  /* Make math/text fully black for readability */
  .formula, .mjx-container { color: #000 !important; }
}


/* Anchor the badge to the bell link */
.notif-link {
  position: relative;          /* <- makes the badge position relative to this element */
  display: inline-flex;        /* keeps icon + badge layout stable */
  align-items: center;
}

/* Adjust badge placement over the bell */
.notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ef4444;
  color: #fff;
  font-size: .7rem;
  padding: 2px 6px;
  border-radius: 999px;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

@media (max-width: 640px) {
  .notif-badge { top: -4px; right: -4px; padding: 2px 5px; font-size:.65rem; }
}


.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
color: var(--card-text);
border-top: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 9999;
}

.cookie-banner p {
  margin: 0;
  font-size: 0.9rem;
  flex: 1;
}

.cookie-banner a {
  color: var(--accent-color, #3b82f6);
  text-decoration: underline;
}

.cookie-banner .btn {
  margin-left: 12px;
  padding: 6px 12px;
  font-size: 0.9rem;
}
@media (max-width: 600px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .cookie-banner .btn {
    margin-left: 0;
  }
}

/* ===== Frosted Glass Mobile Bottom Nav ===== */
.mobile-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 16px; /* lifted slightly like a floating bar */
  z-index: 1200;
  justify-content: center;
  pointer-events: none; /* prevent accidental clicks outside */
}

/* Inner floating toolbar container */
.mobile-nav-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  pointer-events: auto;
  max-width: 100%;
  margin: 0 auto;
  width: calc(100% - 32px);
  padding: 10px 14px;
  overflow-x: auto;                /* 👈 enable horizontal scroll */
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;   /* 👌 icons snap neatly */

  /* 🌫️ True frosted-glass dark style */
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45),
              0 0 20px rgba(255, 255, 255, 0.05) inset;
  transition: all 0.3s ease;
  border-color: white;
}

/* 🌞 Light mode variation */
[data-theme="light"] .mobile-nav-inner {
  background: rgba(255, 255, 255, 0.423);
  border: 1px solid rgb(0, 0, 0);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
/* Hide scrollbar (still scrollable) */
.mobile-nav-inner::-webkit-scrollbar {
  display: none;
}
.mobile-nav-inner {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
/* Links inside nav */
.mobile-nav .mobile-nav-link {
  display: flex;
  flex: 0 0 auto; 
  scroll-snap-align: center; 
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--muted);
  width: 60px;
  padding: 6px 0;
  border-radius: 12px;
  transition: all 0.25s ease-in-out;
  position: relative;
}

/* Subtle lift + glow on hover */
.mobile-nav .mobile-nav-link:hover {
  transform: scale(1.1) translateY(-3px);
  filter: brightness(1.15);
}

/* Active effect — glow + slight zoom */
.mobile-nav .mobile-nav-link.active {
  transform: scale(1.15);
  filter: brightness(1.2);
}

/* 🪩 Icon styling — colorful & glowing */
.mobile-nav .mobile-nav-link i {
  font-size: 1.35rem;
  margin-bottom: 2px;
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.05));
}

/* Active icon glow pulse */
.mobile-nav .mobile-nav-link.active i {
  animation: iconPulse 1.6s ease-in-out infinite;
}

/* Label */
.mobile-nav .mobile-nav-link .mn-label {
  font-size: 0.68rem;
  opacity: 0.9;
}

/* 🌈 Individual Icon Colors */
.mobile-nav a:nth-child(1) i { color: #60a5fa; filter: drop-shadow(0 0 6px rgba(96,165,250,0.6)); }  /* Home */
.mobile-nav a:nth-child(2) i { color: #34d399; filter: drop-shadow(0 0 6px rgba(52,211,153,0.6)); }  /* Tools */
.mobile-nav a:nth-child(3) i { color: #facc15; filter: drop-shadow(0 0 6px rgba(250,204,21,0.6)); }  /* Jobs */
.mobile-nav a:nth-child(4) i { color: #f472b6; filter: drop-shadow(0 0 6px rgba(244,114,182,0.6)); }  /* Calculators */
.mobile-nav a:nth-child(5) i { color: #a78bfa; filter: drop-shadow(0 0 6px rgba(167,139,250,0.6)); }  /* Profile */
.mobile-nav a:nth-child(6) i { color: #fb7185; filter: drop-shadow(0 0 6px rgba(251,113,133,0.6)); }  /* Notifications */
.mobile-nav a:nth-child(7) i { color: #93c5fd; filter: drop-shadow(0 0 6px rgba(147,197,253,0.6)); }  /* Settings */



/* 📱 Responsive show/hide */
@media (max-width: 768px) {
  .icon-row { display: none !important; }
  .mobile-nav { display: flex; }
  .page-container, main, .content { padding-bottom: 90px; }
}

/* Badge stays the same */
.mobile-nav .notif-badge {
  position: absolute;
  top: 6px;
  right: 14px;
  font-size: 0.65rem;
  padding: 2px 6px;
}

/* 👀 Fading edge hint for scrollable mobile nav */
/* 🌫️ Internal fade edges — inside the glass bar */
.mobile-nav-inner::before,
.mobile-nav-inner::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.35s ease;
}

/* Left and right fades */
.mobile-nav-inner::before {
  left: 0;
  background: linear-gradient(to right, rgba(59,130,246,0.45), transparent);
  opacity: var(--fade-left, 0);
}
.mobile-nav-inner::after {
  right: 0;
  background: linear-gradient(to left, rgba(59,130,246,0.45), transparent);
  opacity: var(--fade-right, 0);
}

/* Light theme tweak (use white-blue mix) */
[data-theme="light"] .mobile-nav-inner::before {
  background: linear-gradient(to right, rgba(147,197,253,0.65), transparent);
}
[data-theme="light"] .mobile-nav-inner::after {
  background: linear-gradient(to left, rgba(147,197,253,0.65), transparent);
}


/* 📱 Responsive */
@media (max-width: 768px) {
  .icon-row { display: none !important; }
  .mobile-nav { display: flex; }
  .page-container, main, .content { padding-bottom: 88px; }
}
@media (max-width: 420px) {
  .mobile-nav .mobile-nav-link { width: 56px; font-size: .75rem; }
}




/* ===== Active link highlight ===== */
.icon-row a.active,
.mobile-nav .mobile-nav-link.active {
  color: var(--accent) !important;
}


.icon-row a.active {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
}

.mobile-nav .mobile-nav-link.active {
  background: var(--surface-hover);
  border-radius: 10px;
}


/* ===== Desktop-only tooltips for icon-row (uses data-tooltip attribute) ===== */
/* Only enable on wider screens */
@media (min-width: 769px) {
  .icon-row a { position: relative; outline: none; }

  /* tooltip box (hidden by default) */
  .icon-row a::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    bottom: calc(100% + 8px); /* place above the icon */
    white-space: nowrap;
    background: var(--card);
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 6px 8px;
    border-radius: 8px;
    font-size: .75rem;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease, transform .12s ease;
    z-index: 1100;
  }

  /* small arrow under tooltip */
  .icon-row a::before {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(100% + 4px);
    border: 6px solid transparent;
    border-top-color: var(--card);
    opacity: 0;
    transition: opacity .12s ease;
    z-index: 1100;
  }

  /* show on hover or keyboard focus */
  .icon-row a:hover::after,
  .icon-row a:focus::after,
  .icon-row a:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  .icon-row a:hover::before,
  .icon-row a:focus::before,
  .icon-row a:focus-visible::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  /* highlight tooltip when link is active */
  .icon-row a.active::after {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 8%, var(--border));
  }

  /* don't show tooltips for links that lack data-tooltip */
  .icon-row a:not([data-tooltip])::after,
  .icon-row a:not([data-tooltip])::before {
    display: none;
  }
}

/* Ensure mobile never shows these tooltip pseudo elements */
@media (max-width: 768px) {
  .icon-row a::after,
  .icon-row a::before { display: none !important; }
}

/* ===== Force readable text across all UI ===== */
input, select, textarea, button,
label, .pq-label, .pq-input, .pq-textarea, .pq-select,
.pq-h, .pq-chip, .pq-preview {
  color: var(--text) !important;
}

option {
  background: var(--card);
  color: var(--text);
}

body * {
  translate: no; /* block Google Translate everywhere */
}

#quiz-section * {
  translate: yes; /* allow only quiz section */
}
@media (max-width: 768px) {
  .icon-row {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
  }
  .mobile-nav {
    display: flex !important;
  }
}
.modal-actions { margin-top: 14px; display: flex; justify-content: center; }
.modal-actions .btn { padding: 6px 14px; cursor: pointer; }

/* 🌈 Colorful Mobile Nav Icons */
.mobile-nav a:nth-child(1) i { color: #60a5fa; }   /* Home */
.mobile-nav a:nth-child(2) i { color: #34d399; }   /* Tools */
.mobile-nav a:nth-child(3) i { color: #facc15; }   /* Jobs */
.mobile-nav a:nth-child(4) i { color: #f472b6; }   /* Calculators */
.mobile-nav a:nth-child(5) i { color: #a78bfa; }   /* Profile */
.mobile-nav a:nth-child(6) i { color: #fb7185; }   /* Notifications */
.mobile-nav a:nth-child(7) i { color: #93c5fd; }   /* Settings */

/* 🌈 Icon Glow Colors */
.icon-row a[data-tooltip="Home"] i { color: #60a5fa; }
.icon-row a[data-tooltip="Tools"] i { color: #34d399; }
.icon-row a[data-tooltip="Jobs"] i { color: #facc15; }
.icon-row a[data-tooltip="Calculators"] i { color: #f472b6; }
.icon-row a[data-tooltip="Profile"] i { color: #a78bfa; }
.icon-row a[data-tooltip="Notifications"] i { color: #fb7185; }
.icon-row a[data-tooltip="Settings"] i { color: #93c5fd; }

/* ===== Page Transition (Native Feel) ===== */

.btn {
  transition: transform .15s ease, background .25s ease, box-shadow .25s ease;
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.btn:active {
  transform: scale(0.96);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.theme-toggle.glow::before {
  animation: glowPulse 0.9s ease-out;
}

/* ===== Global Page Loader ===== */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg, #121212);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#page-loader.hide {
  opacity: 0;
  visibility: hidden;
}

.loader-bar {
  width: 120px;
  height: 4px;
  background: var(--surface-hover);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  margin-bottom: 12px;
}
.loader-bar::before {
  content: '';
  position: absolute;
  left: -40%;
  top: 0;
  height: 100%;
  width: 40%;
  background: var(--accent);
  animation: loaderMove 1.4s infinite linear;
  border-radius: inherit;
}

.loader-text {
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.4px;
}

[data-theme="light"] .loader-bar {
  background: #e5e7eb;
}
[data-theme="light"] .loader-bar::before {
  background: #3b82f6;
}

/* 🌫️ Modern Login / Logout Buttons - Dual Theme Fix */
.nav-right .btn.login,
.nav-right .btn.logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
}

/* 🌙 Dark Mode (Glass style) */
[data-theme="dark"] .nav-right .btn.login {
  background: linear-gradient(135deg, rgba(96,165,250,0.22), rgba(59,130,246,0.18));
  color: #bfdbfe;
  border: 1px solid rgba(147,197,253,0.25);
  box-shadow: 0 2px 8px rgba(59,130,246,0.35);
}
[data-theme="dark"] .nav-right .btn.login:hover {
  color: #fff;
  background: linear-gradient(135deg, rgba(96,165,250,0.35), rgba(59,130,246,0.25));
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 0 12px rgba(96,165,250,0.6);
}

[data-theme="dark"] .nav-right .btn.logout {
  background: linear-gradient(135deg, rgba(248,113,113,0.25), rgba(239,68,68,0.18));
  color: #fecaca;
  border: 1px solid rgba(239,68,68,0.25);
  box-shadow: 0 2px 8px rgba(239,68,68,0.3);
}
[data-theme="dark"] .nav-right .btn.logout:hover {
  color: #fff;
  background: linear-gradient(135deg, rgba(248,113,113,0.35), rgba(239,68,68,0.25));
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 0 12px rgba(239,68,68,0.6);
}

/* ☀️ Light Mode (Solid colors, more visible) */
[data-theme="light"] .nav-right .btn.login {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  box-shadow: 0 3px 8px rgba(59,130,246,0.3);
}
[data-theme="light"] .nav-right .btn.login:hover {
  filter: brightness(1.15);
  transform: translateY(-2px) scale(1.05);
}

[data-theme="light"] .nav-right .btn.logout {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  box-shadow: 0 3px 8px rgba(239,68,68,0.3);
}
[data-theme="light"] .nav-right .btn.logout:hover {
  filter: brightness(1.1);
  transform: translateY(-2px) scale(1.05);
}

/* ✨ Icon subtle hover motion */
.nav-right .btn i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}
.nav-right .btn:hover i {
  transform: rotate(-8deg) scale(1.1);
}


/* ==========================================================
   🌗 Native Glass Utilities for Pro-Quizzers (Option 2)
   Designed to blend with existing structure safely
   ========================================================== */

/* 🌫️ Generic Glass Card Overlay */
.glass-card {
  background: rgba(255,255,255,0.28);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 18px;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
  transition: all 0.3s ease;
}
html[data-theme="dark"] .glass-card {
  background: rgba(18,18,18,0.55);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}
.glass-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}

/* 👤 Small DP (for profile before name) */
.dp-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.3);
  vertical-align: middle;
}

/* 💬 Meta Author (old class enhanced) */
.meta-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}
.meta-author .author-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

/* 🪶 Soft Pills for difficulty, subject, etc. */
.pill-soft {
  background: var(--pill-bg);
  border-radius: 10px;
  padding: 3px 8px;
  font-size: 0.8rem;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--card-text);
}
html[data-theme="dark"] .pill-soft {
  background: rgba(255,255,255,0.08);
}

/* 🔘 Icon Buttons (Like, Fav, Share, Full view) */
.icon-btn {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.2s, color 0.3s, background 0.3s;
}
.icon-btn:hover {
  background: rgba(255,255,255,0.15);
  color: var(--accent, #22c55e);
  transform: scale(1.15);
}
.icon-btn:active {
  transform: scale(0.95);
}

/* 🌟 Favorite Highlight */
.fav-toggle.is-fav i {
  color: gold;
  filter: drop-shadow(0 0 3px rgba(255,215,0,0.6));
}

/* ✨ Glow Accent (for hover or active cards) */
.native-glow {
  box-shadow: 0 0 15px rgba(34,197,94,0.3);
  transition: box-shadow 0.3s ease;
}
.native-glow:hover {
  box-shadow: 0 0 24px rgba(34,197,94,0.5);
}
@media (hover: none) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
