/* ============================================================
   SURFTOEARN — CLASSIC MOBILE APP THEME
   Style: Clean, High-Trust, Fintech / Telegram Native
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  /* Core Light Palette (Clean Classic Fintech) */
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-sub: #f1f5f9;
  --bg-surface-hover: #f8fafc;

  --border-light: #e2e8f0;
  --border-subtle: #edf2f7;
  --border-focus: #2563eb;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --text-inverse: #ffffff;

  /* Brand & Status Colors */
  --primary: #0088cc; /* Classic Telegram / Trust Blue */
  --primary-hover: #0077b5;
  --primary-light: #e0f2fe;
  --primary-text: #0369a1;

  --success: #10b981; /* Emerald Earning Green */
  --success-light: #ecfdf5;
  --success-text: #047857;

  --gold: #f59e0b; /* Currency Gold */
  --gold-light: #fef3c7;
  --gold-text: #b45309;

  --danger: #ef4444;
  --danger-light: #fee2e2;

  /* Typography */
  --font-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Spacing */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 20px;
  --space-xl: 24px;
  --space-2xl: 32px;

  /* Borders & Shadows */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08);

  /* Layout Measurements & Safe Area Insets */
  --topbar-height: 60px;
  --bottombar-height: 64px;
  --max-app-width: 460px;

  /* Standard Safe Area Insets (0px on standard screens, handles iPhone notches) */
  --safe-top: max(
    env(safe-area-inset-top, 0px),
    var(--tg-safe-area-inset-top, 0px)
  );
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

/* ── Dark Theme (Clean Telegram Slate / OLED) ────────── */
[data-theme="dark"],
body.dark-theme {
  --bg-app: #0f172a;
  --bg-surface: #1e293b;
  --bg-surface-sub: #334155;
  --bg-surface-hover: #27354a;

  --border-light: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-focus: #38bdf8;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-inverse: #0f172a;

  --primary: #0098ea;
  --primary-hover: #2aabee;
  --primary-light: rgba(0, 152, 234, 0.15);
  --primary-text: #38bdf8;

  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.15);
  --success-text: #34d399;

  --gold: #fbbf24;
  --gold-light: rgba(245, 158, 11, 0.15);
  --gold-text: #fcd34d;

  --danger: #f87171;
  --danger-light: rgba(239, 68, 68, 0.15);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.4);
}

/* ── Global Reset & Base ────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  min-height: 100%;
  font-family: var(--font-sans);
  background-color: #0f172a; /* Outer canvas for desktop centering */
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Global unselectable image protection (prevents long-press copy/drag/callout) */
img,
svg,
picture {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}

/* Desktop App Container Simulator */
.app-viewport {
  width: 100%;
  max-width: var(--max-app-width);
  min-height: 100vh;
  margin: 0 auto;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  position: relative;
  border: 2px solid var(--border-light);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.08);
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Form inputs & text areas must remain selectable and editable */
input,
textarea,
select,
[contenteditable="true"],
.selectable-text {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
}

/* ── Sticky Top App Bar ─────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: calc(var(--topbar-height) + var(--safe-top));
  padding-top: var(--safe-top);
  padding-bottom: 0;
  padding-left: max(var(--space-md), var(--safe-left));
  padding-right: max(var(--space-md), var(--safe-right));
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(10px);
  box-sizing: border-box;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border-light);
  overflow: hidden;
  position: relative;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none; /* Prevents long-press selection menu on mobile */
}

.user-meta {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.2;
}

.user-badge {
  font-size: 11px;
  color: var(--primary-text);
  font-weight: 500;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.pill-balance {
  display: flex;
  align-items: center;
  gap: 5px;
  background-color: var(--bg-surface-sub);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 13px;
  border: 1px solid var(--border-light);
}

.theme-toggle-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.theme-toggle-btn:hover {
  background-color: var(--bg-surface-sub);
}

/* ── Content Viewport & Tab Panes ───────────────────── */
.main-content {
  flex: 1;
  padding: var(--space-md);
  padding-top: var(--space-md);
  padding-bottom: calc(var(--bottombar-height) + var(--safe-bottom) + 24px);
  padding-left: max(var(--space-md), var(--safe-left));
  padding-right: max(var(--space-md), var(--safe-right));
  overflow-y: auto;
  box-sizing: border-box;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.2s ease-out;
}
.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Classic Cards & Surfaces ───────────────────────── */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* Hero Balance Card */
.hero-card {
  background: linear-gradient(
    145deg,
    var(--bg-surface) 0%,
    var(--bg-surface-sub) 100%
  );
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-xs);
}

.hero-balance {
  font-size: 38px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.1;
  margin-bottom: 4px;
}

.hero-balance-sub {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: var(--space-lg);
}

.hero-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

/* ── Buttons (Classic Pill & Clean Styles) ──────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  user-select: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}
.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: var(--bg-surface-sub);
  color: var(--text-main);
  border-color: var(--border-light);
}
.btn-secondary:hover {
  background-color: var(--border-light);
}

.btn-success {
  background-color: var(--success);
  color: #ffffff;
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border-light);
  color: var(--text-main);
}
.btn-outline:hover {
  background-color: var(--bg-surface-sub);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

/* ── Energy / Progress Bar ──────────────────────────── */
.energy-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.energy-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.progress-track {
  width: 100%;
  height: 8px;
  background-color: var(--bg-surface-sub);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* ── Stats Grid ─────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  margin-top: var(--space-md);
}

.stat-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
}

.stat-title {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

/* ── Classic List View (Surfs & Tasks) ──────────────── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.section-link {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.list-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.list-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

.list-item:hover {
  background-color: var(--bg-surface-hover);
  border-color: var(--border-focus);
}

.list-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
}

.list-details {
  flex: 1;
  min-width: 0;
}

.list-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.list-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-reward {
  background-color: var(--success-light);
  color: var(--success-text);
}

.badge-tag {
  background-color: var(--bg-surface-sub);
  color: var(--text-muted);
  font-size: 10px;
  padding: 2px 6px;
}

/* ── 7-Day Continuous Streak Calendar & Card ────────── */
.streak-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 16px;
  margin-bottom: var(--space-md);
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

[data-theme="dark"] .streak-box,
body.dark-theme .streak-box {
  background: linear-gradient(180deg, #1e293b 0%, #172033 100%);
  border-color: rgba(245, 158, 11, 0.2);
  box-shadow:
    0 8px 24px -4px rgba(0, 0, 0, 0.4),
    0 0 20px -8px rgba(245, 158, 11, 0.15);
}

.streak-box::before {
  content: "";
  position: absolute;
  top: -40px;
  left: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(
    circle,
    rgba(245, 158, 11, 0.12) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.streak-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.streak-box-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.streak-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.2);
}

[data-theme="dark"] .streak-icon-wrap,
body.dark-theme .streak-icon-wrap {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.25) 0%,
    rgba(217, 119, 6, 0.4) 100%
  );
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.streak-header-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.streak-heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

[data-theme="dark"] .streak-heading,
body.dark-theme .streak-heading {
  color: #f8fafc;
}

.streak-pill-badge {
  display: inline-flex;
  align-items: center;
  background: var(--gold-light);
  color: var(--gold-text);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

[data-theme="dark"] .streak-pill-badge,
body.dark-theme .streak-pill-badge {
  background: rgba(245, 158, 11, 0.22);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.55);
}

.streak-sub-text {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 500;
}

[data-theme="dark"] .streak-sub-text,
body.dark-theme .streak-sub-text {
  color: #cbd5e1;
}

.streak-sub-text strong {
  color: var(--text-main);
  font-weight: 700;
}

[data-theme="dark"] .streak-sub-text strong,
body.dark-theme .streak-sub-text strong {
  color: #ffffff;
}

.streak-timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-surface-sub);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

[data-theme="dark"] .streak-timer-pill,
body.dark-theme .streak-timer-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #cbd5e1;
}

.streak-timer-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
}

[data-theme="dark"] .streak-timer-val,
body.dark-theme .streak-timer-val {
  color: #ffffff;
}

/* Milestone highlight banner */
.streak-milestone-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(
    90deg,
    rgba(245, 158, 11, 0.1) 0%,
    rgba(245, 158, 11, 0.03) 100%
  );
  border: 1px dashed rgba(245, 158, 11, 0.4);
  border-radius: 10px;
  padding: 8px 12px;
  margin-top: 12px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

[data-theme="dark"] .streak-milestone-bar,
body.dark-theme .streak-milestone-bar {
  background: linear-gradient(
    90deg,
    rgba(245, 158, 11, 0.18) 0%,
    rgba(217, 119, 6, 0.08) 100%
  );
  border: 1px dashed rgba(245, 158, 11, 0.5);
}

.streak-milestone-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1;
}

.streak-milestone-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.streak-milestone-text {
  font-size: 12px;
  font-weight: 600;
  color: #92400e;
  line-height: 1.25;
}

[data-theme="dark"] .streak-milestone-text,
body.dark-theme .streak-milestone-text {
  color: #fef3c7;
}

.streak-milestone-chip {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
  flex-shrink: 0;
}

/* 7-Day Rolling Window Grid - Horizontally Scrollable */
.streak-grid {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 8px 2px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.streak-grid::-webkit-scrollbar {
  display: none;
}

.streak-day,
.streak-day-card {
  flex: 0 0 58px;
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  background: var(--bg-surface-sub);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 8px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 72px;
  transition: all 0.15s ease;
  position: relative;
  box-sizing: border-box;
}

[data-theme="dark"] .streak-day,
[data-theme="dark"] .streak-day-card,
body.dark-theme .streak-day,
body.dark-theme .streak-day-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.streak-day .day-top-bar,
.streak-day-card .day-top-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

[data-theme="dark"] .streak-day .day-top-bar,
[data-theme="dark"] .streak-day-card .day-top-bar,
body.dark-theme .streak-day .day-top-bar,
body.dark-theme .streak-day-card .day-top-bar {
  color: #cbd5e1;
}

.streak-day .day-reward-amount,
.streak-day-card .day-reward-amount {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
}

[data-theme="dark"] .streak-day .day-reward-amount,
[data-theme="dark"] .streak-day-card .day-reward-amount,
body.dark-theme .streak-day .day-reward-amount,
body.dark-theme .streak-day-card .day-reward-amount {
  color: #fde68a;
}

.streak-day .coin-mini,
.streak-day-card .coin-mini {
  font-size: 9.5px;
}

.streak-day .day-status-pill,
.streak-day-card .day-status-pill {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1.2;
}

.day-status-pill.claimed {
  color: var(--success-text);
  font-weight: 800;
}

[data-theme="dark"] .day-status-pill.claimed,
body.dark-theme .day-status-pill.claimed {
  color: #34d399;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.day-status-pill.today {
  background: #f59e0b;
  color: #ffffff;
}

.day-status-pill.upcoming {
  color: var(--text-dim);
}

[data-theme="dark"] .day-status-pill.upcoming,
body.dark-theme .day-status-pill.upcoming {
  color: #94a3b8;
}

/* Today (Active) Card Highlight */
.streak-day.today,
.streak-day-card.today {
  border-color: #f59e0b !important;
  background: linear-gradient(
    180deg,
    rgba(245, 158, 11, 0.16) 0%,
    rgba(245, 158, 11, 0.05) 100%
  ) !important;
  box-shadow:
    0 0 0 1px #f59e0b,
    0 4px 12px rgba(245, 158, 11, 0.25);
  transform: translateY(-2px);
}

[data-theme="dark"] .streak-day.today,
[data-theme="dark"] .streak-day-card.today,
body.dark-theme .streak-day.today,
body.dark-theme .streak-day-card.today {
  background: linear-gradient(
    180deg,
    rgba(245, 158, 11, 0.26) 0%,
    rgba(245, 158, 11, 0.1) 100%
  ) !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
}

.streak-day.today .day-reward-amount,
.streak-day-card.today .day-reward-amount {
  color: #d97706;
}

[data-theme="dark"] .streak-day.today .day-reward-amount,
[data-theme="dark"] .streak-day-card.today .day-reward-amount,
body.dark-theme .streak-day.today .day-reward-amount,
body.dark-theme .streak-day-card.today .day-reward-amount {
  color: #fbbf24;
}

[data-theme="dark"] .streak-day.today .day-top-bar,
[data-theme="dark"] .streak-day-card.today .day-top-bar,
body.dark-theme .streak-day.today .day-top-bar,
body.dark-theme .streak-day-card.today .day-top-bar {
  color: #ffffff;
}

/* Claimed State */
.streak-day.claimed,
.streak-day-card.claimed {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
}

[data-theme="dark"] .streak-day.claimed,
[data-theme="dark"] .streak-day-card.claimed,
body.dark-theme .streak-day.claimed,
body.dark-theme .streak-day-card.claimed {
  background: rgba(16, 185, 129, 0.16) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
}

.streak-day.claimed .day-reward-amount,
.streak-day-card.claimed .day-reward-amount {
  color: var(--success-text);
}

[data-theme="dark"] .streak-day.claimed .day-reward-amount,
[data-theme="dark"] .streak-day-card.claimed .day-reward-amount,
body.dark-theme .streak-day.claimed .day-reward-amount,
body.dark-theme .streak-day-card.claimed .day-reward-amount {
  color: #34d399 !important;
}

[data-theme="dark"] .streak-day.claimed .day-top-bar,
[data-theme="dark"] .streak-day-card.claimed .day-top-bar,
body.dark-theme .streak-day.claimed .day-top-bar,
body.dark-theme .streak-day-card.claimed .day-top-bar {
  color: #6ee7b7 !important;
}

/* Milestone Gift State */
.streak-day.is-milestone,
.streak-day-card.is-milestone {
  border-style: dashed !important;
  border-color: var(--gold) !important;
}

[data-theme="dark"] .streak-day.is-milestone,
[data-theme="dark"] .streak-day-card.is-milestone,
body.dark-theme .streak-day.is-milestone,
body.dark-theme .streak-day-card.is-milestone {
  background: rgba(245, 158, 11, 0.14) !important;
}

/* Dedicated Action Area */
.streak-action-area {
  position: relative;
  z-index: 1;
}

.streak-status-banner {
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.streak-status-banner .banner-info-wrap,
.streak-status-banner .banner-header-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.streak-status-banner .banner-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.streak-status-banner .banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.streak-status-banner .banner-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.streak-status-banner .banner-desc {
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-muted);
}

[data-theme="dark"] .streak-status-banner .banner-desc,
body.dark-theme .streak-status-banner .banner-desc {
  color: #cbd5e1;
}

.streak-status-banner .banner-desc strong {
  color: var(--text-main);
  font-weight: 700;
}

[data-theme="dark"] .streak-status-banner .banner-desc strong,
body.dark-theme .streak-status-banner .banner-desc strong {
  color: #ffffff;
}

/* Banner State Modifiers */
.streak-banner-locked {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.streak-banner-locked .banner-icon {
  background: rgba(245, 158, 11, 0.2);
  color: #b45309;
}
.streak-banner-locked .banner-title {
  color: var(--text-main);
}

[data-theme="dark"] .streak-banner-locked,
body.dark-theme .streak-banner-locked {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
}
[data-theme="dark"] .streak-banner-locked .banner-icon,
body.dark-theme .streak-banner-locked .banner-icon {
  background: rgba(245, 158, 11, 0.25) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.45);
}
[data-theme="dark"] .streak-banner-locked .banner-title,
body.dark-theme .streak-banner-locked .banner-title {
  color: #fbbf24 !important;
}
[data-theme="dark"] .streak-banner-locked .banner-desc,
body.dark-theme .streak-banner-locked .banner-desc {
  color: #e2e8f0 !important;
}

.streak-banner-ready {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.streak-banner-ready .banner-icon {
  background: rgba(16, 185, 129, 0.2);
  color: #047857;
}
.streak-banner-ready .banner-title {
  color: #047857;
}

[data-theme="dark"] .streak-banner-ready,
body.dark-theme .streak-banner-ready {
  background: rgba(16, 185, 129, 0.14) !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
}
[data-theme="dark"] .streak-banner-ready .banner-icon,
body.dark-theme .streak-banner-ready .banner-icon {
  background: rgba(16, 185, 129, 0.25) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
[data-theme="dark"] .streak-banner-ready .banner-title,
body.dark-theme .streak-banner-ready .banner-title {
  color: #34d399 !important;
}
[data-theme="dark"] .streak-banner-ready .banner-desc,
body.dark-theme .streak-banner-ready .banner-desc {
  color: #e2e8f0 !important;
}

.streak-banner-success {
  background: var(--bg-surface-sub);
  border: 1px solid var(--border-light);
  flex-direction: row;
  align-items: center;
}
.streak-banner-success .banner-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  font-weight: 800;
}
.streak-banner-success .banner-title {
  color: var(--text-main);
}

[data-theme="dark"] .streak-banner-success,
body.dark-theme .streak-banner-success {
  background: rgba(16, 185, 129, 0.14) !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
}
[data-theme="dark"] .streak-banner-success .banner-icon,
body.dark-theme .streak-banner-success .banner-icon {
  background: rgba(16, 185, 129, 0.25) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
[data-theme="dark"] .streak-banner-success .banner-title,
body.dark-theme .streak-banner-success .banner-title {
  color: #34d399 !important;
  font-size: 13.5px;
  font-weight: 700;
}
[data-theme="dark"] .streak-banner-success .banner-desc,
body.dark-theme .streak-banner-success .banner-desc {
  color: #e2e8f0 !important;
}
[data-theme="dark"] .streak-banner-success .banner-desc strong,
body.dark-theme .streak-banner-success .banner-desc strong {
  color: #ffffff !important;
  font-weight: 800;
}

/* Mini Progress Bar for Required Tasks */
.streak-mini-progress {
  width: 100%;
  height: 5px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

[data-theme="dark"] .streak-mini-progress,
body.dark-theme .streak-mini-progress {
  background: rgba(255, 255, 255, 0.08);
}

.streak-mini-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b 0%, #10b981 100%);
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* Modern Action Buttons */
.btn-streak-action {
  width: 100%;
  padding: 13px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  box-sizing: border-box;
}

.btn-streak-action:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-streak-unlock {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.btn-streak-unlock:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.45);
}

.btn-streak-arrow {
  transition: transform 0.2s ease;
  font-weight: 800;
}

.btn-streak-unlock:hover .btn-streak-arrow {
  transform: translateX(3px);
}

.btn-streak-claimable {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.4);
}

.btn-streak-claimed {
  background: var(--bg-surface-sub);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  cursor: default;
  box-shadow: none;
  opacity: 0.85;
}

[data-theme="dark"] .btn-streak-claimed,
body.dark-theme .btn-streak-claimed {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  opacity: 1 !important;
  font-weight: 700;
}

.btn-streak-claimed .btn-streak-icon {
  color: #10b981;
  font-size: 16px;
  font-weight: 800;
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
  }
  50% {
    box-shadow: 0 4px 24px rgba(245, 158, 11, 0.7);
  }
}

.pulse-glow {
  animation: pulseGlow 2s infinite ease-in-out;
}

/* ── Fixed Bottom Navigation Bar ────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-app-width);
  height: calc(var(--bottombar-height) + var(--safe-bottom));
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 50;
  backdrop-filter: blur(12px);
  padding-top: 0;
  padding-bottom: var(--safe-bottom);
  padding-left: max(var(--space-xs), var(--safe-left));
  padding-right: max(var(--space-xs), var(--safe-right));
  box-sizing: border-box;
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
  user-select: none;
}

.nav-tab svg,
.nav-tab .tab-icon {
  font-size: 20px;
  transition:
    transform 0.15s ease,
    color 0.15s ease;
}

.nav-tab:active {
  transform: scale(0.94);
}

.nav-tab.active {
  color: var(--primary);
}

.nav-tab.active .tab-icon {
  transform: translateY(-2px);
}

/* ── Surf Modal & Player ────────────────────────────── */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal-backdrop.open {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.modal-sheet {
  width: 100%;
  max-width: var(--max-app-width);
  background-color: var(--bg-surface);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  border-bottom: none;
  padding: var(--space-xl);
  padding-bottom: calc(var(--space-xl) + var(--safe-bottom));
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.modal-handle {
  width: 38px;
  height: 4px;
  background-color: var(--border-light);
  border-radius: var(--radius-full);
  margin: -10px auto 10px;
}

.surf-preview-frame {
  width: 100%;
  height: 220px;
  background-color: var(--bg-surface-sub);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  text-align: center;
}

.timer-ring {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

/* ── Enhanced Surf Verification Modal (Fintech / Web3 Style) ── */
.surf-verify-sheet {
  padding: 18px 20px 24px;
  gap: 14px;
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
  background: var(--bg-surface);
}

.surf-verify-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2px;
}

.surf-sponsor-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.surf-sponsor-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--bg-surface-sub);
  border: 1.5px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.surf-sponsor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.surf-sponsor-meta {
  display: flex;
  flex-direction: column;
}

.surf-sponsor-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.surf-sponsor-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 2px;
}

.badge-verify-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 900;
}

.surf-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface-sub);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.surf-modal-close:hover {
  background: var(--border-light);
  color: var(--text-main);
  transform: scale(1.05);
}

/* Reward Showcase Banner */
.surf-reward-showcase {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.12) 0%,
    rgba(217, 119, 6, 0.05) 100%
  );
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-radius: 16px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.1);
}

.surf-reward-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.surf-reward-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--gold-text);
  text-transform: uppercase;
}

.surf-reward-val-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.surf-reward-coins {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
}

.surf-reward-icon {
  font-size: 20px;
}

/* Steps Container */
.surf-steps-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.surf-step-card {
  background: var(--bg-surface-sub);
  border: 1.5px solid var(--border-light);
  border-radius: 18px;
  padding: 14px 16px;
  position: relative;
  transition: all 0.2s ease;
}

.surf-step-card:focus-within {
  border-color: var(--primary);
}

.surf-step-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.surf-step-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.surf-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(0, 136, 204, 0.25);
  line-height: 1;
  flex-shrink: 0;
}

.surf-step-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.surf-step-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 10px;
}

.btn-surf-open {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #0088cc 0%, #0072aa 100%);
  color: #ffffff;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 136, 204, 0.25);
  transition: all 0.15s ease;
  border: none;
  cursor: pointer;
}

.btn-surf-open:hover,
.btn-surf-open:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 136, 204, 0.35);
  color: #ffffff;
}

.btn-surf-open.visited {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-paste-code {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(0, 136, 204, 0.25);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-paste-code:hover {
  background: var(--primary);
  color: #ffffff;
}

/* 6-Digit OTP Box Grid */
.surf-otp-wrapper {
  position: relative;
  margin: 10px 0 6px;
  cursor: text;
}

.surf-otp-master-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.001;
  z-index: 2;
  cursor: text;
}

.surf-otp-cells {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  user-select: none;
}

.surf-otp-cell {
  flex: 1;
  height: 52px;
  max-width: 48px;
  border: 2px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  font-family: "Inter", monospace;
  color: var(--text-main);
  position: relative;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
}

.surf-otp-cell.active {
  border-color: var(--primary);
  box-shadow:
    0 0 0 3px var(--primary-light),
    inset 0 1px 3px rgba(0, 0, 0, 0.03);
  transform: translateY(-2px);
}

.surf-otp-cell.filled {
  border-color: var(--primary);
  background: var(--bg-surface);
  color: var(--text-main);
}

.surf-otp-cell-divider {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-dim);
  padding: 0 2px;
}

.cell-cursor {
  display: none;
  width: 2px;
  height: 22px;
  background-color: var(--primary);
  animation: blinkCursor 0.9s infinite;
  border-radius: 2px;
}

.surf-otp-cell.active:not(.filled) .cell-cursor {
  display: block;
}

@keyframes blinkCursor {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.surf-step-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.35;
}

/* Submit / Claim Button */
.btn-surf-claim {
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 4px;
}

.btn-surf-claim:not(:disabled) {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
  animation: pulseClaimBtn 2s infinite ease-in-out;
}

.btn-surf-claim:not(:disabled):hover,
.btn-surf-claim:not(:disabled):active {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
}

.btn-surf-claim:disabled {
  background: var(--bg-surface-sub);
  color: var(--text-dim);
  border: 1px solid var(--border-light);
  cursor: not-allowed;
  opacity: 0.65;
  box-shadow: none;
}

@keyframes pulseClaimBtn {
  0%,
  100% {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
  }
  50% {
    box-shadow: 0 6px 28px rgba(16, 185, 129, 0.6);
  }
}

/* ── Toast Notifications ────────────────────────────── */
.toast-container {
  position: fixed;
  top: calc(var(--topbar-height) + var(--safe-top) + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 420px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastSlide 0.25s ease-out;
  pointer-events: auto;
}

.toast.success {
  border-left: 4px solid var(--success);
}
.toast.info {
  border-left: 4px solid var(--primary);
}
.toast.error {
  border-left: 4px solid var(--danger);
}

@keyframes toastSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Form Controls (Classic Clean) ──────────────────── */
.form-group {
  margin-bottom: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background-color: var(--bg-surface);
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-control:focus {
  border-color: var(--border-focus);
}

/* ── Segmented Control / Subnav Pills ──────────────── */
.tab-subnav {
  display: flex;
  background-color: var(--bg-surface-sub);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  gap: 4px;
  border: 1px solid var(--border-light);
}

.subnav-btn {
  flex: 1;
  padding: 9px 12px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.subnav-btn.active {
  background-color: var(--bg-surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ── Referral Leaderboard (Enhanced Clean Theme) ─────────────────── */
.leaderboard-hero-card {
  background: linear-gradient(135deg, var(--primary) 0%, #006da3 100%);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 16px 14px 14px;
  margin-bottom: var(--space-md);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 136, 204, 0.16);
}

.hero-glow-sphere {
  display: none;
}

.hero-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.season-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.18);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 10.5px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.live-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #4ade80;
}

.season-timer-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.16);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.hero-prize-showcase {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 0 10px;
}

.trophy-emblem-wrap {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
}

.trophy-3d {
  font-size: 26px;
  line-height: 1;
}

.hero-prize-details {
  flex: 1;
}

.hero-pool-label {
  font-size: 10.5px;
  font-weight: 700;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.hero-pool-amount {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 1px;
}

.hero-pool-amount .currency-tag {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.85;
  color: #ffffff;
}

.hero-pool-sub {
  font-size: 11.5px;
  opacity: 0.85;
  margin-top: 2px;
  line-height: 1.3;
}

/* Top 3 Podium Prize Cards */
.prize-top3-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.prize-top3-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 8px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  backdrop-filter: blur(4px);
  transition:
    transform 0.15s ease,
    background-color 0.2s ease;
}

.prize-top3-card.rank-1 {
  background: linear-gradient(
    180deg,
    rgba(255, 215, 0, 0.24) 0%,
    rgba(255, 255, 255, 0.1) 100%
  );
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.16);
}

.prize-top3-card.rank-2 {
  background: linear-gradient(
    180deg,
    rgba(220, 230, 242, 0.24) 0%,
    rgba(255, 255, 255, 0.1) 100%
  );
  border-color: rgba(220, 230, 242, 0.45);
}

.prize-top3-card.rank-3 {
  background: linear-gradient(
    180deg,
    rgba(205, 127, 50, 0.24) 0%,
    rgba(255, 255, 255, 0.1) 100%
  );
  border-color: rgba(205, 127, 50, 0.45);
}

.prize-top3-card .top3-badge {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  opacity: 0.95;
  white-space: nowrap;
}

.prize-top3-card .top3-val {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
}

/* Collapsible Extended Tiers (Ranks 4+) */
.prize-extended-wrapper {
  margin-top: 8px;
}

.prize-expand-btn {
  width: 100%;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #ffffff;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.prize-expand-btn:active {
  transform: scale(0.99);
  background: rgba(0, 0, 0, 0.26);
}

.prize-expand-summary {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.92;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.prize-expand-cta {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.prize-expand-chevron {
  font-size: 11px;
  display: inline-block;
  transition: transform 0.25s ease;
}

.prize-expand-btn.is-expanded .prize-expand-chevron {
  transform: rotate(180deg);
}

/* Scrollable Tier Grid when expanded */
.prize-distribution-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 8px;
  padding-right: 2px;
  max-height: 180px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.prize-distribution-grid.collapsed {
  display: none;
}

.prize-distribution-grid::-webkit-scrollbar {
  width: 4px;
}

.prize-distribution-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 4px;
}

.prize-grid-item {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 6px 3px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.prize-grid-rank {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.85;
  color: #ffffff;
}

.prize-grid-val {
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
}

/* ── Unified VIP "My Standing" Card ───────────────────── */
.my-standing-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
}

.standing-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.standing-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.standing-rank-badge {
  min-width: 36px;
  width: auto;
  height: 36px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-light);
  color: var(--primary-text);
  font-size: 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  white-space: nowrap;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.standing-rank-badge.is-unranked {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background-color: rgba(148, 163, 184, 0.12);
  border: 1px dashed var(--border-medium);
  padding: 0 8px;
  height: 32px;
  letter-spacing: 0.2px;
}

.standing-user-meta {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.standing-user-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.standing-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 0 1 auto;
}

.standing-you-tag {
  background-color: var(--primary);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  padding: 1.5px 5px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}

.standing-invites-tag {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.standing-right {
  text-align: right;
  flex-shrink: 0;
  min-width: max-content;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
}

.standing-prize-label {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.standing-prize-val {
  font-size: 13px;
  font-weight: 800;
  color: var(--success);
  background-color: var(--success-light);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  margin-top: 2px;
  display: inline-block;
  white-space: nowrap;
}

.btn-standing-invite {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 12.5px;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    background-color 0.15s ease,
    transform 0.15s ease;
  box-sizing: border-box;
}

.btn-standing-invite span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.btn-standing-invite:hover {
  background-color: var(--primary-hover);
}

.btn-standing-invite:active {
  transform: scale(0.99);
}

.btn-standing-invite .btn-arrow {
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Responsive queries for small mobile screens (<= 380px) */
@media (max-width: 380px) {
  .my-standing-card {
    padding: 10px 12px;
    gap: 8px;
  }
  .standing-top-row {
    gap: 8px;
  }
  .standing-left {
    gap: 8px;
  }
  .standing-rank-badge {
    min-width: 32px;
    height: 32px;
    font-size: 13px;
    padding: 0 5px;
  }
  .standing-rank-badge.is-unranked {
    font-size: 10px;
    height: 28px;
    padding: 0 6px;
  }
  .standing-user-name {
    font-size: 12.5px;
  }
  .standing-invites-tag {
    font-size: 11px;
  }
  .standing-prize-label {
    font-size: 8.5px;
  }
  .standing-prize-val {
    font-size: 11.5px;
    padding: 2px 6px;
  }
  .btn-standing-invite {
    padding: 8.5px 12px;
    font-size: 12px;
  }
}

/* ── Authentic Stepped Olympic Podium ─────────────────── */
.podium-section {
  margin-bottom: var(--space-md);
  width: 100%;
  box-sizing: border-box;
}

.podium-section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.podium-crown-icon {
  font-size: 15px;
}

.podium-section-heading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.podium-container {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.podium-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
  width: 100%;
}

.podium-user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 8px;
  width: 100%;
  min-width: 0;
  position: relative;
  padding-top: 14px;
}

.podium-crown {
  position: absolute;
  top: -2px;
  font-size: 19px;
  line-height: 1;
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.podium-avatar {
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  background-color: var(--bg-surface-sub);
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  box-sizing: border-box;
  transition:
    width 0.2s ease,
    height 0.2s ease;
}

.podium-avatar.first,
.podium-avatar.gold {
  width: 72px;
  height: 72px;
  font-size: 22px;
  font-weight: 800;
  background-color: var(--gold-light);
  color: var(--gold-text);
  border: 2.5px solid #f59e0b;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.podium-avatar.second,
.podium-avatar.silver {
  width: 60px;
  height: 60px;
  font-size: 18px;
  font-weight: 700;
  background-color: var(--bg-surface-sub);
  color: var(--text-muted);
  border: 2px solid #94a3b8;
  box-shadow: 0 3px 10px rgba(148, 163, 184, 0.2);
}

.podium-avatar.third,
.podium-avatar.bronze {
  width: 56px;
  height: 56px;
  font-size: 17px;
  font-weight: 700;
  background-color: var(--bg-surface-sub);
  color: var(--text-muted);
  border: 2px solid #ea580c;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.2);
}

.podium-avatar .avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.podium-avatar .avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.podium-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  width: 100%;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 5px;
  line-height: 1.25;
  padding: 0 2px;
  box-sizing: border-box;
}

.podium-col.first .podium-name {
  font-weight: 800;
  font-size: 12.5px;
}

.podium-invites {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  padding: 0 2px;
  box-sizing: border-box;
}

.podium-prize {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2.5px 7px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface-sub);
  color: var(--text-main);
  white-space: nowrap;
  margin-top: 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid var(--border-light);
}

.podium-prize.champion {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.35);
}

/* Stepped Pedestal Bases */
.podium-pedestal {
  width: 100%;
  border-radius: 12px 12px 4px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
  transition: height 0.2s ease;
}

.podium-pedestal.gold,
.podium-pedestal.first {
  height: 72px;
  background-color: var(--bg-surface);
  border: 1.5px solid var(--primary);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.15);
}

.podium-pedestal.silver,
.podium-pedestal.second {
  height: 48px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
}

.podium-pedestal.bronze,
.podium-pedestal.third {
  height: 34px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
}

.pedestal-num {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.podium-pedestal.gold .pedestal-num,
.podium-pedestal.first .pedestal-num {
  font-size: 26px;
  color: var(--primary);
}

.podium-pedestal.silver .pedestal-num,
.podium-pedestal.second .pedestal-num {
  color: var(--text-muted);
}

.podium-pedestal.bronze .pedestal-num,
.podium-pedestal.third .pedestal-num {
  color: var(--text-dim);
}

/* Podium responsive queries for small mobile (<= 380px) */
@media (max-width: 380px) {
  .podium-container {
    gap: 6px;
  }
  .podium-user-info {
    margin-bottom: 6px;
    padding-top: 12px;
  }
  .podium-crown {
    font-size: 17px;
    top: -2px;
  }
  .podium-avatar.first,
  .podium-avatar.gold {
    width: 62px;
    height: 62px;
  }
  .podium-avatar.second,
  .podium-avatar.silver {
    width: 52px;
    height: 52px;
  }
  .podium-avatar.third,
  .podium-avatar.bronze {
    width: 48px;
    height: 48px;
  }
  .podium-name {
    font-size: 11px;
    margin-top: 4px;
  }
  .podium-col.first .podium-name {
    font-size: 11.5px;
  }
  .podium-invites {
    font-size: 10px;
  }
  .podium-prize {
    font-size: 9.5px;
    padding: 2px 5px;
  }
  .podium-pedestal.gold,
  .podium-pedestal.first {
    height: 60px;
  }
  .podium-pedestal.silver,
  .podium-pedestal.second {
    height: 40px;
  }
  .podium-pedestal.bronze,
  .podium-pedestal.third {
    height: 28px;
  }
  .pedestal-num {
    font-size: 19px;
  }
  .podium-pedestal.gold .pedestal-num,
  .podium-pedestal.first .pedestal-num {
    font-size: 22px;
  }
}

/* Podium responsive queries for extra-small mobile (<= 340px) */
@media (max-width: 340px) {
  .podium-container {
    gap: 4px;
  }
  .podium-user-info {
    margin-bottom: 4px;
    padding-top: 10px;
  }
  .podium-crown {
    font-size: 15px;
    top: -1px;
  }
  .podium-avatar.first,
  .podium-avatar.gold {
    width: 52px;
    height: 52px;
  }
  .podium-avatar.second,
  .podium-avatar.silver {
    width: 44px;
    height: 44px;
  }
  .podium-avatar.third,
  .podium-avatar.bronze {
    width: 40px;
    height: 40px;
  }
  .podium-name {
    font-size: 10px;
    margin-top: 3px;
  }
  .podium-col.first .podium-name {
    font-size: 10.5px;
  }
  .podium-invites {
    font-size: 9px;
  }
  .podium-prize {
    font-size: 8.5px;
    padding: 1.5px 4px;
  }
  .podium-pedestal.gold,
  .podium-pedestal.first {
    height: 48px;
  }
  .podium-pedestal.silver,
  .podium-pedestal.second {
    height: 32px;
  }
  .podium-pedestal.bronze,
  .podium-pedestal.third {
    height: 22px;
  }
  .pedestal-num {
    font-size: 15px;
  }
  .podium-pedestal.gold .pedestal-num,
  .podium-pedestal.first .pedestal-num {
    font-size: 18px;
  }
}

/* ── Contenders List (Ranks 4-10) ──────────────────────── */
.leaderboard-table-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-xl);
}

.table-card-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  background-color: var(--bg-surface-sub);
}

.table-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-icon {
  font-size: 17px;
}

.table-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
}

.table-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.15s ease;
}

.leaderboard-item:last-child {
  border-bottom: none;
}

.leaderboard-item:active {
  background-color: var(--bg-surface-sub);
}

.leaderboard-item.is-me {
  background-color: var(--primary-light);
  border-left: 3px solid var(--primary);
}

.item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.item-rank {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.item-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface-sub);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.item-meta {
  min-width: 0;
}

.item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 5px;
}

.item-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.item-prize {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--success);
  background-color: var(--success-light);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Mobile-Specific Fullscreen adjustments ─────────── */
@media (max-width: 480px) {
  html,
  body {
    background-color: var(--bg-app);
  }
  .app-viewport {
    max-width: 100%;
    box-shadow: none;
  }
}

/* ============================================================
   MONETAG REWARDED ADS (INTERSTITIAL & POPUP)
   ============================================================ */

/* Home Featured Monetag Banner */
.monetag-home-banner {
  background: linear-gradient(
    135deg,
    rgba(0, 136, 204, 0.12) 0%,
    rgba(16, 185, 129, 0.12) 100%
  );
  border: 1px solid rgba(0, 136, 204, 0.3);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  cursor: pointer;
  transition:
    transform 0.15s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.monetag-home-banner:active {
  transform: scale(0.985);
}
.monetag-home-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.monetag-home-icon {
  font-size: 26px;
  width: 44px;
  height: 44px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.monetag-home-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}
.monetag-home-desc {
  font-size: 12px;
  color: var(--text-muted);
}
.monetag-home-arrow {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

/* Monetag Hub in Tasks Tab */
.monetag-hub-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-sm);
}
.monetag-hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.monetag-hub-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.monetag-live-pill {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.monetag-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: pulseDot 1.5s infinite;
}
@keyframes pulseDot {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.4);
    opacity: 0.6;
  }
}
.monetag-hub-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}
.monetag-hub-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-text);
  background: var(--gold-light);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}
.monetag-hub-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 14px;
}

/* Monetag Ad Cards Grid */
.monetag-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.monetag-ad-card {
  background: var(--bg-surface-sub);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.monetag-ad-card:hover {
  border-color: var(--primary);
}
.monetag-ad-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.monetag-ad-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}
.monetag-ad-icon-wrap.video {
  background: linear-gradient(
    135deg,
    rgba(0, 136, 204, 0.15) 0%,
    rgba(99, 102, 241, 0.15) 100%
  );
  border-color: rgba(0, 136, 204, 0.3);
}
.monetag-ad-icon-wrap.popup {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.15) 0%,
    rgba(239, 68, 68, 0.15) 100%
  );
  border-color: rgba(245, 158, 11, 0.3);
}
.monetag-ad-info {
  flex: 1;
  min-width: 0;
}
.monetag-ad-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.monetag-ad-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.monetag-ad-sub {
  font-size: 11px;
  color: var(--text-muted);
}
.monetag-ad-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 11px;
}
.monetag-ad-stat {
  display: flex;
  align-items: center;
  gap: 6px;
}
.monetag-ad-stat .stat-label {
  color: var(--text-dim);
}
.monetag-ad-stat .stat-val {
  font-weight: 700;
  color: var(--text-main);
}
.monetag-btn {
  width: 100%;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}
.monetag-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

/* Video Player Simulation Modal */
.monetag-video-player-box {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  max-width: 380px;
  width: 90%;
  padding: 22px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  text-align: center;
  animation: modalPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.monetag-video-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.monetag-video-sponsor .sponsor-pill {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: var(--primary-light);
  color: var(--primary-text);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}
.monetag-video-sponsor .ad-timer {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-left: 6px;
}
.monetag-video-close {
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
}
.monetag-video-body {
  margin-bottom: 18px;
}
.monetag-video-anim-icon {
  font-size: 54px;
  margin-bottom: 10px;
  animation: pulseIcon 1.8s infinite;
}
@keyframes pulseIcon {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}
.monetag-video-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}
.monetag-video-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 16px;
}
.monetag-progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-surface-sub);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border-light);
}
.monetag-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary) 0%, #10b981 100%);
  border-radius: var(--radius-full);
  transition: width 0.2s linear;
}

/* ── AdsGram & Monetag Rewarded Video Cards (Responsive & Modern) ── */
#adsgramRewardedQuota,
#monetagInterstitialQuota {
  white-space: nowrap !important;
  display: inline-block !important;
}

.ad-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
  flex-wrap: wrap;
}

.ad-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.ad-section-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.badge-ad-feature {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #38bdf8 !important;
  font-size: 9.5px !important;
  padding: 2px 7px !important;
  font-weight: 600 !important;
  border-radius: var(--radius-full) !important;
  white-space: nowrap !important;
}

.badge-ad-verified {
  background: rgba(16, 185, 129, 0.12) !important;
  color: var(--success) !important;
  font-size: 9.5px !important;
  padding: 2px 7px !important;
  font-weight: 600 !important;
  border-radius: var(--radius-full) !important;
  white-space: nowrap !important;
}

.ad-reward-card {
  padding: 10px 14px !important;
  gap: 12px !important;
  border-left: 3px solid #38bdf8 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 60px !important;
  box-sizing: border-box !important;
}

.ad-reward-card .list-icon {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  font-size: 20px !important;
  background: rgba(56, 189, 248, 0.12) !important;
  color: #38bdf8 !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.ad-reward-card .list-details {
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 2px !important;
  overflow: hidden !important;
}

.ad-reward-card .ad-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.ad-reward-card .ad-title {
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: var(--text-main) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.25 !important;
}

.ad-reward-card .ad-subtitle-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 11.5px !important;
  color: var(--text-muted) !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

.ad-reward-card .ad-quota-text {
  white-space: nowrap !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  color: var(--text-muted) !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
}

.ad-reward-card .ad-dot {
  font-size: 10px !important;
  color: var(--text-dim) !important;
  opacity: 0.6 !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
}

.ad-reward-card .ad-status-text {
  white-space: nowrap !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--success) !important;
  flex-shrink: 0 !important;
}

.ad-reward-card .ad-action-wrap {
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
}

.ad-reward-card .btn-watch-ad {
  padding: 6px 11px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  border-radius: var(--radius-sm) !important;
  flex-shrink: 0 !important;
}

.ad-reward-card .btn-watch-ad .badge-reward {
  padding: 2px 6px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  border-radius: var(--radius-full) !important;
  white-space: nowrap !important;
}

/* Extra small mobile screens (<= 340px) */
@media (max-width: 340px) {
  .ad-reward-card {
    padding: 8px 10px !important;
    gap: 8px !important;
  }
  .ad-reward-card .list-icon {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    font-size: 17px !important;
    border-radius: 8px !important;
  }
  .ad-reward-card .ad-title {
    font-size: 12.5px !important;
  }
  .ad-reward-card .ad-quota-text,
  .ad-reward-card .ad-status-text {
    font-size: 10px !important;
  }
  .ad-reward-card .btn-watch-ad {
    padding: 5px 8px !important;
    font-size: 11px !important;
    gap: 4px !important;
  }
  .ad-reward-card .btn-watch-ad .badge-reward {
    padding: 1px 4px !important;
    font-size: 10px !important;
  }
}

