/* Clean Design System for Ian's Booster Hub */
:root {
  --bg-dark: #090d16;
  --bg-card: rgba(22, 32, 50, 0.7);
  --bg-card-border: rgba(255, 255, 255, 0.1);
  --primary-glow: #10b981;
  --primary-accent: #059669;
  --secondary-glow: #8b5cf6;
  --accent-gold: #f59e0b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-pixel: 'Press Start 2P', monospace;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
}

/* Background Ambient Glow */
.background-glow {
  position: fixed;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 600px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.18) 0%, rgba(139, 92, 246, 0.12) 40%, rgba(9, 13, 22, 0) 75%);
  pointer-events: none;
  z-index: 0;
}

.app-container {
  width: 100%;
  max-width: 480px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 1;
  padding-bottom: 40px;
}

/* Header */
.hero-header {
  text-align: center;
  padding: 20px 16px 10px 16px;
  position: relative;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 30px;
  margin-bottom: 12px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary-glow);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary-glow);
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.badge-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-glow);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.25;
  background: linear-gradient(135deg, #ffffff 30%, #a7f3d0 70%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.hero-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sound-toggle-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

/* Cards Base */
.card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-icon {
  font-size: 1.2rem;
}

.card-header h2 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  flex: 1;
}

.card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Energy Booster */
.energy-percent {
  font-weight: 800;
  color: var(--primary-glow);
  font-size: 1.1rem;
}

.energy-bar-track {
  width: 100%;
  height: 16px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.energy-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399, #f59e0b);
  border-radius: 10px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

.energy-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.boost-feedback {
  font-size: 0.8rem;
  color: var(--accent-gold);
  font-weight: 700;
  min-height: 1.2em;
  text-align: center;
}

/* Buttons */
.btn {
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  width: 100%;
  touch-action: manipulation;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-glow), var(--primary-accent));
  color: #042f2e;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.btn-primary:active {
  transform: scale(0.97);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:active {
  background: rgba(255, 255, 255, 0.15);
}

.btn-success {
  background: linear-gradient(135deg, #22c55e, #15803d);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
}

.btn-large {
  padding: 14px 24px;
  font-size: 1rem;
}

/* Countdown Grid */
.timer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 4px;
}

.timer-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 6px;
  text-align: center;
}

.timer-val {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-glow);
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.timer-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Quote Card */
.quote-box {
  background: rgba(139, 92, 246, 0.12);
  border-left: 3px solid var(--secondary-glow);
  padding: 14px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quote-text {
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #e2e8f0;
}

.quote-author {
  font-size: 0.75rem;
  color: var(--secondary-glow);
  font-weight: 700;
  text-align: right;
}

/* Navigation Tabs */
.nav-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 4px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tab-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hidden {
  display: none !important;
}

/* Game Selection */
.game-selection h3 {
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--text-muted);
}

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

.game-select-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.game-select-card.active {
  border-color: var(--primary-glow);
  background: rgba(16, 185, 129, 0.12);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.game-icon {
  font-size: 1.5rem;
}

.game-info h4 {
  font-size: 0.8rem;
  font-weight: 700;
}

.game-info p {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* Game Wrappers */
.game-screen-wrapper {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game-header-bar {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.stat-badge {
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

.highlight-val {
  color: var(--primary-glow);
  font-weight: 800;
}

/* Game 1: EDA Task Smasher Arena */
.smasher-arena {
  width: 100%;
  height: 320px;
  background: #0d1322;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.smasher-target {
  position: absolute;
  padding: 10px 14px;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: white;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.8rem;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
  cursor: pointer;
  animation: float-up 2.2s linear infinite;
  touch-action: manipulation;
}

@keyframes float-up {
  0% { transform: translateY(320px) scale(0.8); opacity: 0; }
  10% { opacity: 1; transform: translateY(280px) scale(1); }
  90% { opacity: 1; }
  100% { transform: translateY(-40px) scale(0.9); opacity: 0; }
}

.smasher-start-overlay, .catcher-start-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(9, 13, 22, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
  z-index: 10;
  border-radius: var(--radius-md);
}

.smasher-start-overlay h3, .catcher-start-overlay h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--primary-glow);
}

.smasher-start-overlay p, .catcher-start-overlay p {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 280px;
}

/* Game 2: Catcher Canvas */
.catcher-arena-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

#catcherCanvas {
  background: #0a0f1d;
  border-radius: var(--radius-md);
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-touch-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

.touch-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 14px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.9rem;
  touch-action: manipulation;
}

.touch-btn:active {
  background: var(--primary-glow);
  color: #000;
}

/* Roadmap List */
.roadmap-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
}

.progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary-glow);
  border-radius: 6px;
  transition: width 0.3s ease;
}

.roadmap-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.checklist-item.done {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.08);
}

.check-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: transparent;
  flex-shrink: 0;
  margin-top: 2px;
}

.checklist-item.done .check-box {
  background: var(--primary-glow);
  border-color: var(--primary-glow);
  color: #042f2e;
}

.toggle-check-btn {
  background: transparent;
  border: none;
  cursor: pointer;
}

.check-text strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 2px;
}

.check-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* WhatsApp Form */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-control {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  padding: 12px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary-glow);
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 16px 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-sub {
  font-size: 0.65rem;
  opacity: 0.7;
  margin-top: 4px;
}
