/* ==========================================================================
   wt Links - Modern Light-Mode App Design System
   Matches Logo & Splash Screen (Pink-Purple Gradient, WhatsApp, Telegram)
   Strictly Light Mode
   ========================================================================== */

:root {
  /* Brand Gradients & Accents */
  --brand-gradient: linear-gradient(135deg, #ff2d8d 0%, #a855f7 50%, #6366f1 100%);
  --brand-gradient-hover: linear-gradient(135deg, #f42582 0%, #9333ea 50%, #4f46e5 100%);
  --brand-pink: #ff2d8d;
  --brand-purple: #7c3aed;
  --brand-indigo: #6366f1;
  --brand-pink-subtle: rgba(255, 45, 141, 0.08);
  --brand-purple-subtle: rgba(124, 58, 237, 0.08);
  
  /* Platform Colors */
  --whatsapp: #25D366;
  --whatsapp-dark: #128C7E;
  --whatsapp-light: #dcf8c6;
  --whatsapp-bg: rgba(37, 211, 102, 0.12);
  --telegram: #229ED9;
  --telegram-dark: #0088cc;
  --telegram-bg: rgba(34, 158, 217, 0.12);

  /* Light Theme Palette */
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #e2e8f0;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --border-focus: #ff2d8d;

  /* Typography */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 4px -1px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
  --shadow-brand: 0 8px 20px -4px rgba(255, 45, 141, 0.35);
  --shadow-wa: 0 8px 18px -4px rgba(37, 211, 102, 0.35);
  --shadow-tg: 0 8px 18px -4px rgba(34, 158, 217, 0.35);

  /* Layout */
  --max-app-width: 640px;
  --bottom-nav-height: 64px;
  --top-bar-height: 60px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: #eef2f6;
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* App Shell Container (Responsive Mobile Wrapper) */
.app-container {
  max-width: var(--max-app-width);
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.08);
}

/* Splash Screen Overlay */
#splashScreen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #ff2d8d;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.splash-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
}

.splash-loader-wrap {
  position: absolute;
  bottom: 60px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 2;
}

#splashScreen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-loader {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Top App Bar */
.top-app-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--top-bar-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Side Navigation Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.side-drawer {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 84%;
  max-width: 340px;
  background: #ffffff;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  z-index: 10000;
}

.drawer-backdrop.active .side-drawer {
  transform: translateX(0);
}

.drawer-header {
  background: var(--brand-gradient);
  color: #ffffff;
  padding: 22px 18px 16px 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  padding: 2px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.drawer-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.drawer-subtitle {
  font-size: 0.75rem;
  opacity: 0.9;
  font-weight: 500;
}

.drawer-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.drawer-close-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.drawer-version-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  width: fit-content;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 0 24px 0;
  -webkit-overflow-scrolling: touch;
}

.drawer-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 12px 18px 6px 18px;
}

.drawer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.drawer-item:hover, .drawer-item:active {
  background: var(--bg-subtle);
  color: var(--brand-pink);
}

.drawer-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-subtle);
  color: var(--brand-purple);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: var(--transition);
}

.drawer-item:hover .drawer-item-icon {
  background: var(--brand-pink-subtle);
  color: var(--brand-pink);
}

.drawer-item-icon.wa {
  background: var(--whatsapp-bg);
  color: var(--whatsapp);
}

.drawer-item-icon.tg {
  background: var(--telegram-bg);
  color: var(--telegram);
}

.drawer-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--brand-pink-subtle);
  color: var(--brand-pink);
}

.drawer-badge.pro {
  background: #fef3c7;
  color: #b45309;
}

.drawer-divider {
  height: 1px;
  background: var(--border-light);
  margin: 10px 18px;
}

/* Country Grid inside Drawer */
.drawer-country-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 6px 18px 12px 18px;
}

.drawer-country-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.drawer-country-chip:hover, .drawer-country-chip.active {
  background: #ffffff;
  border-color: var(--brand-pink);
  color: var(--brand-pink);
  box-shadow: 0 2px 8px rgba(255, 45, 141, 0.15);
}

.drawer-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-surface);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

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

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: var(--transition);
}

.icon-btn:hover, .icon-btn:active {
  background: var(--bg-subtle);
  color: var(--brand-pink);
  border-color: rgba(255, 45, 141, 0.3);
}

/* Search & Country Filter Header Bar */
.search-header-container {
  padding: 12px 16px 8px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-subtle);
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  padding: 0 12px;
  height: 44px;
  transition: var(--transition);
}

.search-box:focus-within {
  background: #ffffff;
  border-color: var(--brand-pink);
  box-shadow: 0 0 0 3px rgba(255, 45, 141, 0.12);
}

.search-icon {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-right: 8px;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
}

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

.search-clear {
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  display: none;
  font-size: 0.85rem;
  padding: 4px;
}

.search-clear.visible {
  display: block;
}

/* Filter Chips / Platform Tabs */
.filter-tabs-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  white-space: nowrap;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.filter-tabs-row::-webkit-scrollbar { display: none; }

.filter-chip {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  text-decoration: none;
}

.filter-chip:hover {
  background: var(--bg-hover);
}

.filter-chip.active {
  background: var(--brand-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: var(--shadow-brand);
}

.filter-chip.chip-wa.active {
  background: var(--whatsapp);
  box-shadow: var(--shadow-wa);
}

.filter-chip.chip-tg.active {
  background: var(--telegram);
  box-shadow: var(--shadow-tg);
}

/* Main Content Views */
.main-view {
  flex: 1;
  padding: 12px 16px calc(var(--bottom-nav-height) + 20px) 16px;
}

/* Section Titles */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 10px 0;
}

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

.section-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-purple);
  text-decoration: none;
  cursor: pointer;
}

/* Category Slider & Grid */
.categories-slider {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.categories-slider::-webkit-scrollbar { display: none; }

.cat-pill {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.cat-pill:hover, .cat-pill.active {
  border-color: var(--brand-pink);
  background: var(--brand-pink-subtle);
  transform: translateY(-2px);
}

.cat-pill-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* Categories Full Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.cat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
}

.cat-card:hover {
  border-color: var(--brand-purple);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.cat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 8px;
}

.cat-card-icon {
  font-size: 1.6rem;
}

.cat-card-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.cat-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.cat-card-counts {
  display: flex;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.count-wa { color: var(--whatsapp-dark); font-weight: 600; }
.count-tg { color: var(--telegram-dark); font-weight: 600; }

/* Link Card */
.links-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.link-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: var(--transition);
}

.link-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.link-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.link-avatar-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.link-avatar {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.link-platform-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.65rem;
  border: 1.5px solid #fff;
}

.platform-wa { background: var(--whatsapp); }
.platform-tg { background: var(--telegram); }

.link-info {
  flex: 1;
  min-width: 0;
}

.link-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.link-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.verified-icon {
  color: #3b82f6;
  font-size: 0.8rem;
}

.featured-tag {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}

.link-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.link-cat-tag {
  color: var(--brand-purple);
  font-weight: 600;
  background: var(--brand-purple-subtle);
  padding: 1px 6px;
  border-radius: 4px;
}

.link-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

.link-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.link-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-sm-action {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-sm-action:hover {
  background: var(--bg-subtle);
  color: var(--brand-pink);
}

.btn-join {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  color: #ffffff;
}

.btn-join-wa {
  background: var(--whatsapp);
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.25);
}
.btn-join-wa:hover {
  background: var(--whatsapp-dark);
}

.btn-join-tg {
  background: var(--telegram);
  box-shadow: 0 4px 10px rgba(34, 158, 217, 0.25);
}
.btn-join-tg:hover {
  background: var(--telegram-dark);
}

/* Ad In-Feed Native Card */
.ad-native-card {
  background: #ffffff;
  border: 1.5px dashed rgba(255, 45, 141, 0.4);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(135deg, rgba(255, 45, 141, 0.03), rgba(124, 58, 237, 0.03));
}

.ad-badge {
  background: #fbbf24;
  color: #78350f;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-app-width);
  height: var(--bottom-nav-height);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 50;
  padding: 0 8px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  background: none;
  transition: var(--transition);
  min-width: 58px;
}

.nav-item i {
  font-size: 1.15rem;
  transition: var(--transition);
}

.nav-item:hover {
  color: var(--brand-pink);
}

.nav-item.active {
  color: var(--brand-pink);
}

.nav-item.active i {
  transform: scale(1.12);
  color: var(--brand-pink);
}

/* Floating / Central Post Link Button */
.nav-item-post {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #ffffff;
  border: none;
  background: none;
  cursor: pointer;
  margin-top: -16px;
}

.nav-post-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: var(--shadow-brand);
  transition: var(--transition);
}

.nav-post-circle:hover, .nav-post-circle:active {
  transform: scale(1.08) rotate(90deg);
}

/* Empty & Loading Skeletons */
.skeleton-card {
  height: 100px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Modals & Dialogs */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-backdrop.active .modal-box {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  border: none;
  background: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.modal-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg-subtle);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Form Controls */
.form-group {
  margin-bottom: 14px;
}

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

.form-input, .form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus {
  background: #ffffff;
  border-color: var(--brand-pink);
  box-shadow: 0 0 0 3px rgba(255, 45, 141, 0.12);
}

/* Buttons */
.btn-primary {
  background: var(--brand-gradient);
  color: #ffffff;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-brand);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.9rem;
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.95;
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.9rem;
}

/* First Launch / 18+ Terms Modal */
.disclaimer-alert-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 14px;
  font-size: 0.82rem;
  color: #92400e;
  line-height: 1.45;
}

.disclaimer-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-primary);
}

.disclaimer-check-item input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--brand-pink);
  cursor: pointer;
}

/* Video Ad Simulation Modal */
.ad-video-container {
  position: relative;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 14px;
}

.ad-video-graphic {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e1b4b, #4c1d95, #831843);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.ad-timer-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Toast Notifications */
#toastContainer {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: 90%;
  max-width: 400px;
}

.toast {
  background: #1e293b;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.toast-success { background: #065f46; border-left: 4px solid #10b981; }
.toast-error { background: #991b1b; border-left: 4px solid #ef4444; }
.toast-info { background: #1e293b; border-left: 4px solid var(--brand-pink); }

/* Play Store Footer Notice */
.play-store-footer {
  text-align: center;
  padding: 24px 16px 12px 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.play-store-footer a {
  color: var(--brand-purple);
  text-decoration: none;
}
