/* ============================================================================
   PEPE TAP-TO-EARN - PREMIUM WEB3 GAME UI
   Complete Redesign - Modern, Cute, Professional
   ============================================================================ */

/* CSS Variables - Light Mode (Default) */
:root {
  /* Colors */
  --bg-base: #f0f4f8;
  --bg-card: #ffffff;
  --bg-elevated: #f8fafc;
  --bg-glass: rgba(255, 255, 255, 0.7);

  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #64748b;
  
  --accent: #10b981;
  --accent-light: #34d399;
  --accent-dark: #059669;
  --accent-glow: rgba(16, 185, 129, 0.4);
  --accent-soft: rgba(16, 185, 129, 0.1);
  
  --border-color: rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 60px var(--accent-glow);
  
  /* Gradients */
  --gradient-card: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  --gradient-mesh: radial-gradient(ellipse at 20% 0%, rgba(16, 185, 129, 0.15) 0%, transparent 50%),
                   radial-gradient(ellipse at 80% 100%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  
  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
}

/* Dark Mode */
[data-theme="dark"] {
  --bg-base: #0f172a;
  --bg-card: #1e293b;
  --bg-elevated: #334155;
  --bg-glass: rgba(30, 41, 59, 0.8);
  
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent: #34d399;
  --accent-light: #6ee7b7;
  --accent-dark: #10b981;
  --accent-glow: rgba(52, 211, 153, 0.5);
  --accent-soft: rgba(52, 211, 153, 0.15);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  
  --gradient-card: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  --gradient-mesh: radial-gradient(ellipse at 20% 0%, rgba(52, 211, 153, 0.1) 0%, transparent 50%),
                   radial-gradient(ellipse at 80% 100%, rgba(52, 211, 153, 0.08) 0%, transparent 50%);
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background var(--transition-normal), color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================================
   ANIMATED BACKGROUND
   ============================================================================ */
.mesh-bg {
  position: fixed;
  inset: 0;
  background: var(--gradient-mesh);
  pointer-events: none;
  z-index: 0;
  transition: background var(--transition-slow);
}

.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.3;
  animation: float-particle 20s infinite linear;
}

@keyframes float-particle {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.3; }
  90% { opacity: 0.3; }
  100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* ============================================================================
   LOADING SCREEN
   ============================================================================ */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loading-screen.hidden {
  display: none;
}

.loading-content {
  text-align: center;
  padding: var(--space-xl);
}

.loading-logo {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-emoji {
  font-size: 4rem;
  animation: bounce-logo 1s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

@keyframes bounce-logo {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.05); }
}

.loading-rings {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0.3;
  animation: ring-expand 2s ease-out infinite;
}

.ring-1 { width: 60px; height: 60px; animation-delay: 0s; }
.ring-2 { width: 80px; height: 80px; animation-delay: 0.4s; }
.ring-3 { width: 100px; height: 100px; animation-delay: 0.8s; }

@keyframes ring-expand {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}

.loading-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

.loading-bar-container {
  width: 200px;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 0 auto var(--space-md);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.loading-bar {
  height: 100%;
  width: 0%;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  animation: loading-progress 2s ease-in-out forwards;
  box-shadow: 0 0 10px var(--accent-glow);
}

@keyframes loading-progress {
  0% { width: 0%; }
  100% { width: 100%; }
}

.loading-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ============================================================================
   APP CONTAINER & LAYOUT
   ============================================================================ */
.app {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
  z-index: 1;
  opacity: 1;
  transition: opacity var(--transition-normal);
}

.app.hidden {
  display: none;
}

.app.visible {
  opacity: 1;
}

.app.exiting {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.page-layout {
  flex: 1;
  display: flex;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

/* Ad Columns */
.ad-left, .ad-right {
  width: 180px;
  min-width: 180px;
  flex-shrink: 0;
  padding: var(--space-md);
  display: none;
}

body.ad-left-enabled .ad-left { display: block; }
body.ad-right-enabled .ad-right { display: block; }

@media (max-width: 1200px) {
  .ad-left, .ad-right { display: none !important; }
}

/* Content Wrapper */
.content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
  padding: 0 var(--space-md);
}

@media (min-width: 768px) {
  .content-wrapper {
    padding: 0 var(--space-lg);
  }
}

/* ============================================================================
   TOP BAR
   ============================================================================ */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  padding-top: max(var(--space-md), env(safe-area-inset-top));
  gap: var(--space-sm);
  flex-shrink: 0;
}

.back-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.back-btn:hover {
  background: var(--bg-elevated);
  transform: translateX(-2px);
}

.back-btn:active {
  transform: scale(0.95);
}

.wallet-pill {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  flex-shrink: 1;
  min-width: 0;
  transition: all var(--transition-fast);
}

.wallet-pill.connected {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
}

.wallet-dot {
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
  flex-shrink: 0;
  transition: background var(--transition-fast);
}

.wallet-pill.connected .wallet-dot {
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

.wallet-address {
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-shrink: 0;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  position: relative;
  font-size: 1.1rem;
}

.icon-btn:hover {
  background: var(--bg-elevated);
  transform: translateY(-2px);
}

.icon-btn:active {
  transform: scale(0.95);
}

/* Settings Dropdown */
.settings-dropdown-wrapper {
  position: relative;
}

.settings-btn {
  position: relative;
}

.settings-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
  z-index: 1000;
  margin-top: 4px;
}

.settings-dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.settings-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
}

.settings-menu-item:hover {
  background: var(--bg-elevated);
}

.settings-menu-item:active {
  transform: scale(0.98);
}

.settings-menu-icon {
  font-size: 1.1rem;
}

.settings-menu-label {
  flex: 1;
}

/* Sound Toggle */
.sound-toggle .sound-off { display: none; }
.sound-toggle.muted .sound-on { display: none; }
.sound-toggle.muted .sound-off { display: block; }

/* Haptic Toggle */
.haptic-toggle {
  display: none;
}

@media (max-width: 767px) {
  .haptic-toggle { display: flex; }
}

.haptic-toggle.disabled {
  opacity: 0.5;
}

/* Haptic Toggle Button in Top Bar */
#haptic-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

@media (max-width: 767px) {
  #haptic-toggle-btn {
    display: flex;
  }
}

#haptic-toggle-btn:hover {
  background: var(--bg-elevated);
  transform: translateY(-2px);
}

#haptic-toggle-btn:active {
  transform: scale(0.95);
}

#haptic-toggle-btn.disabled {
  opacity: 0.5;
}

/* Theme Button */
.theme-btn .theme-moon { display: none; }
[data-theme="dark"] .theme-btn .theme-sun { display: none; }
[data-theme="dark"] .theme-btn .theme-moon { display: block; }

/* ============================================================================
   DESKTOP NAVIGATION
   ============================================================================ */
.desktop-nav {
  display: none;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  flex-shrink: 0;
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-full);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.nav-pill:hover {
  background: var(--bg-elevated);
  color: var(--accent);
  transform: translateY(-2px);
}

.nav-pill.active {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
}

/* ============================================================================
   MAIN CONTENT
   ============================================================================ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  animation: fadeSlideIn 0.5s ease-out;
}

@keyframes fadeSlideIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.stat-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--gradient-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-card.highlight {
  background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 100%);
  border-color: var(--accent);
}

.stat-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (min-width: 768px) {
  .stat-card { padding: var(--space-lg); }
  .stat-icon { font-size: 2rem; }
  .stat-value { font-size: 1.5rem; }
  .stat-label { font-size: 0.75rem; }
}

/* Progress Card */
.progress-card {
  padding: var(--space-md);
  background: var(--gradient-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  position: relative;
}

@media (min-width: 768px) {
  .progress-card { padding: var(--space-lg); }
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.progress-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.progress-percentage {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
}

.progress-track {
  height: 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-glow {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, transparent 60%, var(--accent-glow));
  border-radius: var(--radius-full);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.progress-markers {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.progress-marker {
  position: absolute;
  top: 0;
  height: 100%;
  width: 1px;
  background: var(--text-muted);
  opacity: 0.35;
  transition: opacity var(--transition-fast);
}

.progress-marker.marker-25 {
  left: 25%;
}

.progress-marker.marker-50 {
  left: 50%;
}

.progress-marker.marker-75 {
  left: 75%;
}

.progress-marker.marker-100 {
  left: 100%;
  width: 2px;
  margin-left: -1px;
}

.progress-bar.breathing {
  animation: breathe 2s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-sm);
  gap: var(--space-sm);
}

.progress-taps-in-cycle {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-display);
}

.progress-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: right;
}

/* Micro Hint */
.micro-hint {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  z-index: 50;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.micro-hint.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}

.micro-hint.hidden {
  display: none !important;
}

/* Claim Status Card */
.claim-status-card {
  padding: var(--space-md);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, transparent 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(239, 68, 68, 0.3);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.claim-status-content {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.claim-status-icon {
  font-size: 2rem;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.claim-status-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.claim-status-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.claim-status-timer {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

/* Claim Ready Overlay */
.claim-ready-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 9998;
  animation: fadeIn 0.3s ease-out;
  cursor: pointer;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.claim-ready-modal {
  background: var(--gradient-card);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  max-width: 90%;
  width: 380px;
  text-align: center;
  box-shadow: var(--shadow-glow), var(--shadow-lg);
  border: 2px solid var(--accent);
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

@keyframes popIn {
  0% { opacity: 0; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

.claim-ready-emoji {
  font-size: 4rem;
  margin-bottom: var(--space-md);
  animation: bounce-emoji 0.6s ease-in-out infinite;
}

@keyframes bounce-emoji {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-15px) scale(1.1); }
}

.claim-ready-text {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--space-sm);
  text-shadow: 0 0 20px var(--accent-glow);
}

.claim-ready-hint {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Claim Ready Small Notification (Top Toast) */
.claim-ready-notification {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--gradient-card);
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 12px 20px;
  z-index: 9999;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: auto;
  max-width: 90%;
  width: auto;
  white-space: nowrap;
}

.claim-ready-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.claim-ready-notification-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
}

.claim-ready-notification-emoji {
  font-size: 1.2rem;
  animation: claim-notification-bounce 0.6s ease-in-out infinite;
}

@keyframes claim-notification-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.1); }
}

/* Mobile responsive */
@media (max-width: 480px) {
  .claim-ready-notification {
    top: 50px;
    padding: 10px 16px;
    font-size: 0.85rem;
  }

  .claim-ready-notification-content {
    gap: 6px;
  }

  .claim-ready-notification-emoji {
    font-size: 1rem;
  }
}

/* ============================================================================
   TAP ZONE - HERO SECTION
   ============================================================================ */
.tap-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg) 0;
  position: relative;
  min-height: 250px;
}

@media (min-width: 768px) {
  .tap-zone {
    min-height: 320px;
    padding: var(--space-xl) 0;
  }
}

.tap-button-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tap-glow-ring {
  position: absolute;
  width: calc(100% + 40px);
  height: calc(100% + 40px);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.5;
  animation: glow-pulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
}

.tap-button {
  width: clamp(140px, 35vw, 220px);
  height: clamp(140px, 35vw, 220px);
  border: none;
  border-radius: 50%;
  background: var(--gradient-card);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.15),
    0 0 0 4px var(--bg-card),
    0 0 0 6px var(--accent);
  transition: all 100ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  z-index: 10;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overflow: hidden;
  font-size: inherit;
}

.tap-button::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity 100ms ease-out;
}

.tap-button:hover {
  transform: scale(1.02);
  box-shadow:
    0 15px 50px rgba(0, 0, 0, 0.2),
    0 0 0 4px var(--bg-card),
    0 0 0 6px var(--accent),
    0 0 30px var(--accent-glow);
}

/* ============ PRESS FEEDBACK (IMMEDIATE) ============ */
.tap-button:active,
.tap-button.pressed {
  transform: scale(0.96) translateY(2px);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.12),
    0 0 0 4px var(--bg-card),
    0 0 0 6px var(--accent),
    inset 0 4px 12px rgba(0, 0, 0, 0.12);
}

.tap-button:active::before,
.tap-button.pressed::before {
  opacity: 0.08;
}

/* ============ RELEASE FEEDBACK (SMOOTH 100ms ease-out) ============ */
.tap-button.released {
  transform: scale(1) translateY(0);
  transition: all 100ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tap-button.instant-feedback {
  transform: scale(0.97);
  box-shadow:
    0 5px 20px rgba(0, 0, 0, 0.1),
    0 0 0 4px var(--bg-card),
    0 0 0 6px var(--accent),
    0 0 40px var(--accent-glow);
}

/* ============ DISABLED STATE (No animation, no vibration) ============ */
.tap-button:disabled,
.tap-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.08),
    0 0 0 4px var(--bg-card),
    0 0 0 6px rgba(0, 0, 0, 0.1);
}

.tap-button:disabled:hover,
.tap-button.disabled:hover {
  transform: none !important;
}

.tap-button.ready-pulse {
  animation: ready-pulse 1.5s ease-out;
}

@keyframes ready-pulse {
  0%, 100% { box-shadow: 0 10px 40px rgba(0,0,0,0.15), 0 0 0 4px var(--bg-card), 0 0 0 6px var(--accent); }
  50% { box-shadow: 0 10px 40px rgba(0,0,0,0.15), 0 0 0 4px var(--bg-card), 0 0 0 6px var(--accent), 0 0 50px var(--accent-glow); }
}

.tap-button.breathing {
  animation: breathing-btn 4s ease-in-out infinite;
}

@keyframes breathing-btn {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); box-shadow: 0 10px 40px rgba(0,0,0,0.15), 0 0 0 4px var(--bg-card), 0 0 0 6px var(--accent), 0 0 30px var(--accent-glow); }
}

.tap-button.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.tap-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.tap-emoji {
  font-size: clamp(3rem, 12vw, 5rem);
  transition: transform 0.1s ease;
  position: relative;
  z-index: 1;
}

.tap-button:active .tap-emoji,
.tap-button.pressed .tap-emoji {
  transform: scale(0.92);
}

.tap-label {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 3px;
  position: relative;
  z-index: 1;
}

.tap-pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  pointer-events: none;
}

/* Ripple Effect */
.ripple-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
}

.ripple {
  position: absolute;
  width: clamp(140px, 35vw, 220px);
  height: clamp(140px, 35vw, 220px);
  border-radius: 50%;
  border: 3px solid var(--accent);
  opacity: 0;
  animation: ripple-expand 0.6s ease-out forwards;
}

@keyframes ripple-expand {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Floating Text */
.floating-text-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: visible;
}

.floating-text {
  position: absolute;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: 800;
  color: var(--accent);
  pointer-events: none;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2), 0 0 20px var(--accent-glow);
  z-index: 100;
}

@keyframes float-up {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-60px) scale(1.2); }
}

/* ============================================================================
   RANK CARD
   ============================================================================ */
.rank-card {
  padding: var(--space-md);
  background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 100%);
  border-radius: var(--radius-lg);
  border: 2px solid var(--accent);
  text-align: center;
  box-shadow: var(--shadow-glow);
  animation: rank-glow 2s ease-in-out infinite;
}

@keyframes rank-glow {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
  50% { box-shadow: 0 0 35px var(--accent-glow); }
}

.rank-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.rank-trophy {
  font-size: 1.5rem;
}

.rank-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.rank-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.top-ten-badge {
  display: inline-block;
  margin-top: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #000;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

.rank-note {
  display: block;
  margin-top: var(--space-xs);
  font-size: 0.7rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Reward Message */
.reward-message {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: var(--space-sm);
  transition: all var(--transition-normal);
}

.reward-message.success {
  background: var(--accent);
  color: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow);
}

.reward-message.afterglow {
  box-shadow: 0 0 20px var(--accent-glow);
}

/* ============================================================================
   ACTIVITY HISTORY SECTION
   ============================================================================ */
.activity-history-card {
  padding: var(--space-md);
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-top: var(--space-lg);
}

.activity-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-color);
}

.activity-history-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.activity-history-count {
  display: inline-block;
  min-width: 24px;
  padding: 2px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
}

/* History Verified Badge */
.history-verified-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(57, 255, 20, 0.12);
  border: 1px solid rgba(57, 255, 20, 0.35);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent, #39FF14);
  white-space: nowrap;
  box-shadow: inset 0 0 8px rgba(57, 255, 20, 0.08);
  user-select: none;
  pointer-events: none;
}

.history-verified-badge span {
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-verified-badge span:first-child {
  font-size: 0.8125rem;
}

.activity-history-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-height: 300px;
  overflow-y: auto;
}

.activity-history-list::-webkit-scrollbar {
  width: 6px;
}

.activity-history-list::-webkit-scrollbar-track {
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
}

.activity-history-list::-webkit-scrollbar-thumb {
  background: var(--accent-light);
  border-radius: var(--radius-full);
}

.activity-history-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.activity-history-item:hover {
  background: var(--bg-card);
  border-color: var(--accent-light);
  box-shadow: var(--shadow-sm);
}

.activity-history-emoji {
  font-size: 1.5rem;
  min-width: 28px;
  text-align: center;
}

.activity-history-icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.activity-history-icon-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-history-content {
  flex: 1;
  min-width: 0;
}

.activity-history-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
}

.activity-history-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 2px 0 0 0;
}

.activity-history-amount {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-align: right;
  min-width: 60px;
}

.activity-empty {
  text-align: center;
  padding: var(--space-lg);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============================================================================
   BOTTOM NAVIGATION (Mobile & Desktop)
   ============================================================================ */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  padding: var(--space-sm) var(--space-md);
  padding-bottom: max(var(--space-sm), env(safe-area-inset-bottom));
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.nav-item:active {
  transform: scale(0.95);
}

.nav-item.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav-icon {
  width: 22px;
  height: 22px;
}

.nav-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ============================================================================
   TOAST NOTIFICATIONS
   ============================================================================ */
.toast-container {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
}

@media (min-width: 768px) {
  .toast-container { bottom: 40px; }
}

.toast {
  background: var(--bg-card);
  color: var(--text-primary);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  white-space: nowrap;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-10px) scale(0.9); }
}

/* ============================================================================
   FOOTER
   ============================================================================ */
.global-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: var(--space-lg) var(--space-md);
  flex-shrink: 0;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-content {
  text-align: center;
}

.footer-copyright {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.footer-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.footer-link {
  color: var(--accent);
  text-decoration: underline;
  font-size: 0.8rem;
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.footer-link:hover {
  background: var(--accent-soft);
}

.footer-separator {
  color: var(--text-muted);
  font-size: 0.6rem;
}

/* ============================================================================
   ANTI-ABUSE OVERLAYS
   ============================================================================ */
.tap-warning-overlay,
.tap-captcha-overlay,
.tap-locked-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 9998;
  animation: fadeIn 0.3s ease-out;
}

.tap-warning-box,
.tap-captcha-modal,
.tap-locked-box {
  background: var(--gradient-card);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 90%;
  width: 380px;
  box-shadow: var(--shadow-lg);
  animation: popIn 0.3s ease-out;
  text-align: center;
}

.tap-warning-box {
  border-left: 4px solid #f59e0b;
}

.tap-locked-box {
  border: 2px solid #ef4444;
}

.warning-message,
.tap-locked-box h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.warning-hint,
.lock-hint {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.captcha-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.captcha-header p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.captcha-container {
  padding: var(--space-md);
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.captcha-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 500;
  gap: var(--space-sm);
}

.captcha-checkbox input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.captcha-button {
  width: 100%;
  padding: var(--space-md);
  background: var(--gradient-accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.captcha-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.captcha-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--space-md);
}

.fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ============================================================================
   MOBILE ADS
   ============================================================================ */
@media (min-width: 1025px) {
  #mobile-ads-root { display: none !important; }
}

@media (max-width: 1024px) {
  #mobile-ads-root {
    width: 100%;
    display: block;
  }
  
  .mobile-ad-container {
    display: flex;
    justify-content: center;
    padding: var(--space-sm) 0;
  }
}

/* ============================================================================
   🎨 PREMIUM ACTIVITY HISTORY MODAL
   ============================================================================ */

/* Modal Overlay - Dark background with blur effect */
.activity-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInModal 0.3s ease;
}

/* Modal Container - Beautiful premium card */
.activity-modal-container {
  background: var(--bg-card);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: slideUpModal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

/* Modal Header - Title and close button */
.activity-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(16, 185, 129, 0.02) 100%);
  border-bottom: 1px solid var(--border-color);
}

.activity-modal-title-section {
  flex: 1;
}

.activity-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--space-xs) 0;
  letter-spacing: -0.5px;
}

.activity-modal-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  font-weight: 500;
}

/* Close Button - Premium styling */
.activity-modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  flex-shrink: 0;
}

.activity-modal-close:hover {
  background: var(--accent-soft);
  color: var(--accent);
  transform: rotate(90deg);
}

/* Modal Content - Scrollable area */
.activity-modal-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg);
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Loading State */
.activity-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  color: var(--text-muted);
}

.activity-modal-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty State */
.activity-modal-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  text-align: center;
  width: 100%;
}

.activity-modal-empty-icon {
  font-size: 4rem;
  opacity: 0.7;
}

.activity-modal-empty h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.activity-modal-empty p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 280px;
}

/* Activity List */
.activity-modal-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
}

.activity-modal-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
  cursor: default;
  animation: slideInItem 0.3s ease;
}

.activity-modal-item:hover {
  background: var(--gradient-card);
  border-color: var(--accent-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.activity-modal-emoji {
  font-size: 2rem;
  min-width: 48px;
  text-align: center;
}

.activity-modal-info {
  flex: 1;
  min-width: 0;
}

.activity-modal-event {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.activity-modal-time {
  margin: var(--space-xs) 0 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.activity-modal-amount {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 100px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Modal Footer - Close button */
.activity-modal-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--border-color);
  background: var(--bg-elevated);
  display: flex;
  gap: var(--space-md);
  justify-content: flex-end;
}

.activity-modal-btn-close {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: all var(--transition-normal);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.activity-modal-btn-close:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.activity-modal-btn-close:active {
  transform: translateY(0);
}

/* Animations */
@keyframes fadeInModal {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUpModal {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideInItem {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scrollbar Styling */
.activity-modal-content::-webkit-scrollbar {
  width: 6px;
}

.activity-modal-content::-webkit-scrollbar-track {
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
}

.activity-modal-content::-webkit-scrollbar-thumb {
  background: var(--accent-light);
  border-radius: var(--radius-full);
}

.activity-modal-content::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .activity-modal-container {
    width: 95%;
    max-height: 90vh;
    border-radius: 20px;
  }

  .activity-modal-title {
    font-size: 20px;
  }

  .activity-modal-header {
    padding: var(--space-md);
  }

  .activity-modal-content {
    padding: var(--space-md);
    min-height: 250px;
  }

  .activity-modal-footer {
    padding: var(--space-md);
  }

  .activity-modal-item {
    padding: var(--space-sm) var(--space-md);
  }

  .activity-modal-emoji {
    font-size: 28px;
  }

  .activity-modal-event {
    font-size: 14px;
  }

  .activity-modal-amount {
    font-size: 16px;
    min-width: 80px;
  }
}

/* Dark Mode Support */
body.dark-mode .activity-modal-container {
  background: #1a1d2e;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

body.dark-mode .activity-modal-header {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .activity-modal-footer {
  border-top-color: rgba(255, 255, 255, 0.1);
  background: #0f1419;
}

body.dark-mode .activity-modal-content {
  color: #ffffff;
}

body.dark-mode .activity-modal-item {
  background: #0f1419;
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .activity-modal-item:hover {
  background: linear-gradient(135deg, #1a1d2e 0%, #0f1419 100%);
  border-color: var(--accent-light);
}

/* ============================================================================
   REDUCED MOTION
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  
  .mesh-bg, .particles { display: none; }
}

/* ============================================================================
   IDLE & PERFORMANCE MODES
   ============================================================================ */
body.idle-mode .tap-glow-ring {
  animation-duration: 6s;
}

body.night-mode .tap-glow-ring {
  animation-duration: 8s;
  opacity: 0.3;
}

body.momentum-mode .tap-glow-ring {
  animation-duration: 1s;
  opacity: 0.8;
}

body.low-perf .mesh-bg,
body.low-perf .particles,
body.low-perf .tap-glow-ring {
  display: none;
}

/* 🔄 FALLBACK: For browsers that don't support backdrop-filter (iPhone/iPad ≤ 17) */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  /* Modal overlay - fallback to solid background */
  .modal-overlay,
  .activity-modal-overlay,
  .confirm-modal-overlay {
    background: rgba(0, 0, 0, 0.85) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

/* Hidden elements for JS compatibility */
#desktop-wallet-address,
#desktop-wallet-status {
  display: none;
}

/* Leaderboard Toggle */
.leaderboard-hidden { display: none !important; }
.leaderboard-visible { display: block !important; }
.leaderboard-toggle-btn { display: flex; align-items: center; justify-content: center; width: 100%; padding: 1rem; margin: 1rem 0; background: var(--gradient-card); border: 1px solid var(--border-color); border-radius: 20px; cursor: pointer; font-weight: 600; color: var(--text-secondary); transition: all 0.15s ease; }
.leaderboard-toggle-btn:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
