/* =============================================
   TypingBoard.IN — Light / Daylight Theme
   Clean · Simple · Professional · Daily Use
   ============================================= */

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

:root {
  --bg: #f4f7fb;
  --bg-white: #ffffff;
  --bg-soft: #eaf3fa;
  --card: #ffffff;
  --border: #ccdcec;
  --accent: #2F77AD;
  --accent-dark: #235d87;
  --accent-light: #e6f1f8;
  --accent2: #e63946;
  --green: #2b9348;
  --green-light: #edf7f0;
  --red: #e63946;
  --red-light: #fdecea;
  --orange: #f77f00;
  --text: #1a1d2e;
  --text-sub: #4a4f6a;
  --text-muted: #8a90a8;
  --correct: #2b9348;
  --wrong: #e63946;
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.10);
  --radius-sm: 5px;
  --radius: 5px;
  --radius-lg: 14px;
  --font: 'Inter', sans-serif;
  --font-hindi: 'Noto Sans Devanagari', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: all 0.15s ease;
  --nav-h: 56px;
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@font-face {
  font-family: 'Kruti Dev 501';
  src: url('https://db.onlinewebfonts.com/t/2dbac25f0ad9e9b08f4cbfc2b5f6b0f1.woff2') format('woff2'),
    url('https://db.onlinewebfonts.com/t/2dbac25f0ad9e9b08f4cbfc2b5f6b0f1.woff') format('woff'),
    url('https://db.onlinewebfonts.com/t/2dbac25f0ad9e9b08f4cbfc2b5f6b0f1.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: var(--font);
}

input,
select,
textarea {
  font-family: var(--font);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: #c8cce0;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* TOP BAR (Smart Animated Notification) */
.top-bar {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  width: 100%;
  background: var(--accent);
  color: white;
  text-align: center;
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  z-index: 990;
  /* Below navbar */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);

  /* Animation baseline */
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, visibility 0.4s ease;
}

.top-bar.show-promo {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.top-bar-content {
  flex: 1;
  text-align: center;
}

.top-bar a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  margin-left: 6px;
}

.top-bar-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.top-bar-close:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* NAVBAR */
nav.navbar {
  background: var(--accent);
  border-bottom: 1.8px solid rgba(0, 0, 0, 0.25);
  /* Dark accent line effect */
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  /* Changed to stretch for full-height items */
  justify-content: space-between;
  padding: 0 20px;
  height: var(--nav-h);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: white;
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: -0.3px;
}

.logo-text span {
  color: rgba(255, 255, 255, 0.7);
}

.nav-menu {
  display: flex;
  align-items: stretch;
  /* Full-height items */
  gap: 0;
  /* No gap - boxy layout */
}

.nav-item {
  position: relative;
  display: flex;
  align-items: stretch;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 14px;
  /* Full height via stretch, horizontal padding only */
  height: 100%;
  /* Fill full navbar height */
  border-radius: 0;
  /* Boxy - no rounded corners */
  font-size: 0.855rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  /* White text on accent bg */
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  border: none;
  background: none;
}

.nav-link svg {
  width: 12px;
  height: 12px;
  transition: var(--transition);
  color: rgba(255, 255, 255, 0.7);
}

/* Hover State - remains active even when cursor is in the dropdown */
.nav-item:hover>.nav-link {
  color: var(--accent);
  /* Dark text on hover */
  background: rgba(255, 255, 255, 0.92);
  /* Light bg on hover */
}

.nav-item:hover>.nav-link svg {
  color: var(--accent);
  /* SVG turns dark too */
  transform: rotate(180deg);
}

/* Optional active styling if needed later, currently set to standard */
.nav-link.active {
  color: #fff;
  font-weight: 700;
}

/* (Removed redundant transform rule, merged above) */

.dropdown {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: calc(100% + 12px);
  /* Default state slightly pushed down */
  left: 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  min-width: 210px;
  z-index: 9999;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
  /* Elevated premium shadow */
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(10px);
}

/* Connecting Arrow pointing up to Navbar */
.dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 20px;
  width: 10px;
  height: 10px;
  background: var(--bg-white);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(45deg);
}

/* Desktop Hover Logic */
@media (min-width: 1025px) {
  .nav-item:hover .dropdown {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    /* Glides into place */
    top: calc(100% + 8px);
    /* Connects */
  }
}

/* Mobile Fallback - Hide desktop dropdowns completely */
@media (max-width: 1024px) {
  .dropdown {
    display: none !important;
  }
}

.dropdown-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 8px 10px 4px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  font-size: 0.845rem;
  transition: var(--transition);
  cursor: pointer;
}

.dropdown-item:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.dropdown-item .di-icon {
  font-size: 0.9rem;
  width: 18px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 4px;
  align-self: center;
  /* Vertically center it despite parent stretching */
  margin-left: -5px;
  /* Pull slightly closer to the left edge */
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  /* White lines on the dark accent navbar */
  border-radius: 2px;
  transition: var(--transition);
}

/* MOBILE DRAWER */

/* Dark backdrop */
.drawer-backdrop {
  visibility: hidden;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1099;
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-backdrop.open {
  visibility: visible;
  opacity: 1;
}

/* Drawer panel — slides in from left */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 82vw;
  background: var(--bg-white);
  z-index: 1100;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.14);
  padding: 0 0 40px;
}

.mobile-drawer.open {
  transform: translateX(0);
}

/* Drawer header */
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  position: sticky;
  top: 0;
  z-index: 1;
}

.drawer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-white);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: var(--font);
  transition: var(--transition);
  padding: 0;
  line-height: 1;
}

.drawer-close:hover {
  background: var(--red-light);
  border-color: var(--red);
  color: var(--red);
}

.mobile-section {
  margin-bottom: 14px;
}

.mobile-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 6px 6px;
}

.mobile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mobile-links a {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--text-sub);
  transition: var(--transition);
}

.mobile-links a:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}

/* QUICK TOOLS */
.quick-tools {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.quick-tools-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  padding: 0 20px;
}

.qt-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-sub);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.qt-item span {
  font-size: 0.95rem;
}

.qt-item:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.qt-item.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* LAYOUT */
.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-section {
  display: none;
  padding: 0 0 50px;
}

.page-section.active {
  display: block;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.st-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

/* HERO */
.hero {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 44px 20px 36px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 50px;
  padding: 4px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  font-size: 0.95rem;
  color: var(--text-sub);
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-stat .hs-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.hero-stat .hs-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Mobile Hero Redesign */
@media (max-width: 768px) {
  .hero {
    padding: 24px 15px 24px;
  }

  .hero h1 {
    font-size: 1.65rem;
  }

  /* Force stats into a single line */
  .hero-stats {
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: nowrap;
    /* Prevent wrapping */
  }

  .hero-stat {
    flex: 1;
    text-align: center;
  }

  .hero-stat .hs-num {
    font-size: 1.1rem;
    /* Smaller to fit 4 items */
  }

  .hero-stat .hs-lbl {
    font-size: 0.6rem;
    letter-spacing: 0;
    /* Clear up space */
  }

  /* Triangle CTA Layout — clean grid approach */
  .hero-cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 8px;
  }

  /* Main Menu spans both columns (full width row 1) */
  .cta-full-width {
    grid-column: 1 / -1;
    max-width: 60%;
    /* visually narrower  */
    margin: 0 auto;
    /* centred inside that full row */
    justify-content: center;
  }

  /* English & Hindi Test: each get one column (row 2) */
  .hero-cta a.btn {
    padding: 10px 0;
    font-size: 0.85rem;
    justify-content: center;
  }
}

/* Desktop Only Helper */
@media (min-width: 769px) {
  .mobile-only-btn {
    display: none !important;
  }
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 2px 8px rgba(67, 97, 238, 0.2);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-outline {
  background: white;
  color: var(--text-sub);
  border: 1px solid var(--border) !important;
}

.btn-outline:hover {
  border-color: var(--accent) !important;
  color: var(--accent);
}

/* HOME CARDS */
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}

.home-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.home-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.hc-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.hc-icon.blue {
  background: #eef1fd;
}

.hc-icon.pink {
  background: #fdecea;
}

.hc-icon.green {
  background: var(--green-light);
}

.hc-icon.teal {
  background: #e3f6fc;
}

.hc-icon.gold {
  background: #fff8e1;
}

.hc-icon.purple {
  background: #f3e8ff;
}

.home-card h3 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.home-card p {
  font-size: 0.8rem;
  color: var(--text-sub);
  line-height: 1.5;
}

.hc-arrow {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  transition: var(--transition);
}

.home-card:hover .hc-arrow {
  color: var(--accent);
  transform: translateY(-50%) translateX(3px);
}

.hc-badge {
  background: var(--accent);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-left: 5px;
  vertical-align: middle;
}

/* TEST SETUP */
.test-setup-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
}

.setup-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.setup-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.setup-field input,
.setup-field select {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  transition: var(--transition);
}

.setup-field input:focus,
.setup-field select:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.time-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.time-chip {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-sub);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  transition: var(--transition);
}

.time-chip.active,
.time-chip:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.mode-toggle {
  display: inline-flex;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.mode-btn {
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-sub);
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.mode-btn.active {
  background: var(--accent);
  color: white;
}

.options-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  align-items: center;
}

.toggle-option {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}

.toggle-option input[type="checkbox"] {
  display: none;
}

.toggle-sw {
  width: 34px;
  height: 20px;
  background: #d0d5e8;
  border-radius: 50px;
  position: relative;
  transition: var(--transition);
}

.toggle-sw::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-option input:checked+.toggle-sw {
  background: var(--accent);
}

.toggle-option input:checked+.toggle-sw::after {
  transform: translateX(14px);
}

.toggle-label {
  font-size: 0.82rem;
  color: var(--text-sub);
}

.start-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* TYPING ARENA */
.typing-arena {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.arena-header {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 11px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.arena-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.arena-user {
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 600;
}

.live-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
}

.ls-item {
  padding: 12px 16px;
  text-align: center;
  border-right: 1px solid var(--border);
}

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

.ls-val {
  font-size: 1.6rem;
  font-weight: 800;
  display: block;
  line-height: 1;
  font-family: var(--font-mono);
  color: var(--text);
}

.ls-lbl {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 2px;
}

.ls-item.timer .ls-val {
  color: var(--accent2);
}

.ls-item.wpm .ls-val {
  color: var(--accent);
}

.ls-item.accuracy .ls-val {
  color: var(--green);
}

.ls-item.errors .ls-val {
  color: var(--red);
}

/* ── 9-stat grid: tighter layout ── */
.live-stats.ls-9 {
  grid-template-columns: repeat(9, 1fr);
}

.live-stats.ls-9 .ls-item {
  padding: 10px 8px;
}

.live-stats.ls-9 .ls-val {
  font-size: 1.25rem;
}

.live-stats.ls-9 .ls-lbl {
  font-size: 0.6rem;
  letter-spacing: 0.5px;
}

/* Correct stat counter: green */
.ls-item.correct-stat .ls-val {
  color: var(--correct);
}

/* Wrong stat counter: red */
.ls-item.wrong-stat .ls-val {
  color: var(--wrong);
}

/* Net WPM: gold/teal accent */
.ls-item.net-wpm .ls-val {
  color: var(--gold, #f59e0b);
}

/* ── Arena Timer Badge (centre of header) ── */
.arena-timer-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.atb-val {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  line-height: 1.1;
  color: var(--accent);
}

.atb-lbl {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Last 30s: text turns red and blinks */
.arena-timer-badge.danger .atb-val {
  color: var(--wrong);
  animation: pulse-danger-text 0.8s infinite alternate;
}

@keyframes pulse-danger-text {
  from {
    opacity: 1;
  }

  to {
    opacity: 0.55;
  }
}

.progress-bar-wrap {
  height: 3px;
  background: var(--bg-soft);
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.4s ease;
}

/* ──── MIRROR SHARED VARIABLES ────
   Both passage-display & type-input use IDENTICAL
   font, size, line-height, padding so they look
   like a true mirror of each other.
──────────────────────────────────── */
:root {
  --passage-font-size: 1.05rem;
  --passage-line-height: 1.9;
  --passage-padding: 12px 14px;
  --passage-min-height: 155px;
  /* ~5 lines */
}

.passage-area {
  padding: 18px 20px;
}

/* ── Passage Display (top — reference text) ── */
.passage-display {
  background: #fafcff;
  /* A very light, clean off-white */
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--passage-padding);
  font-family: var(--font-mono);
  font-size: var(--passage-font-size);
  line-height: var(--passage-line-height);
  letter-spacing: 0.2px;
  margin-bottom: 12px;
  min-height: var(--passage-min-height);
  user-select: none;
  word-break: break-word;
  overflow-y: auto;
  text-align: justify;
  hyphens: auto;
}

.passage-display.hindi {
  font-family: var(--font-hindi);
  font-size: var(--passage-font-size);
  line-height: 2.2;
  letter-spacing: 0;
}

/* ─── OLD char-based classes (kept for tutor compatibility) ─── */
.char {
  display: inline;
}

.char.correct {
  color: var(--correct);
}

.char.wrong {
  color: var(--wrong);
  background: var(--red-light);
  border-radius: 2px;
}

.char.current {
  background: #fff3cd;
  color: var(--text);
  border-bottom: 2px solid var(--accent);
}

.char.pending {
  color: var(--text);
}

/* ─── NEW word-based classes (for typing tests) ─── */
.word {
  display: inline;
  border-radius: 3px;
  padding: 1px 0;
  transition: background 0.12s, color 0.12s;
}

/* Current word: highlighted like cursor — warm amber glow */
.word.current {
  background: rgba(255, 214, 75, 0.35);
  outline: 1.5px solid rgba(255, 180, 0, 0.6);
  border-radius: 3px;
  color: var(--text-primary);
}

/* Correctly typed word: green */
.word.correct {
  color: var(--correct);
  background: rgba(67, 233, 123, 0.08);
}

/* Incorrectly typed word: red */
.word.wrong {
  color: var(--wrong);
  background: rgba(255, 64, 88, 0.1);
}

/* Pending words: normal color, no highlight */
.word.pending {
  color: var(--text);
}

.type-input-wrap {
  position: relative;
}

/* ── Type Input (bottom — user typing area) ── */
.type-input {
  width: 100%;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);

  /* ↓ Exactly match passage-display spacing */
  padding: var(--passage-padding);

  color: var(--text);

  /* ↓ Mirror same font & size as passage */
  font-size: var(--passage-font-size);
  font-family: var(--font-mono);
  letter-spacing: 0.2px;

  resize: none;
  min-height: var(--passage-min-height);
  height: auto;
  transition: var(--transition);

  /* ↓ Mirror same line-height as passage */
  line-height: var(--passage-line-height);
  word-break: break-word;
  overflow-y: auto;
  text-align: justify;
}

/* Hindi mirror — same font, line-height synced */
.type-input.hindi {
  font-family: var(--font-hindi);
  letter-spacing: 0;
  line-height: 2.2;
}

.type-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.type-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.start-overlay {
  position: absolute;
  inset: 0;
  background: rgba(245, 246, 250, 0.94);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1.5px dashed var(--accent);
}

.start-overlay:hover {
  background: var(--accent-light);
}

.arena-footer {
  padding: 10px 20px;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.arena-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.arena-actions {
  display: flex;
  gap: 6px;
}

.icon-btn {
  background: white;
  border: 1px solid var(--border);
  color: var(--text-sub);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.79rem;
  font-weight: 500;
  transition: var(--transition);
  font-family: var(--font);
}

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

/* RESULT */
.result-panel {
  display: none;
}

.result-panel.show {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.result-header {
  background: var(--accent);
  padding: 24px 28px;
  text-align: center;
}

.result-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: white;
  margin-bottom: 4px;
}

.result-header p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
}

.result-grade {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  padding: 4px 16px;
  margin-top: 10px;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
}

.result-body {
  padding: 24px 28px;
}

.result-main-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.result-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  text-align: center;
  border-top: 3px solid transparent;
}

.result-card.rc-speed {
  border-top-color: var(--accent);
}

.result-card.rc-net {
  border-top-color: #6f42c1;
}

.result-card.rc-acc {
  border-top-color: var(--green);
}

.result-card.rc-err {
  border-top-color: var(--red);
}

.result-card.rc-time {
  border-top-color: var(--orange);
}

.result-card .rv {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  font-family: var(--font-mono);
  margin-bottom: 3px;
  color: var(--text);
}

.result-card.rc-speed .rv {
  color: var(--accent);
}

.result-card.rc-net .rv {
  color: #6f42c1;
}

.result-card.rc-acc .rv {
  color: var(--green);
}

.result-card.rc-err .rv {
  color: var(--red);
}

.result-card.rc-time .rv {
  color: var(--orange);
}

.result-card .rl {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.detail-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
}

.detail-tab {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-sub);
  cursor: pointer;
  transition: var(--transition);
}

.detail-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.detail-content {
  display: none;
}

.detail-content.active {
  display: block;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}

.detail-table th {
  background: var(--bg-soft);
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.detail-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-sub);
}

.detail-table td:last-child {
  color: var(--text);
  font-weight: 600;
  font-family: var(--font-mono);
}

.detail-table tr:last-child td {
  border-bottom: none;
}

.detail-table tr:hover td {
  background: var(--bg-soft);
}

.result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

/* =============== CONVERTER TOOLS =============== */
.converter-stacked-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.converter-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.converter-panel:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.cp-header {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cp-title {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.cp-actions {
  display: flex;
  gap: 6px;
}

.cp-textarea {
  width: 100%;
  border: none;
  padding: 18px;
  font-size: 1.1rem;
  line-height: 1.8;
  resize: vertical;
  min-height: 160px;
  background: white;
  color: var(--text);
  transition: var(--transition);
}

.cp-textarea:focus {
  outline: none;
}

.krutidev-textarea,
.chanakya-textarea {
  font-family: 'Kruti Dev 501', 'Kruti Dev 010', 'Chanakya', var(--font-hindi);
  /* Fallbacks for typing logic */
}

.unicode-textarea {
  font-family: var(--font-hindi);
}

.converter-action-area {
  display: flex;
  justify-content: center;
  margin: 4px 0;
}

.btn-convert {
  font-size: 1.05rem !important;
  padding: 12px 32px !important;
  border-radius: 50px !important;
  box-shadow: 0 4px 14px rgba(67, 97, 238, 0.25) !important;
}

.btn-convert span {
  font-size: 1.2rem;
  transition: transform 0.2s;
  display: inline-block;
}

.btn-convert:hover span {
  transform: translateY(2px);
}

.conv-char-count {
  font-size: 0.73rem;
  color: var(--text-muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 2px 10px;
  font-family: var(--font-mono);
  line-height: 1;
  align-self: center;
}

/* =============================================== */

/* INFO CARDS */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.info-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 7px;
  color: var(--accent);
}

.info-card p {
  font-size: 0.81rem;
  color: var(--text-sub);
  line-height: 1.6;
}

/* FAQ */
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-q {
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
}

.faq-q:hover {
  background: var(--bg-soft);
}

.faq-arrow {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
}

.faq-a {
  display: none;
  padding: 0 16px 14px;
  font-size: 0.83rem;
  color: var(--text-sub);
  line-height: 1.7;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.faq-item.open .faq-a {
  display: block;
}

/* TUTOR */
.tutor-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
}

@media(max-width:900px) {
  .tutor-grid {
    grid-template-columns: 1fr;
  }
}

.lesson-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.lesson-header {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lesson-progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  flex: 1;
}

.lesson-progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.4s ease;
}

.lesson-body {
  padding: 18px;
}

.lesson-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}

.lesson-key-display {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-bottom: 2px solid var(--border);
  border-radius: 5px;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}

.tutor-passage {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  line-height: 2;
  margin-bottom: 12px;
}

.tutor-input {
  width: 100%;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font-mono);
  transition: var(--transition);
}

.tutor-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.lesson-list {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 480px;
  overflow-y: auto;
}

.ll-header {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 11px 16px;
  font-weight: 700;
  font-size: 0.85rem;
  position: sticky;
  top: 0;
}

.lesson-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.lesson-item:hover {
  background: var(--bg-soft);
}

.lesson-item.active {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
}

.lesson-item:last-child {
  border-bottom: none;
}

.li-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--text-sub);
}

.li-num.done {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.li-num.current {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.li-title {
  font-size: 0.83rem;
  font-weight: 600;
}

.li-sub {
  font-size: 0.73rem;
  color: var(--text-muted);
}

.li-badge {
  margin-left: auto;
  font-size: 0.67rem;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--green-light);
  color: var(--green);
  border: 1px solid var(--green);
}

/* KEYBOARD */
.kb-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.kb-lang-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.kb-lang-btn {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-sub);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.kb-lang-btn.active,
.kb-lang-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.keyboard-visual {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.kb-row {
  display: flex;
  gap: 5px;
}

.key {
  background: white;
  border: 1px solid #d0d5e8;
  border-bottom: 2px solid #b0b8d0;
  border-radius: 5px;
  min-width: 40px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  position: relative;
  font-family: var(--font-mono);
  flex-shrink: 0;
  transition: var(--transition);
}

.key:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.key.pressed,
.key:active {
  background: var(--accent);
  border-color: var(--accent-dark);
  transform: translateY(1px);
  border-bottom-width: 1px;
}

.key .k-main {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}

.key.pressed .k-main {
  color: white;
}

.key .k-shift {
  font-size: 0.58rem;
  color: var(--text-muted);
  position: absolute;
  top: 4px;
  right: 4px;
}

.key.wide-2 {
  min-width: 56px;
}

.key.wide-3 {
  min-width: 68px;
}

.key.wide-4 {
  min-width: 82px;
}

.key.wide-5 {
  min-width: 96px;
}

.key.space-key {
  flex: 1;
  min-width: 260px;
}

.kb-textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font-hindi);
  resize: vertical;
  min-height: 100px;
  transition: var(--transition);
  margin-top: 14px;
}

.kb-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
}

/* TOAST */
.toast-container {
  position: fixed;
  top: 70px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toast {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow-md);
  max-width: 280px;
}

.toast.success {
  border-left: 3px solid var(--green);
}

.toast.error {
  border-left: 3px solid var(--red);
}

.toast.info {
  border-left: 3px solid var(--accent);
}

/* FOOTER */
footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  padding: 40px 20px 20px;
  margin-top: 50px;
}

.footer-grid {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.4fr;
  gap: 32px;
  margin-bottom: 32px;
}

@media(max-width:1000px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media(max-width:600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand p {
  font-size: 0.81rem;
  color: var(--text-sub);
  line-height: 1.7;
  margin: 10px 0;
}

.footer-social {
  display: flex;
  gap: 8px;
}

.social-btn {
  width: 32px;
  height: 32px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.social-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.footer-col h4 {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  color: var(--text-sub);
  font-size: 0.82rem;
  margin-bottom: 7px;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--accent);
  padding-left: 3px;
}

.footer-newsletter input {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text);
  font-size: 0.82rem;
  margin-bottom: 7px;
}

.footer-newsletter input:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
}

.footer-bottom {
  max-width: 1300px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* UTILITY */
.hidden {
  display: none !important;
}

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

.text-muted {
  color: var(--text-muted);
}

/* RESPONSIVE */
@media(max-width:1024px) {
  .nav-menu {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-container {
    justify-content: flex-start;
    gap: 16px;
  }
}

@media(max-width:768px) {
  .hero {
    padding: 32px 16px 28px;
  }

  /* Mobile mirror: both get same smaller size */
  .passage-display,
  .type-input {
    font-size: 0.92rem;
    padding: 10px 12px;
    min-height: 140px;
    /* ~5 lines on mobile */
  }


  .setup-row {
    grid-template-columns: 1fr;
  }

  .live-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .result-body {
    padding: 18px 14px;
  }

  .ls-val {
    font-size: 1.3rem;
  }

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

  .hide-on-mobile {
    display: none !important;
  }

  .quick-tools {
    display: none;
  }

  .container {
    padding: 0 9px;
  }

  .home-card {
    padding: 12px;
    text-align: center;
  }

  .home-card .hc-icon {
    margin: 0 auto 10px;
  }

  .home-card h3 {
    font-size: 0.88rem;
  }

  .home-card p {
    margin-top: 8px;
  }

  .home-card .hc-arrow {
    display: none;
  }
}

@media(max-width:480px) {
  .result-main-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-stats {
    gap: 20px;
  }
}

/* =======================================================
   GOOGLE ADSENSE — ANCHOR / STICKY BOTTOM AD STYLES
   ======================================================= */

/* Main anchor container — fixed at screen bottom */
#adsense-anchor {
  display: none;
  /* JS से show होगा */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -3px 16px rgba(0, 0, 0, 0.10);
  text-align: center;
  padding: 6px 36px 6px 8px;
  /* right padding for close btn */
  min-height: 62px;
  display: none;
  align-items: center;
  justify-content: center;
  animation: anchorSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes anchorSlideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Close button */
.anchor-close-btn {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.68rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-family: var(--font);
  transition: var(--transition);
  line-height: 1;
}

.anchor-close-btn:hover {
  background: var(--red-light);
  border-color: var(--red);
  color: var(--red);
}

/* AdSense <ins> element */
#adsense-anchor .adsbygoogle {
  display: block;
  margin: 0 auto;
}

/* 🔧 TESTING PLACEHOLDER — real AdSense होने पर यह hide होगा */
.anchor-test-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 320px;
  height: 50px;
  background: repeating-linear-gradient(45deg,
      #f4f7fb,
      #f4f7fb 8px,
      #e6f1f8 8px,
      #e6f1f8 16px);
  border: 1.5px dashed var(--accent);
  border-radius: 4px;
}

.anchor-ad-label {
  background: var(--accent);
  color: white;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.anchor-ad-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Desktop पर कभी नहीं दिखेगा */
@media(min-width: 769px) {
  #adsense-anchor {
    display: none !important;
  }
}

/* Mobile पर body को नीचे spacing दें ताकि content banner के पीछे न छुपे */
@media(max-width: 768px) {
  body.anchor-ad-visible {
    padding-bottom: 68px;
  }
}