/* ==========================================================================
   CSS Variables & Theme Setup
   ========================================================================== */
:root {
  /* Core Palette - Premium Productivity Green */
  --bg-color: #f8fafc;
  --surface-color: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border-color: #e2e8f0;

  /* Gradients & Accents */
  --primary-gradient: linear-gradient(135deg, #16a34a 0%, #10b981 100%);
  --secondary-gradient: linear-gradient(135deg, #059669 0%, #34d399 100%);
  --accent-color: #16a34a;
  --accent-hover: #15803d;
  --accent-soft: rgba(22, 163, 74, 0.08);

  /* Advanced Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 15px rgba(22, 163, 74, 0.2);

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-blur: 12px;

  /* Typography & Layout */
  --font-main: "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  /* Theme-specific Colors */
  --fav-color: #ef4444;
}

body.dark-mode {
  /* Dark Mode Palette */
  --bg-color: #0b0f1a;
  --surface-color: #161e2e;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --border-color: #1f2937;

  --glass-bg: rgba(22, 30, 46, 0.8);
  --glass-border: rgba(255, 255, 255, 0.03);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  cursor: default;
  /* Hide scrollbar for IE, Edge and Firefox */
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Hide scrollbar for Chrome, Safari and Opera */
*::-webkit-scrollbar {
  display: none;
}

button,
a,
.nav-btn,
.hub-card,
.faq-question,
.fav-btn,
.share-btn,
.faq-icon,
.header-back-btn,
.theme-toggle-btn {
  cursor: pointer !important;
}

html,
body {
  height: auto;
  min-height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
}

.app-container {
  min-height: 100vh;
  height: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: visible;
  position: relative;
}

/* Main page content */
main#app-content {
  flex: 1 0 auto;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow: visible;
  padding-top: calc(env(safe-area-inset-top, 0px) + 74px) !important;
  padding-bottom: 2.5rem !important;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
  box-sizing: border-box;
  animation: fadeIn 0.8s ease;
}

@media (min-width: 640px) and (max-width: 899px) {
  main#app-content {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

body.view-questions main#app-content {
  padding-bottom: 95px !important;
}

.nav-spacer {
  display: none; /* Spacer not needed anymore with proper padding */
}

/* ==========================================================================
   Header
   ========================================================================== */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 4000;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding-top: calc(env(safe-area-inset-top, 0px) + 8px) !important;
  padding-bottom: 8px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.header-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 50px;
}

.left-section {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.header-right-actions {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  z-index: 10;
}

.logo-section {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
  white-space: nowrap;
  transition: all var(--transition-smooth);
}

.logo-section * {
  pointer-events: auto;
}

.back-section {
  display: none;
  align-items: center;
}

.search-section {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  z-index: 10;
  transition: all var(--transition-smooth);
}

.search-section:focus-within {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-color);
  /* Cover the header background to keep it clean */
}

.search-section:focus-within .search-container {
  width: calc(100% - 4rem);
  max-width: 800px;
  height: 40px;
  /* 46px nundi 40px ki thaggincha */
  background: var(--surface-color);
  border: 2px solid var(--accent-color);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  padding: 0 0.75rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  /* Ensure everything starts from left */
}

.theme-toggle-btn,
.search-toggle-btn {
  width: 35px !important;
  /* 33px nundi 35px ki pencha */
  height: 35px !important;
  min-width: 35px !important;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  cursor: pointer;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  padding: 0;
}

.theme-toggle-btn i {
  font-size: 1.25rem !important;
}

/* Hover rules removed */

.header-back-btn {
  background: transparent;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  margin-left: -12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  box-shadow: none;
}

/* టెక్స్ట్ ఉన్న బటన్స్ కోసం కొత్త క్లాస్ */
.btn-premium {
  background: var(--primary-gradient);
  color: white !important;
  border: none;
  padding: 0 1.5rem;
  height: 40px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-glow);
}

.btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.3);
}

.header-back-btn i {
  font-size: 1.8rem;
}

.logo {
  display: flex;
  flex-direction: row;
  /* Force horizontal layout */
  align-items: center;
  gap: 4px;
  font-size: 1.9rem;
  /* Increased from 1.6rem */
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  /* Prevent wrapping */
}

.logo i {
  font-size: 2rem;
  color: var(--accent-color);
  filter: drop-shadow(0 0 8px rgba(22, 163, 74, 0.3));
}

.logo .highlight {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.search-container {
  flex: none;
  width: 35px;
  height: 35px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  /* Removed shadow */
}

.search-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--accent-color) !important;
  font-size: 1.25rem !important;
  font-family: "Material Icons" !important;
  pointer-events: none;
  transition: all 0.4s ease;
  z-index: 5;
}

.search-section:focus-within .search-icon {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  min-width: 24px !important;
  width: 24px !important;
  margin-right: 0 !important;
}

#global-search {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 500;
  width: 0;
  opacity: 0;
  padding: 0;
  transition: all 0.3s ease;

  white-space: nowrap;
}

.search-section:focus-within #global-search {
  width: 100%;
  opacity: 1;
  padding: 0 0.5rem;
}

.search-container i {
  color: var(--accent-color);
  font-size: 1.2rem;
  /* Reduced size */
  margin-right: 0.5rem;
}

body.dark-mode .search-container i {
  color: var(--accent-color);
  opacity: 0.9;
}

/* ==========================================================================
   Question Detail View (Premium Accordion)
   ========================================================================== */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  margin-top: 1rem;
  padding-top: 0.5rem;
  padding-bottom: 20px;
}

/* FAQ Item Styles (Optimized) */
.faq-item {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
  animation: slideUp 0.4s ease forwards;
}

/* ==========================================================================
   Home & Hub Cards
   ========================================================================== */
.hub-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  cursor: pointer;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
}

@media (hover: hover) {
  .hub-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
    background: var(--glass-bg);
  }
}

.hub-card-content h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.hub-card-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-soft);
  color: var(--accent-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.card-icon i {
  font-size: 1.5rem;
}

.card-action {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-color);
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

@media (hover: hover) {
  .hub-card:hover .card-action {
    gap: 0.75rem;
    transform: translateX(3px);
  }
}

.faq-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-color);
  background: var(--surface-color);
}

.faq-item.active {
  border-color: var(--accent-color);
  box-shadow: 0 15px 35px rgba(22, 163, 74, 0.08);
}

.faq-item.active .faq-question {
  background: rgba(22, 163, 74, 0.05);
  /* Light green highlight when open */
}

.faq-question {
  padding: 1.25rem 30px 1.25rem 30px !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* Desktop centering */
  gap: 1rem;
  cursor: pointer;
  user-select: none;
}

.faq-question > span {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  /* Increased gap for better breathing room */
  min-width: 0;
}

.q-text {
  font-weight: 600;
  /* Reduced from 700 for a cleaner look */
  font-size: 0.95rem;
  /* Slightly larger */
  color: var(--text-primary);
  line-height: 1.6;
  /* More breathing room */
  flex: 1;
  word-break: break-word;
  text-align: left;
  /* Justify తీసేసి Left కి మార్చాను */
}

.q-number {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  background: var(--primary-gradient);
  color: white;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 800;
  flex: none;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.2);
}

.faq-item.active .q-number {
  background: var(--primary-gradient);
  color: white;
}

.faq-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fav-btn,
.share-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.fav-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.share-btn:hover {
  background: rgba(22, 163, 74, 0.1);
  color: var(--accent-color);
}

.fav-btn.active {
  color: #ef4444 !important;
  /* Red color when saved */
}

.faq-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: #f0fdf4;
  /* Match number box background */
  color: var(--accent-color);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all var(--transition-smooth);
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  background: var(--primary-gradient);
  color: white;
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: all var(--transition-smooth);
}

.faq-answer-content {
  padding: 5px 20px 20px 20px !important;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  text-align: justify;
  -webkit-user-select: text;
  user-select: text;
}

.faq-answer-content p {
  margin-top: 0;
  margin-bottom: 1rem;
}

.faq-answer-content p:last-child {
  margin-bottom: 0;
}

.nav-spacer {
  height: 4rem;
  /* 8rem nundi 4rem ki taggincha */
}

/* ==========================================================================
   Sticky Bottom Navigation (Glass Pill)
   ========================================================================== */
/* ==========================================================================
   Sticky Bottom Navigation (Tab Bar Style)
   ========================================================================== */
.bottom-nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 500px;
  background: var(--glass-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0.5rem 1rem calc(0.5rem + env(safe-area-inset-bottom)) 1rem;
  z-index: 4000;
  border-radius: var(--radius-pill) !important;
  box-shadow: var(--shadow-xl);
}

.nav-btn {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 0;
  transition: all var(--transition-fast);
}

.nav-btn i {
  font-size: 1.4rem;
  transition: all var(--transition-fast);
}

.nav-btn span {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-btn.active {
  color: var(--accent-color);
}

.nav-btn.active i {
  transform: translateY(-5px);
  filter: drop-shadow(0 5px 10px rgba(22, 163, 74, 0.25));
}

.nav-btn.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  width: 14px;
  height: 4px;
  background: var(--accent-color);
  border-radius: 10px;
  box-shadow: 0 0 10px var(--accent-color);
}

/* Responsive Overrides - Unified */
@media (max-width: 10000px) {
  .main-header {
    padding-top: calc(env(safe-area-inset-top, 0px) + 8px) !important;
    padding-bottom: 8px !important;
  }

  .header-content {
    padding: 0 0.75rem;
    gap: 0 !important;
  }

  .logo-section {
    opacity: 1;
    flex: none;
    margin-right: auto !important;
  }

  .logo span {
    font-size: 1.4rem;
    font-weight: 700;
    white-space: nowrap;
  }

  .logo .highlight {
    font-weight: 800;
    color: var(--accent-color);
  }

  .logo i {
    font-size: 1.6rem;
    color: var(--accent-color);
    filter: drop-shadow(0 0 8px rgba(22, 163, 74, 0.3));
  }

  .bottom-nav {
    position: fixed !important;
    width: 100%;
    max-width: none;
    bottom: 0;
    left: 0;
    transform: translate3d(0, 0, 0) !important;
    padding: 0.4rem 0.5rem calc(0.4rem + env(safe-area-inset-bottom)) 0.5rem;
    border-radius: 0 !important;
    border: none;
    border-top: 1px solid var(--border-color);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 4000 !important;
  }

  body.dark-mode .bottom-nav {
    background: rgba(22, 30, 46, 0.85);
    border-color: rgba(255, 255, 255, 0.05);
  }

  .nav-btn i {
    font-size: 1.4rem;
    margin-bottom: 2px;
  }

  .nav-btn span {
    font-size: 0.6rem;
    font-weight: 600;
  }
}

@media (max-width: 10000px) {
  .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    height: 60px;
  }

  .logo-section {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
  }

  .header-content:has(.search-section:focus-within) .logo-section {
    opacity: 0;
    /* Hide on mobile search to save space */
  }

  .search-section {
    margin-left: auto;
  }

  .search-section:focus-within {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0 0.5rem;
    background: var(--surface-color);
    z-index: 100;
    display: flex;
    align-items: center;
  }

  .header-content:has(.search-section:focus-within) .logo-section {
    opacity: 0;
  }

  .search-container {
    width: 35px !important;
    height: 35px !important;
    padding: 0 !important;
    background: var(--surface-color) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-sm) !important;
  }

  .search-section:focus-within .search-container {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding-left: 12px !important;
    gap: 5px !important;
  }

  .search-icon {
    margin: 0 !important;
  }

  .search-section:focus-within .search-icon {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    min-width: 24px !important;
    width: 24px !important;
    margin-right: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  #global-search {
    font-size: 0.95rem !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    width: 100% !important;
  }

  .logo span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 1.45rem;
    /* Increased from 1.2rem */
  }

  .logo-section {
    margin: 0 !important;
  }

  #global-search {
    opacity: 0;
    width: 0;
    height: 100%;
    padding: 0 1rem 0 3rem;
    background: transparent;
    border: none !important;
    outline: none !important;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: opacity 0.3s ease 0.1s;
  }

  .search-container:focus-within #global-search {
    opacity: 1;
    width: 100%;
  }
}

#global-search:focus {
  outline: none;
  border-color: transparent;
  box-shadow: none;
}

.theme-btn {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1.2rem;
}

.theme-btn:hover {
  background: var(--primary-gradient);
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */
.material-icons {
  font-family: "Material Icons";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "liga";
  font-display: block;
}



.topic-header {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-left: 6px solid var(--accent-color);
  padding: 2.5rem 2rem;
  margin-bottom: 2.5rem;
  margin-top: 36px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
  animation: slideUp 0.5s ease forwards;
}

.topic-header-icon {
  width: 80px;
  height: 80px;
  min-width: 80px;
  background: var(--primary-gradient);
  color: white;
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.5rem;
  box-shadow: var(--shadow-glow);
}

.topic-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.2;
}

.topic-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  font-weight: 450;
}

@media (max-width: 10000px) {
  .topic-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 1.5rem;
    gap: 1rem;
  }

  .topic-header-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    font-size: 2rem;
  }

  .topic-header h1 {
    font-size: 1.8rem;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Stagger animation for faq-items */
.faq-item:nth-child(1) {
  animation-delay: 0.05s;
}

.faq-item:nth-child(2) {
  animation-delay: 0.1s;
}

.faq-item:nth-child(3) {
  animation-delay: 0.15s;
}

.faq-item:nth-child(4) {
  animation-delay: 0.2s;
}

.faq-item:nth-child(5) {
  animation-delay: 0.25s;
}

/* Section Hero */
.section-hero {
  text-align: center;
  padding: 1rem 0 0.5rem 0;
  /* Reduced bottom padding */
  margin-bottom: 1rem;
  margin-top: 0px;
  /* Reduced margin bottom */
  background: transparent;
  border: none;
  box-shadow: none;
  position: relative;
}

.section-hero h1 {
  font-size: 2.8rem;
  /* Slightly larger again for impact */
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.1;
}

.section-hero h1 span.welcome-text {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  /* Changed from green for better readability */
  margin-bottom: 0.5rem;
  display: block;
}

.section-hero h1 .hub-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
  filter: drop-shadow(0 2px 4px rgba(22, 163, 74, 0.15));
}

.section-hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
  font-weight: 450;
}

.section-hero::before {
  content: "";
  position: absolute;
  top: 2rem;
  left: -2rem;
  width: 100px;
  height: 100px;
  background: var(--accent-soft);
  filter: blur(60px);
  border-radius: 50%;
  z-index: -1;
}

@media (max-width: 10000px) {
  .section-hero {
    padding: 1.5rem 0 0.5rem 0;
    margin-bottom: 0.5rem;
    margin-top: 0px;
  }

  .section-hero h1 {
    font-size: 2rem;
  }

  .section-hero h1 span.welcome-text {
    font-size: 0.8rem;
  }

  .section-hero p {
    font-size: 0.95rem;
  }

  .hub-card {
    padding: 1.25rem;
    border-radius: var(--radius-md);
  }

  .card-title {
    font-size: 1.15rem;
  }

  .card-desc {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
  }

  .grid-container {
    gap: 1.25rem;
  }
}

/* Grids */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Cards */
.hub-card {
  background: var(--surface-color);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-smooth);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}

.hub-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-smooth);
}

@media (hover: hover) {
  .hub-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
  }

  .hub-card:hover::before {
    transform: scaleX(1);
  }
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: rgba(22, 163, 74, 0.1);
  color: var(--accent-color);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  transition: all var(--transition-fast);
}

@media (hover: hover) {
  .hub-card:hover .card-icon {
    background: var(--primary-gradient);
    color: white;
  }
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.card-action {
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (hover: hover) {
  .hub-card:hover .card-action i {
    transform: translateX(5px);
  }
}

.card-action i {
  transition: transform var(--transition-fast);
}

/* ==========================================================================
   Question Detail View
   ========================================================================== */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 2rem;
  transition: all var(--transition-fast);
}

.back-btn:hover {
  background: var(--bg-color);
  transform: translateX(-5px);
}

/* End of Section cleanup */

/* Combined logic below */

.faq-answer-content pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
  margin-top: 1rem;
  font-family: "Fira Code", "Cascadia Code", monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  white-space: pre;
  max-width: 100%;
  position: relative;
}

.code-container {
  position: relative;
  margin-top: 1.5rem;
}

.code-header {
  background: #1e293b;
  padding: 0.75rem 1.25rem;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: none;
}

.faq-answer-content .code-container pre {
  margin-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.q-text code {
  color: inherit;
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-family: inherit;
  font-size: 1em;
  font-weight: inherit;
  vertical-align: baseline;
  border: none;
}

.faq-answer-content :not(pre) > code {
  background: rgba(22, 163, 74, 0.08);
  color: var(--accent-color);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-family: "Fira Code", monospace;
  font-size: 0.9em;
  font-weight: 600;
  border: 1px solid rgba(22, 163, 74, 0.15);
}

.faq-answer-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border: none;
  white-space: pre;
  font-size: 1em;
}

.faq-answer-content code {
  white-space: normal;
}

/* Code block with label (similar to user's image) */
.code-container {
  margin-top: 1rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.code-header {
  background: #f1f5f9;
  /* Premium light slate background */
  height: 36px;
  /* Fixed height for perfect vertical centering */
  padding: 0 1rem;
  display: flex !important;
  align-items: center !important;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-color);
  /* Added premium accent line */
  letter-spacing: 0.05em;
  line-height: normal;
  white-space: nowrap;
}

.code-header span {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.code-header i {
  color: var(--accent-color);
  font-size: 1.2rem;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.code-container pre {
  margin-top: 0;
  border-radius: 0;
  border-left: none;
}

body.dark-mode .faq-answer-content :not(pre) > code {
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Extras: Contact & FAQ Forms
   ========================================================================== */
.form-container {
  max-width: 600px;
  margin: 0 auto;
  background: var(--surface-color);
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-primary);
  font-family: inherit;
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}

/* Premium Personal Notes Redesign */
.notes-container {
  margin-top: 1rem;
  margin-left: 10px;
  margin-right: 10px;
  padding: 1.2rem 1rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  width: auto;
  transition: all var(--transition-smooth);
}

.notes-container:focus-within {
  border-color: var(--accent-color);
  box-shadow: 0 4px 20px var(--accent-soft);
}

.notes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}

.notes-header h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-color);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
}

.notes-header h4 i {
  font-size: 1.4rem;
}

.save-note-btn {
  background: var(--accent-color);
  color: white !important;
  border: none;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px var(--accent-soft);
}

.save-note-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--accent-soft);
}

.save-note-btn i {
  font-size: 1.2rem;
}

.notes-area {
  width: 100%;
  min-height: 100px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.8rem;
  font-family: "Outfit", sans-serif;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text-primary);
  resize: none;
  outline: none;
  transition: all var(--transition-fast);
}

.notes-area::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.save-note-btn.saved-success {
  background: #2e7d32 !important;
  transform: scale(1.05);
}

/* Dark mode improvements for Personal Notes */
body.dark-mode .notes-container {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark-mode .notes-area {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

body.dark-mode .clear-note-btn {
  border-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

body.dark-mode .clear-note-btn:hover {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
}

@media (max-width: 10000px) {
  .notes-container {
    padding: 0.8rem;
  }

  .notes-header h4 {
    font-size: 0.85rem;
  }

  .save-note-btn {
    padding: 4px 12px;
    font-size: 0.8rem;
  }
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* Consolidation handled above */

/* Media Queries for Bottom Nav text on larger screens */
@media (min-width: 10000px) {
  .bottom-nav {
    width: 100%;
    max-width: 800px;
    border-radius: var(--radius-pill);
    padding: 0 2rem;
  }

  .nav-btn {
    flex-direction: row;
    width: auto;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
  }

  .nav-btn span {
    opacity: 1;
    position: relative;
    transform: none;
    bottom: 0;
    font-size: 0.9rem;
  }

  .nav-btn.active {
    transform: translateY(0);
  }

  .nav-btn.active i {
    transform: none;
  }
}

/* Scroll to top button */
.toast-notification {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a1a1a;
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  white-space: nowrap;
}

.toast-notification.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.toast-notification i {
  color: var(--accent-color);
  font-size: 1.2rem;
}

.scroll-top-btn {
  position: fixed;
  right: 16px !important;
  bottom: 20px !important;
  width: 45px;
  height: 45px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-smooth);
  z-index: 1500;
}

body.view-questions .scroll-top-btn {
  bottom: 76px !important;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-5px);
}

/* Mobile Enhancements for FAQ */
@media (max-width: 10000px) {
  .faq-question {
    padding: 1.1rem 15px 1.1rem 15px !important;
    gap: 0.5rem;
    align-items: center;
    /* Mobile centering for better balance */
  }

  .faq-question > span {
    gap: 1rem;
    /* More space between number and text */
    align-items: center;
  }

  .q-text {
    font-size: 0.9rem;
  }

  .q-number {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    font-size: 0.75rem;
    border-radius: 6px;
    flex: none;
  }

  .faq-icon {
    width: 30px;
    height: 30px;
    min-width: 30px;
    margin-top: 2px;
  }

  .faq-answer-content {
    padding: 7px 8px 15px 8px !important;
  }

  .q-text code {
    font-size: 1em;
    display: inline;
    word-break: normal;
    white-space: normal;
    background: transparent;
    padding: 0;
    color: inherit;
    font-family: inherit;
    font-weight: inherit;
    border: none;
  }
}

.notes-actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.clear-note-btn {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.clear-note-btn:hover {
  background: #ff5252;
  color: white;
  border-color: #ff5252;
}

.clear-note-btn i {
  font-size: 1.1rem;
}

/* Mobile Header Fixes */
@media (max-width: 10000px) {
  .header-content {
    grid-template-columns: auto 1fr auto;
    padding: 0 1rem;
    height: 50px !important;
    /* Force height on mobile */
  }

  .logo-section {
    grid-column: 1;
    justify-content: flex-start;
  }

  .logo {
    font-size: 1.1rem;
    /* Slightly smaller logo for 50px header */
  }

  .theme-toggle-btn,
  .search-toggle-btn {
    width: 35px !important;
    height: 35px !important;
    min-width: 35px !important;
    border-radius: 50% !important;
  }

  .theme-toggle-btn i,
  .search-toggle-btn i {
    font-size: 1.3rem !important;
    /* Balanced for 35px */
  }
}

/* ==========================================================================
   New Premium Features
   ========================================================================== */

/* Timer */
.timer-btn {
  background: var(--accent-soft);
  color: var(--accent-color);
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s;
}

.timer-btn:hover {
  background: var(--accent-color);
  color: white;
}

.timer-active {
  background: #ef4444 !important;
  color: white !important;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

/* QOTD Modal */
.qotd-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(5px);
}

.qotd-content {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 90%;
  width: 400px;
  text-align: center;
  box-shadow: var(--shadow-xl);
  position: relative;
  border: 2px solid var(--accent-color);
  color: var(--text-primary);
}

.qotd-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--bg-color);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
}

.qotd-title {
  color: var(--accent-color);
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ==========================================================================
   Landscape / Auto-Rotate Mode Fixes
   ========================================================================== */
@media (max-height: 500px) and (orientation: landscape) {
  /* Un-fix the header so it scrolls out of view and saves space */
  .main-header {
    position: absolute;
  }

  /* Un-fix the bottom nav so it doesn't block the screen */
  .bottom-nav {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    width: 100%;
    margin-top: 20px;
    border-radius: 0 !important;
  }

  /* Adjust main content padding since header is no longer fixed */
  main {
    padding-top: 60px;
  }
}

/* Question of the Day Modal */
.qotd-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.qotd-content {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.qotd-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 5px;
}

.qotd-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==========================================================================
   Code Snippet Styles
   ========================================================================== */
.code-container {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.code-header {
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between !important;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.code-header > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.copy-code-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer !important;
  transition: all var(--transition-fast);
}

.copy-code-btn i {
  font-size: 0.95rem !important;
  color: inherit !important;
}

.copy-code-btn:hover,
.copy-code-btn.copied {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background: var(--accent-soft);
}

.code-header i {
  font-size: 1.1rem;
  color: var(--accent-color);
}

.code-container pre {
  padding: 16px;
  margin: 0;
  overflow-x: auto;
  background: #1e1e1e;
}

.code-container code {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9rem;
  color: #e0e0e0;
  white-space: pre;
}

/* ==========================================================================
   Full Screen Search Overlay (Google Style)
   ========================================================================== */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--surface-color);
  z-index: 9999;
  display: none;
  /* Hidden by default */
  flex-direction: column;
  color: var(--text-primary);
  animation: fadeIn 0.2s ease-out;
}

.search-overlay.active {
  display: flex;
}

.search-overlay-header {
  display: flex;
  align-items: center;
  padding-top: calc(env(safe-area-inset-top, 0px) + 8px);
  padding-bottom: 10px;
  padding-left: 16px;
  padding-right: 16px;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.search-overlay-back {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
}

.search-overlay-input-wrapper {
  flex: 1;
  display: flex;
}

#search-overlay-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.1rem;
  outline: none;
}

#search-overlay-input::placeholder {
  color: var(--text-secondary);
}

.search-overlay-icon-btn {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 8px;
}

.search-overlay-content {
  flex: 1;
  overflow-y: auto;
  padding-top: 8px;
}

.recent-search-item {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  gap: 16px;
  cursor: pointer;
}

.recent-search-item:hover {
  background: var(--bg-color);
}

.recent-search-item i {
  color: var(--text-secondary);
  font-size: 1.3rem;
}

.recent-search-item span {
  font-size: 1rem;
  color: var(--text-primary);
  flex: 1;
}

/* ==========================================================================
   Splash Screen
   ========================================================================== */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff; /* Matches reference */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  transition:
    opacity 1.2s ease-out,
    visibility 1.2s;
}

body.dark-mode .splash-screen {
  background-color: #0b0f1a;
}

.splash-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

.splash-content {
  text-align: center;
}

.splash-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

body.dark-mode .splash-logo {
  color: #f1f5f9;
}

.splash-logo .highlight {
  color: #16a34a;
}

.logo-underline {
  width: 0;
  height: 4px;
  background-color: #16a34a;
  margin-top: 10px;
  border-radius: 2px;
  animation: lineLoad 1.8s ease-in-out forwards;
}

@keyframes lineLoad {
  from {
    width: 0;
  }
  to {
    width: 200px;
  }
}

/* ==========================================================================
   Practice Mode & Controls
   ========================================================================== */
.questions-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 1.5rem;
  padding: 0 5px;
}

.btn-control {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.btn-control i {
  font-size: 1.2rem;
  color: var(--accent-color);
}

.btn-control.active {
  background: var(--accent-soft);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.btn-control.active i {
  color: var(--accent-color);
}

/* Practice Mode Hiding Logic */
.practice-mode-active .faq-answer {
  display: none !important;
}

.practice-mode-active .faq-item.active .faq-answer {
  display: block !important;
  max-height: none !important;
}

/* Hide navigation when search is active */
body.search-active .bottom-nav {
  display: none !important;
}

/* Hide fixed bottom elements when virtual keyboard is open */
body.keyboard-open main {
  padding-bottom: 20px !important;
}

body.keyboard-open .bottom-nav,
body.keyboard-open .sticky-bottom-ad {
  display: none !important;
}

@media screen and (max-height: 550px) {
  main#app-content {
    padding-bottom: 20px !important;
  }
  .bottom-nav,
  .sticky-bottom-ad {
    display: none !important;
  }
}

/* ==========================================================================
   Web Adsterra Ad Boxes
   ========================================================================== */
.ad-box-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1rem auto;
  overflow: hidden;
}

.ad-box-top {
  margin-top: 0.25rem;
  margin-bottom: 1.25rem;
}

.ad-box-infeed {
  margin: 0.75rem auto;
}

.ad-box-bottom {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.ad-box-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0.7;
  margin-bottom: 4px;
}

.ad-native-inner {
  width: 100%;
  display: flex;
  justify-content: center;
}

.ad-placeholder {
  width: 100%;
  max-width: 100%;
  border: 1.5px dashed var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.ad-type-top-banner .ad-placeholder,
.ad-type-sticky-bottom .ad-placeholder {
  max-width: 728px;
}

.ad-type-infeed-rect .ad-placeholder {
  max-width: 320px;
}

.ad-placeholder-compact {
  flex-direction: row;
  gap: 10px;
  padding: 6px 14px;
}

.ad-placeholder-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-color);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 999px;
}

.ad-placeholder-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ad-placeholder-size {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.sticky-bottom-ad {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 3900;
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border-color);
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0px)) 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.06);
}

.sticky-bottom-ad .ad-box-wrapper {
  margin: 0 auto;
}

.sticky-bottom-ad .ad-box-label {
  display: none;
}

/* ==========================================================================
   Website Mobile + Desktop Responsive Layout
   ========================================================================== */
.desktop-nav {
  display: none;
}

.mobile-menu-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer !important;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.mobile-menu-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.mobile-nav-drawer {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 0.75rem 1rem 1rem 1rem;
  background: var(--surface-color);
  border-top: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.mobile-nav-drawer.open {
  display: flex;
}

.mobile-nav-link {
  flex-direction: row !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  padding: 10px 14px !important;
  border-radius: var(--radius-sm) !important;
  width: 100%;
  text-align: left;
}

.mobile-nav-link i {
  font-size: 1.25rem !important;
  margin-bottom: 0 !important;
}

.mobile-nav-link span {
  font-size: 0.95rem !important;
  font-weight: 600 !important;
}

.mobile-nav-link.active {
  background: var(--accent-soft) !important;
  color: var(--accent-color) !important;
}

.mobile-nav-link.active i {
  transform: none !important;
}

.mobile-nav-link.active::after {
  display: none !important;
}

.desktop-topic-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.desktop-breadcrumb-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-color);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer !important;
  transition: all var(--transition-fast);
}

.desktop-breadcrumb-back:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.desktop-breadcrumb-back i {
  font-size: 1.05rem;
}

.desktop-topic-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.desktop-topic-meta h1 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.topic-count-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-color);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.site-footer {
  display: block;
  width: 100%;
  border-top: 1px solid var(--border-color);
  background: var(--surface-color);
  margin-top: 2rem;
}

body.view-questions .site-footer {
  padding-bottom: 85px;
}

.site-footer-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 2rem 0.95rem 1.5rem 0.95rem;
}

@media (min-width: 640px) {
  .site-footer-inner {
    padding: 2.25rem 1.5rem 1.5rem 1.5rem;
  }
}

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

@media (min-width: 640px) {
  .site-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .site-footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 2rem;
  }
}

.site-footer-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.site-footer-logo-img {
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
}

.site-footer-brand p {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-top: 0.65rem;
  line-height: 1.55;
  max-width: 340px;
}

.site-footer-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0.85rem;
}

.site-footer-trust span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-color);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.site-footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
}

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

.site-footer-col button,
.site-footer-col a {
  background: transparent;
  border: none;
  padding: 2px 0;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  text-align: left;
  cursor: pointer !important;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.site-footer-col button:hover,
.site-footer-col a:hover {
  color: var(--accent-color);
  transform: translateX(2px);
}

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

.site-footer-bottom p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.site-footer-copy {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

/* About / Privacy / Terms Modal */
.site-info-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 15, 26, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.site-info-card {
  width: 100%;
  max-width: 480px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.site-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.site-info-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.site-info-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer !important;
}

.site-info-close:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
}

.site-info-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-height: 55vh;
  overflow-y: auto;
}

.site-info-body strong {
  color: var(--text-primary);
}

@media (min-width: 900px) {
  .mobile-menu-btn,
  .mobile-nav-drawer {
    display: none !important;
  }

  .faq-answer-content,
  .q-text,
  pre,
  code {
    -webkit-user-select: text;
    user-select: text;
  }

  .main-header {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  .header-content {
    max-width: min(1440px, 96vw) !important;
    width: 100%;
    height: 56px !important;
    padding: 0 1.75rem !important;
    gap: 1.5rem !important;
    position: relative;
  }

  /* Arrange navbar cleanly as: Logo | Nav Links | Search | Theme Toggle */
  .logo-section {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    display: flex !important;
    order: 1;
    margin-right: 0 !important;
  }

  .logo span {
    font-size: 1.55rem !important;
  }

  .desktop-nav {
    display: flex !important;
    align-items: center;
    gap: 0.4rem;
    order: 2;
    margin-left: 1rem;
  }

  .desktop-nav-btn {
    flex-direction: row !important;
    flex: 0 0 auto !important;
    gap: 6px !important;
    padding: 8px 14px !important;
    border-radius: var(--radius-pill) !important;
    font-size: 0.92rem;
    font-weight: 600;
  }

  .desktop-nav-btn i {
    font-size: 1.15rem !important;
    margin-bottom: 0 !important;
  }

  .desktop-nav-btn span {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
  }

  .desktop-nav-btn.active {
    background: var(--accent-soft) !important;
    color: var(--accent-color) !important;
  }

  .desktop-nav-btn.active i {
    transform: none !important;
  }

  .desktop-nav-btn.active::after {
    display: none !important;
  }

  .desktop-nav-btn:hover {
    background: var(--accent-soft);
    color: var(--accent-color);
  }

  .search-section {
    display: none !important;
  }

  .left-section {
    display: none !important;
  }

  .header-right-actions {
    order: 3;
    margin-left: auto !important;
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center;
  }

  .back-section {
    display: none !important;
  }

  #theme-toggle {
    display: flex !important;
  }

  main#app-content {
    max-width: min(1440px, 96vw) !important;
    padding-top: 96px !important;
    padding-bottom: 3rem !important;
    padding-left: 1.75rem !important;
    padding-right: 1.75rem !important;
  }

  body.view-questions main#app-content {
    padding-bottom: 110px !important;
  }

  .section-hero {
    padding: 2rem 0 1.25rem 0 !important;
    margin-bottom: 1rem !important;
  }

  .section-hero h1 {
    font-size: 2.75rem !important;
  }

  .section-hero h1 span.welcome-text {
    font-size: 0.95rem !important;
  }

  .section-hero p {
    font-size: 1.1rem !important;
  }

  .grid-container {
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)) !important;
    gap: 1.5rem !important;
  }

  .hub-card {
    padding: 1.75rem !important;
  }

  .faq-container,
  .load-more-container,
  .category-notes-container,
  .desktop-topic-bar,
  .questions-study-bar {
    max-width: 1040px;
    margin-left: auto;
    margin-right: auto;
  }

  .desktop-topic-bar {
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
  }

  .desktop-topic-meta h1 {
    font-size: 1.45rem;
  }

  .site-footer-inner {
    max-width: min(1440px, 96vw);
    padding: 2.75rem 1.75rem 1.75rem 1.75rem;
  }

  .scroll-top-btn {
    right: 28px !important;
    bottom: 28px !important;
  }

  body.view-questions .scroll-top-btn {
    bottom: 95px !important;
  }

  .search-overlay-header,
  .search-overlay-content {
    max-width: 920px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Media Queries for very small screens (under 380px) */
@media (max-width: 380px) {
  .splash-logo {
    font-size: 2rem !important;
  }

  .notes-container,
  .category-notes-container {
    padding: 0.8rem 0.5rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .notes-header {
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
  }

  .notes-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .save-note-btn {
    padding: 6px 12px !important;
    font-size: 0.85rem !important;
  }

  /* Reduce global font sizes slightly */
  body {
    font-size: 0.95rem;
  }

  .card-title {
    font-size: 1.1rem !important;
  }

  .q-text {
    font-size: 0.85rem !important;
  }

  .faq-answer-content {
    font-size: 0.9rem !important;
  }

  /* Header layout for very small screens */
  .header-content {
    padding: 0 0.5rem !important;
  }

  .logo span {
    font-size: 1.15rem !important;
  }

  .logo i {
    font-size: 1.3rem !important;
  }

  .theme-toggle-btn,
  .search-toggle-btn,
  .mobile-menu-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
  }

  .theme-toggle-btn i,
  .search-toggle-btn i,
  .mobile-menu-btn i {
    font-size: 1.15rem !important;
  }

  .header-back-btn {
    width: 36px;
    height: 36px;
    margin-left: -6px;
  }

  .header-back-btn i {
    font-size: 1.5rem;
  }

  #header-topic-title {
    font-size: 0.95rem !important;
  }

  /* FAQ Question boxes for very small screens */
  .faq-question {
    padding: 0.8rem 10px !important;
    gap: 0.25rem !important;
  }

  .faq-question > span {
    gap: 0.5rem !important;
  }

  .q-number {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    font-size: 0.7rem !important;
    border-radius: 4px !important;
  }

  .faq-icon {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    margin-top: 0 !important;
  }
}

/* Mobile Navigation Fix */
@media (max-width: 600px) {
  .nav-btn {
    min-width: 0;
    flex: 1;
  }
  .nav-btn span {
    font-size: 0.55rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .bottom-nav {
    z-index: 9999 !important;
  }
}

/* ==========================================================================
   Impressive Website UX Enhancements (Hero, Stats, Filter, Study Tools)
   ========================================================================== */
.hero-website {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  padding: 0.75rem 0 0.5rem 0 !important;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-color);
  border: 1px solid rgba(22, 163, 74, 0.22);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.hero-badge i {
  font-size: 0.95rem;
}

.hero-actions {
  margin: 1.1rem auto 0.85rem auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 620px;
}

.hero-search-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  background: var(--surface-color);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  cursor: pointer !important;
  transition: all var(--transition-fast);
}

.hero-search-trigger:hover {
  border-color: var(--accent-color);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.hero-search-trigger i {
  color: var(--accent-color);
  font-size: 1.2rem;
}

.hero-search-trigger span {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 900px) {
  .hero-website {
    padding: 1.5rem 0 1rem 0 !important;
  }
}

.hero-cta-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  width: 100%;
  max-width: 600px;
}

.hero-cta-group-3 .hero-btn-games {
  grid-column: span 2;
}

@media (min-width: 640px) {
  .hero-cta-group-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero-cta-group-3 .hero-btn-games {
    grid-column: auto;
  }
}

.btn-games-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 1rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  color: #ffffff !important;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.28);
  transition: all var(--transition-fast);
  cursor: pointer !important;
}

.btn-games-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.btn-games-cta i {
  font-size: 1.15rem !important;
}

.hero-btn-primary,
.hero-btn-secondary {
  height: 44px !important;
  padding: 0 0.9rem !important;
  font-family: inherit !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  white-space: nowrap;
  width: 100%;
}

.hero-btn-primary i,
.hero-btn-secondary i {
  font-size: 1.15rem !important;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 1.25rem;
  border-radius: var(--radius-pill);
  background: var(--surface-color);
  color: var(--text-primary);
  border: 1.5px solid var(--border-color);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer !important;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-2px);
}

.quick-chips-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  margin: 0.6rem auto 1rem auto;
  overflow-x: auto;
  padding: 2px 2px 6px 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.quick-chips-row::-webkit-scrollbar {
  display: none;
}

@media (min-width: 768px) {
  .quick-chips-row {
    justify-content: center;
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

.quick-chips-label {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-right: 2px;
}

.quick-chip {
  flex: 0 0 auto;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer !important;
  transition: all var(--transition-fast);
}

.quick-chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-1px);
}

/* Interactive Infinite Marquee Strips (All Languages + All Companies) */
.marquee-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0.75rem auto 1.1rem auto;
  width: 100%;
  max-width: 1120px;
}

.marquee-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
}

@media (min-width: 768px) {
  .marquee-row {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
  }
}

.marquee-row-label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-color);
  white-space: nowrap;
  padding-left: 2px;
}

.marquee-row-label i {
  font-size: 0.95rem;
}

.marquee-label-company {
  color: #0284c7;
}

body.dark-mode .marquee-label-company {
  color: #38bdf8;
}

.marquee-viewport {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding: 4px 0;
  touch-action: pan-y;
  cursor: grab;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%);
}

.marquee-viewport.is-dragging {
  cursor: grabbing;
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  will-change: transform;
}

.marquee-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.marquee-chip-icon {
  font-size: 0.95rem;
  color: var(--accent-color);
}

.marquee-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  flex-shrink: 0;
}

.marquee-chip-company:hover {
  border-color: #0ea5e9;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.12);
}

.hero-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0.5rem auto 0.25rem auto;
  max-width: 720px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.hero-stat-item {
  padding: 0.7rem 0.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-right: 1px solid var(--border-color);
  cursor: pointer !important;
  transition: background var(--transition-fast);
}

.hero-stat-item:last-child {
  border-right: none;
}

.hero-stat-item:hover {
  background: var(--accent-soft);
}

.hero-stat-item strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-color);
  line-height: 1.2;
}

.hero-stat-item span {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
}

@media (min-width: 640px) {
  .hero-stat-item {
    padding: 0.9rem 0.75rem;
  }
  .hero-stat-item strong {
    font-size: 1.25rem;
  }
  .hero-stat-item span {
    font-size: 0.78rem;
  }
}

.section-subhead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1.25rem 0 1rem 0;
}

.section-subhead h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
}

.section-subhead p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.section-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-soft);
  color: var(--accent-color);
  border: none;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer !important;
  transition: all var(--transition-fast);
}

.section-link-btn:hover {
  background: var(--accent-color);
  color: #ffffff;
}

.section-link-btn i {
  font-size: 1rem;
}

.card-monogram {
  font-weight: 800;
  font-size: 1.05rem !important;
  letter-spacing: 0.04em;
}

.grid-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.5rem auto 1rem auto;
  max-width: 720px;
}

.grid-filter-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  box-shadow: var(--shadow-sm);
}

.grid-filter-input-wrap:focus-within {
  border-color: var(--accent-color);
  box-shadow: var(--shadow-glow);
}

.grid-filter-input-wrap i {
  color: var(--accent-color);
  font-size: 1.2rem;
}

.grid-filter-input-wrap input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
}

.grid-count-pill {
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-color);
  background: var(--accent-soft);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
}

/* Questions Study Bar */
.questions-study-bar {
  max-width: 920px;
  margin: 0 auto 1rem auto;
  padding: 0.85rem 1rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  box-shadow: var(--shadow-sm);
}

.study-progress-wrap {
  flex: 1;
  min-width: 190px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.study-progress-text {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.study-progress-text i {
  font-size: 1.05rem;
  color: var(--accent-color);
}

.study-progress-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: var(--bg-color);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.study-progress-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 999px;
  transition: width 0.3s ease;
}

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

.study-actions .btn-control {
  flex: 0 0 auto;
  padding: 7px 12px;
  font-size: 0.8rem;
  cursor: pointer !important;
}

.self-test-mode .faq-item:not(.active) .q-text::after {
  content: "Tap to reveal";
  display: inline-block;
  margin-left: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-color);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: middle;
}

/* Empty Saved State */
.empty-saved-card {
  max-width: 520px;
  margin: 1.5rem auto;
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--surface-color);
  border: 1.5px dashed var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.empty-saved-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem auto;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-saved-icon i {
  font-size: 2rem;
}

.empty-saved-card h2 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.empty-saved-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.empty-saved-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* ==========================================================================
   Combined Website: Placement Suite Promo & Cross-Nav Links
   ========================================================================== */
.nav-ext-link {
  text-decoration: none;
}

.placement-suite-section {
  margin: 0.5rem 0 1.5rem 0;
}

.suite-promo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 720px) {
  .suite-promo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.suite-promo-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--surface-color);
  border: 1.5px solid var(--border-color);
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-smooth);
  cursor: pointer !important;
}

.suite-promo-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-color);
}

.suite-promo-icon {
  width: 50px;
  height: 50px;
  min-width: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.suite-card-games .suite-promo-icon {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.25);
}

.suite-card-resume .suite-promo-icon {
  background: var(--primary-gradient);
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.25);
}

.suite-promo-icon i {
  font-size: 1.55rem;
}

.suite-promo-body {
  flex: 1;
  min-width: 0;
}

.suite-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
  background: var(--accent-soft);
  color: var(--accent-color);
}

.suite-card-games .suite-badge {
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
}

body.dark-mode .suite-card-games .suite-badge {
  color: #38bdf8;
}

.suite-promo-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--text-primary);
}

.suite-promo-body p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.suite-arrow {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.suite-promo-card:hover .suite-arrow {
  color: var(--accent-color);
  transform: translateX(4px);
}

.quick-chip-game {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  border-color: rgba(14, 165, 233, 0.35);
  color: #0284c7;
}

body.dark-mode .quick-chip-game {
  color: #38bdf8;
}

.quick-chip-game i {
  font-size: 0.95rem;
}

.quick-chip-game:hover {
  background: rgba(14, 165, 233, 0.14);
  border-color: #0ea5e9;
  color: #0ea5e9;
}

.section-link-games {
  text-decoration: none;
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
}

body.dark-mode .section-link-games {
  color: #38bdf8;
}

.section-link-games:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  color: #ffffff;
}

.game-showcase-card {
  text-decoration: none;
  color: inherit;
}

.game-showcase-card::before {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
}

@media (hover: hover) {
  .game-showcase-card:hover .game-card-icon {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    color: #ffffff;
  }
}

.game-card-top-row {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.game-card-icon {
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
}

body.dark-mode .game-card-icon {
  color: #38bdf8;
}

.game-tag-pill {
  font-size: 0.68rem;
  font-weight: 700;
  color: #0284c7;
  background: rgba(14, 165, 233, 0.12);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

body.dark-mode .game-tag-pill {
  color: #38bdf8;
}

.game-card-action {
  color: #0ea5e9;
}

.resume-banner-wrap {
  margin-top: 1.15rem;
}

/* ==========================================================================
   Pro Polish: Navbar Brand Badge, Hero Backdrop, Continue Banner, Role Paths
   ========================================================================== */
.nav-brand-img {
  border-radius: 9px;
  box-shadow: 0 3px 10px rgba(22, 163, 74, 0.25);
  flex-shrink: 0;
}

.hero-website {
  position: relative;
}

/* Laptop/Desktop Left & Right Floating Icon Clusters */
.hero-side-cluster {
  display: none;
}

@media (min-width: 1180px) {
  .hero-side-cluster {
    display: block;
    position: absolute;
    top: 8px;
    width: 170px;
    height: 350px;
    pointer-events: none;
    z-index: 1;
  }

  .hero-side-left {
    right: calc(100% + 14px);
  }

  .hero-side-right {
    left: calc(100% + 14px);
  }

  .hero-float-badge {
    position: absolute;
    top: var(--top, 0px);
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 13px 8px 9px;
    border-radius: 999px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0.92;
    white-space: nowrap;
    will-change: transform;
    animation: heroSideFloat var(--dur, 6s) ease-in-out var(--delay, 0s) infinite;
  }

  .hero-side-left .hero-float-badge {
    right: var(--offset, 12px);
  }

  .hero-side-right .hero-float-badge {
    left: var(--offset, 12px);
  }

  .hero-float-badge .hfb-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .hero-float-badge .hfb-icon i {
    font-size: 16px;
  }

  .hero-float-badge .hfb-text {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
  }

  .hero-float-badge.hfb-emerald .hfb-icon {
    background: rgba(16, 185, 129, 0.14);
    color: #10b981;
  }

  .hero-float-badge.hfb-sky .hfb-icon {
    background: rgba(14, 165, 233, 0.14);
    color: #0284c7;
  }

  .hero-float-badge.hfb-indigo .hfb-icon {
    background: rgba(99, 102, 241, 0.14);
    color: #6366f1;
  }

  .hero-float-badge.hfb-amber .hfb-icon {
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
  }

  .hero-float-badge.hfb-rose .hfb-icon {
    background: rgba(244, 63, 94, 0.14);
    color: #e11d48;
  }
}

@media (min-width: 1360px) {
  .hero-side-cluster {
    width: 215px;
  }

  .hero-side-left {
    right: calc(100% + 28px);
  }

  .hero-side-right {
    left: calc(100% + 28px);
  }
}

@keyframes heroSideFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(var(--rot, 0deg));
  }
  50% {
    transform: translate3d(0, -11px, 0) rotate(calc(var(--rot, 0deg) * -0.5));
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-float-badge {
    animation: none !important;
  }
}

.hero-website::after {
  content: "";
  position: absolute;
  inset: -12px -24px 0 -24px;
  background-image: radial-gradient(rgba(22, 163, 74, 0.14) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 75% 70% at 50% 40%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 40%, #000 40%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}

.continue-study-wrap {
  display: flex;
  justify-content: center;
  margin-top: 0.9rem;
}

.continue-study-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface-color);
  border: 1px solid rgba(22, 163, 74, 0.35);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.82rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer !important;
  transition: all var(--transition-fast);
}

.continue-study-banner:hover {
  border-color: var(--accent-color);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.continue-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-color);
  box-shadow: 0 0 8px var(--accent-color);
}

.continue-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.continue-study-banner strong {
  color: var(--accent-color);
  font-weight: 700;
}

.continue-study-banner i {
  font-size: 1rem;
  color: var(--accent-color);
}

.career-tracks-section {
  margin: 1.75rem 0 1rem 0;
}

.career-tracks-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 760px) {
  .career-tracks-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.career-track-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.career-track-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-color);
  box-shadow: var(--shadow-md);
}

.track-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.track-header i {
  color: var(--text-secondary);
  font-size: 1.35rem;
}

.track-badge {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-color);
}

.track-badge-blue {
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
}

body.dark-mode .track-badge-blue {
  color: #38bdf8;
}

.track-badge-purple {
  background: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
}

body.dark-mode .track-badge-purple {
  color: #a78bfa;
}

.career-track-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-primary);
}

.career-track-card p {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.track-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 0.35rem;
}

.track-pills button,
.track-pills a {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer !important;
  transition: all var(--transition-fast);
}

.track-pills button:hover,
.track-pills a:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background: var(--accent-soft);
}

/* Request Topic / Report Bug Modal & Install Prompt */
.feedback-modal-card {
  max-width: 500px;
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.feedback-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.feedback-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.feedback-input:focus {
  border-color: var(--accent-color);
}

.feedback-textarea {
  resize: vertical;
  min-height: 82px;
}

.feedback-actions {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

.feedback-submit-btn,
.feedback-copy-btn {
  flex: 1;
  min-width: 140px;
  justify-content: center;
}

.feedback-status-msg {
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  font-size: 0.84rem;
  font-weight: 600;
}

.feedback-history-wrap {
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.feedback-history-title {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.feedback-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 130px;
  overflow-y: auto;
}

.feedback-history-item {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.feedback-history-item strong {
  color: var(--text-primary);
}

/* Show full website footer only on Home page; keep inner study screens clean */
body:not(.view-home) .site-footer {
  display: none !important;
}
