@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

:root {
  --bg-main: #f8fafc;
  --bg-header: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-sticky: rgba(255, 255, 255, 0.95);
  
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-active: #e11d48;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --brand-red: #e11d48;
  --brand-red-dark: #be123c;
  --brand-indigo: #4f46e5;
  --brand-emerald: #059669;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 30px -5px rgba(0,0,0,0.12);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --font-heading: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
}

[data-theme="dark"] {
  --bg-main: #0f172a;
  --bg-header: #1e293b;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --bg-sticky: rgba(30, 41, 59, 0.95);
  
  --border-color: #334155;
  --border-hover: #475569;
  --border-active: #f43f5e;

  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-dim: #64748b;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--text-main);
  line-height: 1.25;
  font-weight: 700;
}

a {
  color: var(--brand-indigo);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Bulletproof Desktop Header & Dropdown System
   ========================================================================== */
.site-header {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 500;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.header-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  height: 70px !important;
}

.logo {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.6rem !important;
  font-family: var(--font-heading) !important;
  font-weight: 800 !important;
  font-size: 1.25rem !important;
  color: var(--text-main) !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
}

.logo-img {
  width: 32px !important;
  height: 32px !important;
  border-radius: var(--radius-sm);
  object-fit: contain;
  flex-shrink: 0 !important;
}

.logo-badge {
  background: var(--brand-red);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: inline-block !important;
  white-space: nowrap !important;
}

/* Navigation Pill Track */
.site-nav {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 0.35rem;
  background: var(--bg-main);
  padding: 0.3rem 0.4rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  transition: all 0.18s ease;
  white-space: nowrap !important;
  display: inline-block !important;
}

.nav-link:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.04);
  text-decoration: none;
}

[data-theme="dark"] .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
  color: var(--brand-red);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
  text-decoration: none;
}

/* Header Dropdown Menu Button */
.nav-dropdown {
  position: relative !important;
  display: inline-block !important;
}

.dropdown-btn {
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem;
  padding: 0.45rem 0.95rem;
  font-family: var(--font-body);
  transition: all 0.18s ease;
  white-space: nowrap !important;
}

.dropdown-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.5;
  transition: transform 0.2s ease;
}

.dropdown-btn:hover,
.nav-dropdown.active .dropdown-btn {
  color: var(--brand-red);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.nav-dropdown.active .dropdown-btn svg {
  transform: rotate(180deg);
}

/* Floating Dropdown Menu Card (STRICTLY HIDDEN BY DEFAULT ON DESKTOP) */
.dropdown-menu {
  display: none !important;
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  min-width: 240px !important;
  padding: 0.6rem 0 !important;
  z-index: 600 !important;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu,
.nav-dropdown.active .dropdown-menu {
  display: block !important;
}

.dropdown-item {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.6rem 1.15rem !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  color: var(--text-muted) !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}

.dropdown-item:hover, .dropdown-item.active {
  background: var(--bg-card-hover) !important;
  color: var(--brand-red) !important;
  padding-left: 1.35rem !important;
  text-decoration: none !important;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.45rem 0;
}

.mobile-menu-btn {
  display: none !important;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.45rem;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.mobile-menu-btn svg {
  width: 22px;
  height: 22px;
}

.theme-toggle-btn {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap !important;
  transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
  color: var(--text-main);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

/* ==========================================================================
   Hero Section & Body Components
   ========================================================================== */
.hero {
  padding: 3rem 0 1.75rem;
  text-align: center;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(225, 29, 72, 0.08);
  border: 1px solid rgba(225, 29, 72, 0.2);
  color: var(--brand-red);
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.text-accent {
  color: var(--brand-red);
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 1.5rem;
}

/* Sticky Controls Score Bar */
.sticky-bar {
  position: sticky;
  top: 70px;
  z-index: 90;
  background: var(--bg-sticky);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
  box-shadow: var(--shadow-sm);
}

.sticky-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.score-box {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.score-num {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-red);
  line-height: 1;
}

.score-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.score-bar-bg {
  width: 150px;
  height: 8px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  width: 100%;
  background: var(--brand-red);
  transition: width 0.25s ease;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-brand {
  background: var(--brand-red);
  color: #fff !important;
}

.btn-brand:hover {
  background: var(--brand-red-dark);
  text-decoration: none !important;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.btn-outline:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

/* Category Filter Chips */
.category-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 1.25rem 0 0.5rem;
}

.chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.chip.active, .chip:hover {
  background: var(--brand-red);
  color: #fff;
  border-color: var(--brand-red);
}

/* Quiz List Cards */
.quiz-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0 3rem;
}

.question-row {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.question-row:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.question-row.checked {
  background: rgba(225, 29, 72, 0.05);
  border-color: rgba(225, 29, 72, 0.3);
}

.q-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
}

.q-idx {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-dim);
  width: 32px;
}

.checkbox-box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-hover);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.question-row.checked .checkbox-box {
  background: var(--brand-red);
  border-color: var(--brand-red);
}

.checkbox-box svg {
  width: 12px;
  height: 12px;
  stroke: #fff;
  stroke-width: 3;
  opacity: 0;
}

.question-row.checked .checkbox-box svg {
  opacity: 1;
}

.q-title {
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 500;
}

.q-link {
  font-size: 0.8rem;
  color: var(--brand-indigo);
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

.question-row:hover .q-link {
  opacity: 1;
}

/* Modals & Compact Results Card */
.modal-mask {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.82) !important;
  backdrop-filter: blur(10px) !important;
  z-index: 10000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1rem !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  overflow-y: auto !important;
}

.modal-mask.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  box-shadow: var(--shadow-lg);
  text-align: center;
  position: relative;
  margin: auto;
  overflow-y: auto;
}

.modal-x {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-dim);
  line-height: 1;
}

.big-score {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--brand-red);
  line-height: 1;
  margin: 0.25rem 0;
}

.share-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin: 1rem 0 0.5rem;
}

.share-grid .btn {
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
}

.btn-share-wa { background: #25D366; color: #fff !important; }
.btn-share-wa:hover { background: #1da851; }
.btn-share-x { background: #000000; color: #fff !important; }
.btn-share-x:hover { background: #1a1a1a; }
.btn-share-copy { background: var(--brand-indigo); color: #fff !important; }
.btn-share-download { background: var(--brand-red); color: #fff !important; }

#share-canvas { display: none; }

/* Desktop Floating Share Widget — Strictly Fixed at Viewport Center Right */
.st-sticky-share-buttons {
  position: fixed !important;
  top: 50% !important;
  right: 0 !important;
  transform: translateY(-50%) !important;
  z-index: 9999 !important;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
  border-radius: 12px 0 0 12px;
  overflow: hidden;
  transition: transform 0.3s ease;
  border: 1px solid var(--border-color);
  border-right: none;
}

.st-sticky-share-buttons.st-collapsed {
  transform: translateY(-50%) translateX(calc(100% - 38px)) !important;
}

.st-total {
  background: #1e293b;
  color: #ffffff;
  padding: 0.5rem 0.6rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.st-total .st-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
}

.st-total .st-shares {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

.st-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  user-select: none;
}

.st-btn svg, .st-btn img {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.st-btn[data-network="twitter"] { background: #000000; }
.st-btn[data-network="whatsapp"] { background: #25D366; }
.st-btn[data-network="telegram"] { background: #0088cc; }
.st-btn[data-network="reddit"] { background: #ff4500; }
.st-btn[data-network="pinterest"] { background: #bd081c; }
.st-btn[data-network="sharethis"] { background: #4f46e5; }

.st-btn:hover {
  filter: brightness(1.1);
}

.st-toggle {
  background: #f1f5f9;
  color: #475569;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-top: 1px solid var(--border-color);
}

.st-toggle:hover {
  background: #e2e8f0;
}

.st-toggle svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.5;
  transition: transform 0.3s ease;
}

.st-sticky-share-buttons.st-collapsed .st-toggle svg {
  transform: rotate(180deg);
}

/* Content Body & SEO Styling */
.seo-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  margin: 3rem 0;
}

.seo-section h2 {
  font-size: 1.75rem;
  margin: 2rem 0 1rem;
}

.seo-section h2:first-child {
  margin-top: 0;
}

.seo-section p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.img-fluid {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin: 1.5rem 0;
}

.callout {
  background: rgba(79, 70, 229, 0.06);
  border-left: 4px solid var(--brand-indigo);
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.outbound-link {
  font-weight: 600;
  color: var(--brand-indigo);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Tables */
.table-box {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.data-tbl {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.data-tbl th, .data-tbl td {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border-color);
}

.data-tbl th {
  background: var(--bg-main);
  font-family: var(--font-heading);
  font-weight: 700;
}

/* Modern Premium Site Footer System */
.site-footer {
  margin-top: auto;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 3.5rem 0 2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-top-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand-info p {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-top: 0.4rem;
}

.footer-social-badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.social-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.social-badge-tiktok {
  background: #000000;
  color: #ffffff !important;
}

.social-badge-tiktok:hover {
  background: #1a1a1a;
  transform: translateY(-2px);
  text-decoration: none !important;
}

.social-badge-youtube {
  background: #ff0000;
  color: #ffffff !important;
}

.social-badge-youtube:hover {
  background: #cc0000;
  transform: translateY(-2px);
  text-decoration: none !important;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 1.2rem;
  color: var(--text-main);
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.65rem;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.footer-col a:hover {
  color: var(--brand-red);
  transform: translateX(3px);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 840px) {
  /* Mobile Header Navigation Drawer */
  .mobile-menu-btn { display: flex !important; }
  
  .site-nav {
    display: none !important;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem;
    gap: 0.6rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: var(--shadow-md);
  }

  .site-nav.active {
    display: flex !important;
  }

  .nav-link {
    border-radius: var(--radius-md);
    padding: 0.65rem 1rem;
  }

  .nav-dropdown {
    width: 100%;
  }

  .dropdown-btn {
    width: 100%;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-md);
  }

  .dropdown-menu {
    position: static !important;
    display: none !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0.25rem 0 0 0.5rem !important;
    min-width: 100% !important;
  }

  .nav-dropdown.active .dropdown-menu {
    display: block !important;
  }

  .footer-top-brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  /* Social Share Always Pinned at Bottom on Phone */
  .st-sticky-share-buttons {
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    flex-direction: row !important;
    width: 100% !important;
    border-radius: 0 !important;
    border: none !important;
    border-top: 1px solid var(--border-color) !important;
    justify-content: space-around !important;
  }

  .st-sticky-share-buttons.st-collapsed {
    transform: translateY(100%) !important;
  }

  .st-total { display: none !important; }
  .st-btn {
    padding: 0.65rem 0.5rem !important;
    font-size: 0.75rem !important;
    justify-content: center !important;
    flex: 1;
  }

  .st-btn .st-label { display: none !important; }
  .st-toggle { padding: 0.65rem 0.5rem !important; }
}
