/* NoorSebha Pro v4.0 - Royal Islamic Emerald & Gold Theme (Light & Dark Modes) */
:root {
  --ns-header-bg: #0b5345;
  --ns-header-text: #ffffff;
  --ns-emerald: #0b5345;
  --ns-emerald-hover: #0e6655;
  --ns-emerald-soft: rgba(11, 83, 69, 0.11);
  --ns-gold: #c59b27;
  --ns-gold-bright: #e5b842;
  --ns-gold-soft: rgba(197, 155, 39, 0.15);
  --ns-bg: #faf7f0;
  --ns-surface: #ffffff;
  --ns-surface-alt: #f2ede2;
  --ns-text-main: #182825;
  --ns-text-sub: #475a55;
  --ns-text-muted: #70827d;
  --ns-border: #e3dccb;
  --ns-border-strong: #cfc5ae;
  --ns-danger: #c0392b;
  --ns-success: #148f77;
  --shadow-card: 0 2px 10px rgba(11, 83, 69, 0.06), 0 6px 20px rgba(11, 83, 69, 0.04);
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 7px;
}

[data-theme="dark"] {
  --ns-header-bg: #07221c;
  --ns-header-text: #f3efe6;
  --ns-emerald: #1abc9c;
  --ns-emerald-hover: #24d3b0;
  --ns-emerald-soft: rgba(26, 188, 156, 0.15);
  --ns-gold: #e5b842;
  --ns-gold-bright: #f4d068;
  --ns-gold-soft: rgba(229, 184, 66, 0.16);
  --ns-bg: #061512;
  --ns-surface: #0c221d;
  --ns-surface-alt: #132e28;
  --ns-text-main: #f3efe6;
  --ns-text-sub: #b8c9c4;
  --ns-text-muted: #829993;
  --ns-border: #1d3c35;
  --ns-border-strong: #285249;
  --ns-danger: #e74c3c;
  --ns-success: #1abc9c;
  --shadow-card: 0 4px 18px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}

body {
  background-color: var(--ns-bg);
  color: var(--ns-text-main);
  line-height: 1.7;
  min-height: 100vh;
  direction: rtl;
  padding-bottom: 134px;
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Hide All Ad Badges Completely */
.ad-badge {
  display: none !important;
}

/* Dynamic Sadaqah Jariyah Top Banner */
.sadaqah-top-banner {
  background: linear-gradient(135deg, #0b5345, #148f77);
  color: #ffffff;
  border-bottom: 2px solid var(--ns-gold-bright);
  padding: 10px 0;
}

.sadaqah-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.sadaqah-badge {
  background: var(--ns-gold-bright);
  color: #182825;
  font-weight: 900;
  font-size: 0.78rem;
  padding: 2px 10px;
  border-radius: 999px;
  margin-left: 8px;
}

.sadaqah-cta-chip {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.79rem;
  font-weight: 800;
  cursor: pointer;
}

/* Top App Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--ns-header-bg);
  color: var(--ns-header-text);
  padding: 12px 0;
  border-bottom: 2px solid var(--ns-gold);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ns-header-text);
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f4d068, #c59b27);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  color: #0b5345;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(244, 208, 104, 0.25);
}

.brand-text h1 {
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-version {
  font-size: 0.68rem;
  background: var(--ns-gold);
  color: #0b2e26;
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 900;
}

.brand-text span {
  font-size: 0.76rem;
  opacity: 0.9;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.theme-btn {
  background-color: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.83rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-btn:hover {
  background-color: rgba(255, 255, 255, 0.24);
}

/* Hero Banner */
.hero {
  background-color: var(--ns-surface);
  border: 1px solid var(--ns-border);
  border-right: 5px solid var(--ns-gold);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin: 14px 0;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-content h2 {
  font-size: 1.24rem;
  font-weight: 900;
  color: var(--ns-text-main);
  margin-bottom: 4px;
}

.highlight-gold {
  color: var(--ns-gold);
}

.hero-content p {
  color: var(--ns-text-sub);
  font-size: 0.9rem;
}

.security-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--ns-gold-soft);
  color: var(--ns-text-main);
  border: 1px solid var(--ns-gold);
  padding: 6px 13px;
  border-radius: var(--radius-md);
  font-size: 0.81rem;
  font-weight: 800;
  white-space: nowrap;
}

/* 6-Tabs Bar */
.tool-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background-color: var(--ns-border);
  border: 1px solid var(--ns-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}

.tab-btn {
  background-color: var(--ns-surface);
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--ns-text-sub);
  padding: 13px 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.89rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  background-color: var(--ns-surface-alt);
  color: var(--ns-text-main);
}

.tab-btn.active {
  color: var(--ns-emerald);
  border-bottom-color: var(--ns-gold);
  background-color: var(--ns-surface-alt);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Workspace Layout */
.workspace-grid {
  display: grid;
  grid-template-columns: 1.42fr 0.88fr;
  gap: 18px;
  align-items: start;
}

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

.side-column-stack {
  display: grid;
  gap: 16px;
}

.card {
  background-color: var(--ns-surface);
  border: 1px solid var(--ns-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--ns-border);
  flex-wrap: wrap;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ns-text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Electronic Sebha Ring & Presets */
.dhikr-presets-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.dhikr-chip {
  background-color: var(--ns-surface-alt);
  border: 1px solid var(--ns-border-strong);
  color: var(--ns-text-main);
  padding: 6px 12px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.81rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dhikr-chip:hover,
.dhikr-chip.active {
  background-color: var(--ns-emerald);
  color: #ffffff;
  border-color: var(--ns-gold);
}

.active-dhikr-banner {
  background: linear-gradient(135deg, var(--ns-emerald-soft), var(--ns-gold-soft));
  border: 1px solid var(--ns-gold);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-align: center;
  margin-bottom: 16px;
}

.current-dhikr-arabic {
  font-family: 'Amiri', 'Cairo', serif;
  font-size: 1.48rem;
  font-weight: 700;
  color: var(--ns-emerald);
  line-height: 1.6;
  margin-bottom: 4px;
}

.current-dhikr-virtue {
  font-size: 0.81rem;
  color: var(--ns-text-sub);
  font-weight: 700;
}

.sebha-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 8px 0 14px;
}

.sebha-circle-btn {
  position: relative;
  width: 224px;
  height: 224px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--ns-surface), var(--ns-surface-alt));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(11, 83, 69, 0.16), inset 0 2px 6px rgba(255, 255, 255, 0.4);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s ease;
}

.sebha-circle-btn:active {
  transform: scale(0.95);
}

.sebha-ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.sebha-ring-bg {
  fill: none;
  stroke: var(--ns-border-strong);
  stroke-width: 10;
}

.sebha-ring-fg {
  fill: none;
  stroke: var(--ns-gold);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 615.75;
  stroke-dashoffset: 615.75;
  transition: stroke-dashoffset 0.18s ease;
}

.sebha-circle-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.sebha-tap-hint {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--ns-text-muted);
}

.sebha-count-number {
  font-size: 3.3rem;
  font-weight: 900;
  color: var(--ns-emerald);
  line-height: 1.1;
  font-family: monospace, 'Cairo';
}

.sebha-target-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ns-gold);
  margin-top: 2px;
}

.sebha-targets-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.83rem;
  font-weight: 800;
  color: var(--ns-text-sub);
}

.target-pill {
  background-color: var(--ns-surface-alt);
  border: 1px solid var(--ns-border-strong);
  color: var(--ns-text-main);
  padding: 4px 13px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
}

.target-pill.active {
  background-color: var(--ns-gold);
  color: #182825;
  border-color: var(--ns-gold);
}

.sebha-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat-box {
  background-color: var(--ns-surface-alt);
  border: 1px solid var(--ns-border);
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--ns-text-sub);
  font-weight: 700;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--ns-emerald);
}

/* Interactive Adhkar Section */
.adhkar-progress-wrap {
  background-color: var(--ns-surface-alt);
  border: 1px solid var(--ns-border-strong);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 14px;
}

.adhkar-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.adhkar-progress-track {
  height: 9px;
  background-color: var(--ns-border);
  border-radius: 999px;
  overflow: hidden;
}

.adhkar-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ns-emerald), var(--ns-gold));
  transition: width 0.25s ease;
}

.category-pills {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.cat-pill {
  padding: 7px 14px;
  border-radius: 999px;
  background-color: var(--ns-surface-alt);
  border: 1px solid var(--ns-border-strong);
  color: var(--ns-text-sub);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.83rem;
  cursor: pointer;
}

.cat-pill.active,
.cat-pill:hover {
  background-color: var(--ns-emerald);
  color: #ffffff;
  border-color: var(--ns-emerald);
}

.adhkar-grid {
  display: grid;
  gap: 14px;
}

.adhkar-card {
  background-color: var(--ns-surface-alt);
  border: 1px solid var(--ns-border-strong);
  border-right: 4px solid var(--ns-emerald);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: all 0.2s ease;
}

.adhkar-card.completed {
  border-right-color: var(--ns-gold);
  opacity: 0.78;
  background-color: var(--ns-emerald-soft);
}

.adhkar-arabic-text {
  font-family: 'Amiri', 'Cairo', serif;
  font-size: 1.25rem;
  line-height: 1.85;
  color: var(--ns-text-main);
  margin-bottom: 10px;
}

.adhkar-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px dashed var(--ns-border-strong);
}

.adhkar-virtue-note {
  font-size: 0.79rem;
  color: var(--ns-text-sub);
  font-weight: 700;
  flex: 1;
}

.adhkar-count-btn {
  background-color: var(--ns-emerald);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 9px 18px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
  min-width: 145px;
  text-align: center;
  transition: transform 0.1s ease, background-color 0.15s ease;
}

.adhkar-count-btn:active {
  transform: scale(0.96);
}

.adhkar-count-btn.done {
  background-color: var(--ns-gold);
  color: #182825;
}

/* Quran Radio & Audio Player */
.quran-player-master {
  background: linear-gradient(135deg, var(--ns-emerald-soft), var(--ns-gold-soft));
  border: 1px solid var(--ns-gold);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.quran-now-playing {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quran-live-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #e74c3c;
  box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.25);
  animation: pulseDot 1.4s infinite;
  flex-shrink: 0;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.stations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.station-card {
  background-color: var(--ns-surface-alt);
  border: 1px solid var(--ns-border-strong);
  border-radius: var(--radius-md);
  padding: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.station-card.playing {
  border-color: var(--ns-gold);
  background-color: var(--ns-gold-soft);
}

/* Prayer Times Grid */
.prayer-controls-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.next-prayer-banner {
  background-color: var(--ns-gold-soft);
  border: 1px solid var(--ns-gold);
  border-radius: var(--radius-md);
  padding: 9px 15px;
  display: flex;
  flex-direction: column;
}

.prayer-times-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.prayer-card {
  background-color: var(--ns-surface-alt);
  border: 1px solid var(--ns-border-strong);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}

.prayer-card.next-active {
  border: 2px solid var(--ns-gold);
  background-color: var(--ns-gold-soft);
}

.prayer-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ns-text-sub);
}

.prayer-time-val {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--ns-emerald);
  margin-top: 4px;
  direction: ltr;
}

/* Sadaqah Jariyah Studio */
.sadaqah-link-box {
  background-color: var(--ns-surface-alt);
  border: 1px solid var(--ns-gold);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 12px;
}

.sadaqah-canvas-preview {
  text-align: center;
  background-color: var(--ns-surface-alt);
  border: 1px solid var(--ns-border-strong);
  border-radius: var(--radius-md);
  padding: 14px;
}

#sadaqahCanvas {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 2px solid var(--ns-gold);
}

/* 99 Names of Allah & Duas Grid */
.names-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 12px;
}

.name-card {
  background-color: var(--ns-surface-alt);
  border: 1px solid var(--ns-border-strong);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.name-arabic-title {
  font-family: 'Amiri', 'Cairo', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ns-emerald);
}

/* Inputs & Buttons */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--ns-text-sub);
}

.input-field,
.select-field {
  width: 100%;
  background-color: var(--ns-surface-alt);
  border: 1px solid var(--ns-border-strong);
  color: var(--ns-text-main);
  padding: 10px 13px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 600;
}

.input-field:focus,
.select-field:focus {
  outline: none;
  border-color: var(--ns-emerald);
  background-color: var(--ns-surface);
}

.paste-btn {
  background-color: var(--ns-surface);
  border: 1px solid var(--ns-border-strong);
  color: var(--ns-text-main);
  padding: 0 15px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  white-space: nowrap;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

.btn {
  padding: 11px 16px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.93rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-emerald {
  background-color: #0b5345;
  color: #ffffff;
}

.btn-emerald:hover {
  background-color: #0e6655;
}

.btn-gold {
  background: linear-gradient(135deg, #e5b842, #c59b27);
  color: #182825;
}

.btn-secondary {
  background-color: var(--ns-surface-alt);
  border: 1px solid var(--ns-border-strong);
  color: var(--ns-text-main);
}

.template-chip {
  background-color: var(--ns-surface-alt);
  border: 1px solid var(--ns-border-strong);
  color: var(--ns-text-main);
  padding: 5px 11px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.platform-badge {
  background-color: var(--ns-gold-soft);
  color: var(--ns-text-main);
  border: 1px solid var(--ns-gold);
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.quran-verse-box {
  font-family: 'Amiri', 'Cairo', serif;
  font-size: 1.24rem;
  text-align: center;
  padding: 14px;
  background-color: var(--ns-surface-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--ns-border-strong);
  color: var(--ns-emerald);
}

.virtues-mini-list {
  padding-right: 18px;
  font-size: 0.84rem;
  color: var(--ns-text-sub);
  display: grid;
  gap: 7px;
}

/* SEO, Footer & Modals */
.seo-section {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.seo-article h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--ns-emerald);
}

.seo-article p {
  margin-bottom: 10px;
  color: var(--ns-text-sub);
  font-size: 0.92rem;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.faq-item {
  background-color: var(--ns-surface-alt);
  border: 1px solid var(--ns-border);
  border-radius: var(--radius-md);
  padding: 14px;
}

.faq-item h4 {
  font-size: 0.94rem;
  margin-bottom: 5px;
  color: var(--ns-text-main);
}

.faq-item p {
  font-size: 0.86rem;
  color: var(--ns-text-sub);
}

.footer {
  margin-top: 36px;
  background-color: var(--ns-surface);
  border-top: 1px solid var(--ns-border);
  padding: 22px 0;
  text-align: center;
  color: var(--ns-text-muted);
  font-size: 0.84rem;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.footer-link-btn {
  background-color: var(--ns-surface-alt);
  border: 1px solid var(--ns-border-strong);
  color: var(--ns-text-main);
  padding: 6px 13px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.footer-link-btn:hover {
  background-color: var(--ns-emerald);
  color: #ffffff;
}

.legal-modal-card {
  max-width: 680px;
  text-align: right;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
}

.legal-modal-body {
  overflow-y: auto;
  padding: 6px 4px;
  font-size: 0.88rem;
  color: var(--ns-text-sub);
  line-height: 1.75;
}

.legal-modal-body h4 {
  color: var(--ns-emerald);
  font-size: 0.96rem;
  margin: 12px 0 4px;
}

/* Ads & Sticky Elements */
.ad-banner-top {
  background: var(--ns-surface);
  border: 1px solid var(--ns-border);
  border-radius: var(--radius-md);
  padding: 8px;
  margin: 12px 0;
  text-align: center;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.live-ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  width: 100%;
  overflow: hidden;
}

.ad-inline-cta {
  margin: 12px 0;
  border: 1px solid var(--ns-border);
  background: var(--ns-surface);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  text-align: center;
  overflow: hidden;
}

.ad-safe-margin {
  margin: 16px 0 !important;
}

.smartlink-promo-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--ns-emerald-soft), var(--ns-gold-soft));
  border: 1px solid var(--ns-gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-smartlink {
  background: linear-gradient(135deg, #e5b842, #c59b27);
  color: #182825;
  font-weight: 900;
  font-size: 0.84rem;
  padding: 9px 14px;
  border-radius: var(--radius-md);
  white-space: nowrap;
}

.sticky-bottom-ad {
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 950;
  background: var(--ns-surface);
  border-top: 2px solid var(--ns-gold);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.22);
  padding: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.close-sticky-ad {
  background: var(--ns-danger);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

.ad-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 21, 18, 0.86);
  z-index: 1400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ad-modal-backdrop.active {
  display: flex;
}

.ad-modal-card {
  background: var(--ns-surface);
  border: 2px solid var(--ns-gold);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 20px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.ad-modal-timer {
  display: inline-block;
  background: var(--ns-gold-soft);
  color: var(--ns-text-main);
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

/* Floating In-Page Push Ad */
.floating-push-ad {
  position: fixed;
  bottom: 118px;
  right: 14px;
  z-index: 1050;
  max-width: 345px;
  width: calc(100vw - 28px);
  background: var(--ns-surface);
  border: 2px solid var(--ns-gold);
  border-radius: 14px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.28);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.floating-push-ad.hidden-push {
  transform: translateY(150%);
  opacity: 0;
  pointer-events: none;
}

.floating-push-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ns-gold);
  color: #182825;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.floating-push-body {
  flex: 1;
  cursor: pointer;
  min-width: 0;
}

.floating-push-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.floating-push-time {
  font-size: 0.68rem;
  color: var(--ns-text-muted);
  font-weight: 700;
}

.floating-push-title {
  font-size: 0.83rem;
  font-weight: 900;
  color: var(--ns-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-push-desc {
  font-size: 0.74rem;
  color: var(--ns-text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-push-close {
  background: var(--ns-surface-alt);
  border: 1px solid var(--ns-border-strong);
  color: var(--ns-text-sub);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 900;
  cursor: pointer;
}

/* Mobile Bottom App Navigation Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  background: var(--ns-surface);
  border-top: 1px solid var(--ns-border-strong);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
  grid-template-columns: repeat(6, 1fr);
  padding: 4px 2px env(safe-area-inset-bottom, 4px);
}

.mobile-nav-item {
  background: transparent;
  border: none;
  color: var(--ns-text-sub);
  font-family: inherit;
  padding: 5px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  border-radius: 8px;
}

.mobile-nav-icon {
  font-size: 1.15rem;
  line-height: 1.1;
  padding: 2px 10px;
  border-radius: 999px;
}

.mobile-nav-label {
  font-size: 0.66rem;
  font-weight: 800;
  white-space: nowrap;
}

.mobile-nav-item.active {
  color: var(--ns-emerald);
}

.mobile-nav-item.active .mobile-nav-icon {
  background-color: var(--ns-gold-soft);
}

.toast {
  position: fixed;
  bottom: 80px;
  left: 20px;
  background-color: #0b5345;
  color: #ffffff;
  border: 1px solid var(--ns-gold);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transform: translateY(150%);
  opacity: 0;
  transition: all 0.22s ease;
  z-index: 1500;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Mobile-First Responsive Optimizations */
@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: grid;
  }

  .sticky-bottom-ad {
    bottom: 57px;
    padding: 5px 10px;
  }

  .floating-push-ad {
    bottom: 108px;
    right: 8px;
    left: 8px;
    width: auto;
    max-width: none;
  }

  .toast {
    bottom: 115px;
    left: 12px;
    right: 12px;
    text-align: center;
  }

  .nav-links {
    display: none;
  }

  .navbar {
    padding: 9px 0;
  }

  .brand-icon {
    width: 35px;
    height: 35px;
    font-size: 17px;
  }

  .brand-text h1 {
    font-size: 1.02rem;
  }

  .brand-text span {
    font-size: 0.68rem;
    display: block;
    max-width: 210px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .container {
    padding: 0 10px;
  }

  .hero {
    padding: 13px 14px;
    margin: 10px 0;
  }

  .hero-content h2 {
    font-size: 1.05rem;
    line-height: 1.45;
  }

  .card {
    padding: 14px 12px;
  }

  .tool-tabs {
    display: flex !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding: 6px;
    background: var(--ns-surface);
  }

  .tool-tabs::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    flex: 0 0 auto;
    border: 1px solid var(--ns-border-strong);
    border-radius: 999px;
    padding: 8px 13px;
    font-size: 0.81rem;
    white-space: nowrap;
  }

  .tab-btn.active {
    background-color: var(--ns-emerald);
    color: #ffffff;
    border-color: var(--ns-gold);
  }

  .input-field,
  .select-field {
    font-size: 16px;
    min-height: 44px;
  }

  .btn {
    min-height: 45px;
  }
}
