/**
 * Clicker Game Styles - Retro Arcade Theme
 * Theme: Neon arcade, glowing buttons, pixel-style UI
 * Colors: Cyan (#38bdf8), Red (#f43f5e), Dark blue (#1e1e2e)
 */

/* ===== THEME VARIABLES ===== */
.clicker-page {
  --clicker-bg-dark: #0a0a14;
  --clicker-bg-light: #1e1e2e;
  --clicker-accent: #38bdf8;
  --clicker-btn-primary: #f43f5e;
  --clicker-btn-dark: #be123c;
  --clicker-btn-shadow: #881337;
  --clicker-success: #22c55e;
  --clicker-warning: #f87171;
  --clicker-gold: #fbbf24;
  
  text-align: center;
}

/* ===== ARCADE CONTAINER ===== */
.arcade-container {
  background: linear-gradient(145deg, var(--clicker-bg-light), var(--clicker-bg-dark));
  border: 3px solid var(--clicker-accent);
  border-radius: 20px;
  padding: 30px;
  max-width: 400px;
  margin: 0 auto;
  box-shadow: 
    0 0 20px rgba(56, 189, 248, 0.3),
    inset 0 0 30px rgba(0, 0, 0, 0.5);
}

/* ===== ARCADE TITLE ===== */
.arcade-title {
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--clicker-accent);
  text-shadow: 
    0 0 10px var(--clicker-accent),
    0 0 20px var(--clicker-accent);
  margin-bottom: 10px;
}

.arcade-subtitle {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 20px;
}

/* ===== CLICKER BUTTON ===== */
#clickBtn {
  font-size: 1.8rem;
  padding: 0;
  margin: 20px auto;
  border-radius: 50%;
  width: 160px;
  height: 160px;
  background: linear-gradient(145deg, var(--clicker-btn-primary), var(--clicker-btn-dark));
  border: 4px solid #fda4af;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  box-shadow: 
    0 8px 0 var(--clicker-btn-shadow),
    0 10px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.1s ease;
  user-select: none;
  font-weight: bold;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#clickBtn:hover:not(:disabled) {
  background: linear-gradient(145deg, #fb7185, #e11d48);
  transform: translateY(-2px);
  box-shadow: 
    0 10px 0 var(--clicker-btn-shadow),
    0 12px 25px rgba(0, 0, 0, 0.4);
}

#clickBtn:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: 
    0 4px 0 var(--clicker-btn-shadow),
    0 6px 10px rgba(0, 0, 0, 0.4);
}

#clickBtn:disabled {
  background: linear-gradient(145deg, #475569, #334155);
  border-color: #64748b;
  box-shadow: 0 4px 0 #1e293b;
  color: #94a3b8;
}

/* Pop Animation */
#clickBtn.pop {
  animation: popEffect 0.15s ease;
}

@keyframes popEffect {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.05); }
  100% { transform: translateY(0) scale(1); }
}

/* ===== RESTART BUTTON ===== */
.restart-btn {
  background: linear-gradient(145deg, var(--clicker-success), #16a34a);
  border: 2px solid #86efac;
  color: #fff;
  padding: 12px 24px;
  font-size: 1rem;
  margin-top: 10px;
}

.restart-btn:hover {
  background: linear-gradient(145deg, #4ade80, var(--clicker-success));
}

/* ===== COUNTDOWN WARNING ===== */
.warning {
  color: var(--clicker-warning) !important;
  font-weight: bold;
  animation: pulse 0.5s ease infinite;
  text-shadow: 0 0 10px var(--clicker-warning);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== SCORE MESSAGE ===== */
#finalMessage {
  font-size: 1.4rem;
  margin-top: 16px;
  min-height: 35px;
  color: var(--clicker-gold);
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

#finalMessage.new-record {
  animation: recordCelebrate 0.6s ease;
}

@keyframes recordCelebrate {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.1) rotate(-2deg); }
  75% { transform: scale(1.1) rotate(2deg); }
}

/* ===== SCORE COUNTER ANIMATION ===== */
#score {
  transition: transform 0.1s ease;
}

#score.bump {
  animation: scoreBump 0.15s ease;
}

@keyframes scoreBump {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 600px) {
  .arcade-container {
    padding: 20px 15px;
    margin: 0 10px;
    border-width: 2px;
  }
  
  .arcade-title {
    font-size: 1.5rem;
    letter-spacing: 1px;
  }
  
  #clickBtn {
    width: 130px;
    height: 130px;
    font-size: 1.4rem;
  }
}
