/* 
 * Naam Jap Counter - Core CSS 
 * Version 2.0
 */

:root {
  --bg-primary: #0F172A;      /* Deep spiritual blue */
  --bg-secondary: #1E293B;    /* Card background */
  --accent-gold: #F59E0B;     /* Divine gold */
  --accent-green: #10B981;    /* Bhakti green */
  --text-primary: #FFFFFF;    /* White text */
  --text-soft: #94A3B8;       /* Soft grey text */
  --glow-gold: 0 0 20px rgba(245,158,11,0.5);
  --glow-green: 0 0 15px rgba(16,185,129,0.4);
  --radius-lg: 20px;
  --transition-smooth: 0.3s ease-in-out;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at center, #1E293B, #0F172A);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Utility Classes */
.hidden { display: none !important; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.text-gold { color: var(--accent-gold); }
.text-green { color: var(--accent-green); }

/* Buttons */
.btn {
  background: transparent;
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.btn:active {
  transform: scale(0.95);
}

.btn-primary {
  background: var(--accent-gold);
  color: #000;
  box-shadow: var(--glow-gold);
}

/* Jap Counter UI */
.jap-container {
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  touch-action: manipulation; /* Improves touch response */
}

/* Typography */
.jap-count {
  font-size: 80px;
  font-weight: 700;
  color: var(--accent-gold);
  text-shadow: var(--glow-gold);
  transition: transform 0.1s ease;
  user-select: none;
}

.jap-count.tap-animate {
  transform: scale(1.1);
}

.mala-count {
  font-size: 18px;
  color: var(--text-soft);
  margin-top: 10px;
  letter-spacing: 1px;
}

/* Ripple Animation */
.tap-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(245,158,11,0.3);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Floating Text Animation */
.floating-text {
  position: absolute;
  color: var(--accent-gold);
  font-weight: bold;
  font-size: 24px;
  pointer-events: none;
  animation: floatUp 1s ease-out forwards;
  opacity: 0;
  text-shadow: 0 0 10px rgba(245,158,11,0.5);
}

@keyframes floatUp {
  0% { transform: translateY(0) scale(0.8); opacity: 0; }
  20% { opacity: 1; transform: translateY(-20px) scale(1.2); }
  100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

/* Glassmorphism Cards */
.glass-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  margin: 10px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Leaderboard Specifics */
.leaderboard-item {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.leaderboard-item.top-rank {
  border-left: 3px solid var(--accent-gold);
  background: rgba(245,158,11,0.05);
}

/* Heatmap Grid */
.heatmap {
  display: grid;
  grid-template-columns: repeat(7, 1fr); /* 7 days a week */
  gap: 4px;
  margin-top: 10px;
}

.heat-cell {
  aspect-ratio: 1;
  border-radius: 4px;
  background: #334155;
}
.heat-low { background: #065F46; }
.heat-mid { background: #10B981; }
.heat-high { background: #34D399; box-shadow: 0 0 5px #34D399; }

/* Mobile Optimizations */
@media (max-width: 480px) {
  .jap-count { font-size: 64px; }
}
