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

/* ================================================
   DESIGN SYSTEM - Watch & Earn
   Premium Dark Theme with Glassmorphism
   ================================================ */

:root {
  /* Core Colors */
  --bg-primary: #0a0a1a;
  --bg-secondary: #12122a;
  --bg-card: rgba(20, 20, 50, 0.6);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-hover: rgba(255, 255, 255, 0.08);

  /* Accent Gradient */
  --gradient-primary: linear-gradient(135deg, #6C5CE7 0%, #00CEC9 50%, #55EFC4 100%);
  --gradient-secondary: linear-gradient(135deg, #E17055 0%, #FDCB6E 100%);
  --gradient-success: linear-gradient(135deg, #00B894 0%, #55EFC4 100%);
  --gradient-danger: linear-gradient(135deg, #FF6B6B 0%, #EE5A24 100%);
  --gradient-info: linear-gradient(135deg, #74B9FF 0%, #A29BFE 100%);
  --gradient-gold: linear-gradient(135deg, #FFEAA7 0%, #DDA0DD 100%);
  --gradient-card: linear-gradient(145deg, rgba(108,92,231,0.1), rgba(0,206,201,0.05));

  /* Text */
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.4);
  --text-accent: #00CEC9;

  /* Accent */
  --accent-purple: #6C5CE7;
  --accent-cyan: #00CEC9;
  --accent-green: #55EFC4;
  --accent-orange: #FDCB6E;
  --accent-red: #FF6B6B;
  --accent-blue: #74B9FF;
  --accent-pink: #E84393;

  /* Borders */
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(108, 92, 231, 0.3);

  /* Shadows */
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 40px rgba(108, 92, 231, 0.15);
  --shadow-button: 0 4px 15px rgba(108, 92, 231, 0.4);

  /* Spacing */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 50%;

  /* Telegram theme integration */
  --tg-theme-bg-color: var(--bg-primary);
  --tg-theme-text-color: var(--text-primary);

  /* Safe area */
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* ================================================
   BASE RESET
   ================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Animated background */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(108,92,231,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0,206,201,0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(85,239,196,0.03) 0%, transparent 70%);
  z-index: 0;
  animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(2%, -2%) rotate(1deg); }
  66% { transform: translate(-1%, 1%) rotate(-1deg); }
}

/* ================================================
   SCROLLBAR
   ================================================ */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(108, 92, 231, 0.3);
  border-radius: 10px;
}

/* ================================================
   APP CONTAINER
   ================================================ */
#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding-bottom: 80px;
}

/* ================================================
   LOADING SCREEN
   ================================================ */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loading-logo {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  animation: logoPulse 2s ease-in-out infinite;
}
@keyframes logoPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(108,92,231,0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 30px 10px rgba(108,92,231,0.2); }
}
.loading-text {
  font-size: 1.25rem;
  font-weight: 600;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(108,92,231,0.1);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-top: 1.5rem;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ================================================
   HEADER
   ================================================ */
.app-header {
  padding: 16px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
}
.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  overflow: hidden;
  border: 2px solid var(--border-accent);
}
.header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.header-info .header-name {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
}
.header-info .header-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.header-info .header-status .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-red);
}
.header-info .header-status .status-dot.active {
  background: var(--accent-green);
  box-shadow: 0 0 8px rgba(85, 239, 196, 0.5);
}
.header-actions {
  display: flex;
  gap: 8px;
}
.header-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s ease;
  position: relative;
}
.header-btn:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}
.header-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: var(--accent-red);
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-primary);
}

/* ================================================
   SECTIONS / PAGES
   ================================================ */
.page {
  display: none;
  padding: 16px 20px;
  animation: fadeIn 0.3s ease;
}
.page.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ================================================
   GLASSMORPHISM CARDS
   ================================================ */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
}
.glass-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
}
.glass-card.accent {
  background: var(--gradient-card);
  border-color: var(--border-accent);
}

/* ================================================
   BALANCE CARD (Hero)
   ================================================ */
.balance-card {
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}
.balance-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: shimmer 3s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-10%, 10%); }
}
.balance-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.8;
  font-weight: 500;
}
.balance-amount {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 8px 0;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
  position: relative;
  z-index: 1;
}
.balance-sub {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 0.8rem;
  opacity: 0.85;
  position: relative;
  z-index: 1;
}
.balance-sub-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.balance-sub-item .sub-value {
  font-weight: 700;
  font-size: 0.95rem;
}

/* ================================================
   STAT GRID
   ================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  transition: all 0.3s ease;
}
.stat-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}
.stat-card .stat-icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
}
.stat-card .stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-card .stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* ================================================
   AD PROGRESS CARD
   ================================================ */
.ad-progress-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.ad-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.ad-progress-title {
  font-weight: 600;
  font-size: 0.95rem;
}
.ad-progress-count {
  font-weight: 700;
  color: var(--accent-cyan);
}
.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}
.progress-bar .progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 10px;
  transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}
.progress-bar .progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: progressShimmer 2s ease-in-out infinite;
}
@keyframes progressShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.ad-progress-info {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ================================================
   WATCH AD BUTTON
   ================================================ */
.watch-ad-btn {
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-button);
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
}
.watch-ad-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s ease;
}
.watch-ad-btn:hover::before {
  left: 100%;
}
.watch-ad-btn:active {
  transform: scale(0.97);
}
.watch-ad-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}
.watch-ad-btn .btn-reward {
  font-size: 0.8rem;
  opacity: 0.85;
  font-weight: 500;
}

/* ================================================
   STREAK CARD
   ================================================ */
.streak-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.streak-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.streak-days {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.streak-day {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.3s ease;
}
.streak-day.completed {
  background: var(--gradient-success);
  border-color: transparent;
  color: white;
}
.streak-day.current {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  animation: currentDayPulse 2s ease-in-out infinite;
}
@keyframes currentDayPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 206, 201, 0.3); }
  50% { box-shadow: 0 0 10px 3px rgba(0, 206, 201, 0.2); }
}

/* ================================================
   TRANSACTION LIST
   ================================================ */
.transaction-list {
  list-style: none;
}
.transaction-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-glass);
  gap: 12px;
  transition: all 0.2s ease;
}
.transaction-item:last-child {
  border-bottom: none;
}
.transaction-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.transaction-icon.credit {
  background: rgba(85, 239, 196, 0.1);
}
.transaction-icon.debit {
  background: rgba(255, 107, 107, 0.1);
}
.transaction-details {
  flex: 1;
  min-width: 0;
}
.transaction-title {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.transaction-date {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.transaction-amount {
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.transaction-amount.credit {
  color: var(--accent-green);
}
.transaction-amount.debit {
  color: var(--accent-red);
}

/* ================================================
   BOTTOM NAVIGATION
   ================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 26, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  padding-bottom: calc(8px + var(--safe-area-bottom));
  z-index: 100;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  color: var(--text-muted);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.nav-item.active {
  color: var(--accent-cyan);
}
.nav-item .nav-icon {
  font-size: 1.3rem;
  transition: transform 0.2s ease;
}
.nav-item.active .nav-icon {
  transform: scale(1.1);
}
.nav-item .nav-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ================================================
   REFERRAL SECTION
   ================================================ */
.referral-link-box {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.referral-link-box input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  outline: none;
}
.copy-btn {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--gradient-primary);
  color: white;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.copy-btn:active {
  transform: scale(0.95);
}

/* ================================================
   SPIN WHEEL
   ================================================ */
.spin-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}
.spin-wheel-wrapper {
  position: relative;
  width: 280px;
  height: 280px;
  margin-bottom: 20px;
}
.spin-wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  transition: transform 5s cubic-bezier(0.17, 0.67, 0.12, 0.99);
  box-shadow: 0 0 30px rgba(108, 92, 231, 0.3), inset 0 0 20px rgba(0,0,0,0.2);
}
.spin-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-size: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.spin-btn {
  padding: 14px 40px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-button);
  transition: all 0.2s ease;
}
.spin-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ================================================
   SCRATCH CARD
   ================================================ */
.scratch-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}
.scratch-card-canvas {
  width: 280px;
  height: 180px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  margin-bottom: 16px;
}
.scratch-card-canvas canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  border-radius: var(--radius-lg);
}
.scratch-reward-display {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--gradient-card);
  border-radius: var(--radius-lg);
  z-index: 1;
}
.scratch-reward-amount {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ================================================
   WITHDRAWAL FORM
   ================================================ */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.form-input:focus {
  border-color: var(--accent-purple);
}
.form-input::placeholder {
  color: var(--text-muted);
}
select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff60' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-button);
  transition: all 0.2s ease;
}
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-secondary {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* ================================================
   TASK LIST
   ================================================ */
.task-item {
  display: flex;
  align-items: center;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  gap: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
}
.task-item:hover {
  border-color: var(--border-accent);
}
.task-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.task-info {
  flex: 1;
  min-width: 0;
}
.task-title {
  font-weight: 600;
  font-size: 0.9rem;
}
.task-reward-badge {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(85, 239, 196, 0.1);
  color: var(--accent-green);
  font-weight: 700;
  font-size: 0.8rem;
  white-space: nowrap;
}

/* ================================================
   LEADERBOARD
   ================================================ */
.leaderboard-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.leaderboard-tabs::-webkit-scrollbar { display: none; }
.lb-tab {
  padding: 8px 16px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  background: transparent;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.lb-tab.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
}
.lb-rank-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--border-glass);
  gap: 12px;
}
.lb-rank-num {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--bg-glass);
  color: var(--text-muted);
}
.lb-rank-item:nth-child(1) .lb-rank-num {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
}
.lb-rank-item:nth-child(2) .lb-rank-num {
  background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
  color: #000;
}
.lb-rank-item:nth-child(3) .lb-rank-num {
  background: linear-gradient(135deg, #CD7F32, #A0522D);
  color: #fff;
}
.lb-user-info {
  flex: 1;
}
.lb-user-name {
  font-weight: 600;
  font-size: 0.9rem;
}
.lb-score {
  font-weight: 700;
  color: var(--accent-cyan);
}

/* ================================================
   ACHIEVEMENTS
   ================================================ */
.achievement-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.achievement-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  transition: all 0.3s ease;
}
.achievement-card.completed {
  border-color: var(--accent-green);
  background: rgba(85, 239, 196, 0.05);
}
.achievement-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}
.achievement-name {
  font-weight: 600;
  font-size: 0.8rem;
  margin-bottom: 4px;
}
.achievement-progress {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.achievement-reward {
  font-size: 0.75rem;
  color: var(--accent-green);
  font-weight: 600;
}

/* ================================================
   DAILY BONUS
   ================================================ */
.bonus-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}
.bonus-day {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.7rem;
  transition: all 0.2s ease;
}
.bonus-day .day-num {
  font-weight: 700;
  font-size: 0.65rem;
  color: var(--text-muted);
}
.bonus-day .day-reward {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.bonus-day.claimed {
  background: rgba(85, 239, 196, 0.1);
  border-color: var(--accent-green);
}
.bonus-day.current {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
  animation: currentDayPulse 2s ease-in-out infinite;
}
.bonus-day.current .day-num,
.bonus-day.current .day-reward {
  color: white;
}

/* ================================================
   PROFILE
   ================================================ */
.profile-header {
  text-align: center;
  padding: 20px 0;
}
.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 auto 12px;
  border: 3px solid var(--border-accent);
  overflow: hidden;
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-name {
  font-size: 1.3rem;
  font-weight: 700;
}
.profile-username {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.profile-membership {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-xl);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 8px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  letter-spacing: 1px;
}
.profile-membership.vip {
  background: var(--gradient-gold);
  color: #000;
  border: none;
}
.profile-membership.gold {
  background: var(--gradient-secondary);
  color: #000;
  border: none;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}
.profile-stat {
  text-align: center;
  padding: 12px;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
}
.profile-stat-value {
  font-size: 1.1rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.profile-stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

/* ================================================
   NOTIFICATION LIST
   ================================================ */
.notification-item {
  display: flex;
  align-items: flex-start;
  padding: 14px;
  border-bottom: 1px solid var(--border-glass);
  gap: 12px;
  transition: all 0.2s ease;
}
.notification-item.unread {
  background: rgba(108, 92, 231, 0.05);
}
.notification-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.notification-content {
  flex: 1;
}
.notification-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2px;
}
.notification-message {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.notification-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ================================================
   ELIGIBILITY CHECKLIST
   ================================================ */
.eligibility-list {
  list-style: none;
}
.eligibility-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  gap: 10px;
  font-size: 0.9rem;
}
.eligibility-icon {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.eligibility-icon.met {
  background: rgba(85, 239, 196, 0.15);
  color: var(--accent-green);
}
.eligibility-icon.unmet {
  background: rgba(255, 107, 107, 0.15);
  color: var(--accent-red);
}

/* ================================================
   MODAL / POPUP
   ================================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}
.modal-overlay.active .modal-content {
  transform: scale(1);
}
.modal-emoji {
  font-size: 3rem;
  margin-bottom: 12px;
}
.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.modal-message {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}
.modal-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  color: white;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* ================================================
   COUNTDOWN / COOLDOWN
   ================================================ */
.cooldown-timer {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-orange);
  text-align: center;
  padding: 12px;
}

/* ================================================
   TOAST NOTIFICATION
   ================================================ */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  max-width: 90%;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
}
.toast.success {
  border-color: rgba(85, 239, 196, 0.3);
}
.toast.error {
  border-color: rgba(255, 107, 107, 0.3);
}
.toast-icon {
  font-size: 1.2rem;
}
.toast-message {
  font-size: 0.85rem;
  font-weight: 500;
}

/* ================================================
   EMPTY STATE
   ================================================ */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.5;
}
.empty-state .empty-text {
  font-size: 0.9rem;
}

/* ================================================
   SHIMMER LOADING
   ================================================ */
.shimmer {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.03) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.03) 75%
  );
  background-size: 200% 100%;
  animation: shimmerAnim 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmerAnim {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 360px) {
  .balance-amount { font-size: 2rem; }
  .stat-grid { gap: 6px; }
  .stat-card { padding: 10px; }
  .streak-day { width: 30px; height: 30px; font-size: 0.6rem; }
  .bonus-calendar { gap: 4px; }
}
@media (min-width: 500px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .achievement-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ================================================
   PREMIUM MENU CARDS & SUBPAGES
   ================================================ */

.premium-menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}

.premium-card {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  -webkit-tap-highlight-color: transparent;
}

.premium-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
  z-index: 1;
}

.premium-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

.premium-card:active {
  transform: translateY(2px) scale(0.98);
}

.premium-card .icon {
  font-size: 2.5rem;
  z-index: 2;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
  animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.premium-card .content {
  flex: 1;
  z-index: 2;
}

.premium-card .content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.premium-card .content p {
  font-size: 0.85rem;
  opacity: 0.85;
  line-height: 1.3;
}

.premium-card .arrow {
  font-size: 1.5rem;
  opacity: 0.7;
  z-index: 2;
  transition: transform 0.3s ease;
}

.premium-card:hover .arrow {
  transform: translateX(5px);
  opacity: 1;
}

/* Gradients for specific cards */
.premium-card.ads { background: var(--gradient-primary); }
.premium-card.bonus { background: var(--gradient-secondary); }
.premium-card.scratch { background: var(--gradient-info); }
.premium-card.tasks { background: var(--gradient-success); }

.back-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
  margin-bottom: 20px;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-2px);
}

/* =========================================================
   SUPPORT CHAT STYLES
   ========================================================= */
.chat-container {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.chat-message {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}
.chat-right {
  align-self: flex-end;
}
.chat-left {
  align-self: flex-start;
}
.chat-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.4;
  position: relative;
}
.chat-bubble-user {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-bubble-admin {
  background: var(--surface-light);
  color: var(--text);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
}
.chat-reply-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* =========================================================
   DAILY BONUS PREMIUM UI
   ========================================================= */
.bonus-calendar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  margin-top: 10px;
}
.bonus-day {
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.bonus-day::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}
.bonus-day .day-icon {
  font-size: 1.6rem;
  margin-bottom: 6px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.bonus-day .day-num {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.bonus-day .day-reward {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-green);
}
.bonus-day.current {
  background: linear-gradient(145deg, rgba(32, 191, 107, 0.15), rgba(32, 191, 107, 0.05));
  border-color: var(--accent-green);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(32, 191, 107, 0.2);
  animation: pulse-glow 2s infinite;
}
.bonus-day.current .day-num {
  color: var(--accent-green);
}
.bonus-day.claimed {
  opacity: 0.6;
  background: rgba(255, 255, 255, 0.02);
  border-color: transparent;
  transform: scale(0.95);
  box-shadow: none;
}
.bonus-day.claimed .day-reward {
  color: var(--text-muted);
}
@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(32, 191, 107, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(32, 191, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(32, 191, 107, 0); }
}
