/* Import Inter Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;500;700;900&display=swap');

:root {
  /* Palette */
  --bg-deep: #0f172a;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);

  /* Accents */
  --cyan-primary: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.6);
  --amber-primary: #f59e0b;
  --red-alert: #ef4444;
  --red-glow: rgba(239, 68, 68, 0.6);
  --green-success: #10b981;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

* { box-sizing: border-box; }

.reset-view {
  width: 100%;
  height: 100%;
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0) 0%, rgba(2, 6, 23, 0.8) 100%),
    linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

/* Ambient Effects */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.2;
  z-index: 0;
  animation: pulse-glow 4s infinite ease-in-out;
}
.glow-red { width: 500px; height: 500px; background: var(--red-alert); top: -200px; left: -100px; }
.glow-amber { width: 400px; height: 400px; background: var(--amber-primary); bottom: -100px; right: -100px; animation-delay: -2s; }

@keyframes pulse-glow {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(1.1); }
}

/* Header */
.reset-header { text-align: center; z-index: 2; margin-bottom: 2rem; flex-shrink: 0; }

.header-badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 3px;
  font-weight: 700;
  color: var(--red-alert);
  background: rgba(239, 68, 68, 0.1);
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  margin-bottom: 0.5rem;
  animation: blink-red 2s infinite;
}

.reset-header h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 900;
  text-transform: uppercase;
  background: linear-gradient(to bottom, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

/* Stage */
.reset-stage {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  position: relative;
}

/* Glass Console (The Container) */
.core-console {
  width: 100%;
  max-width: 500px;
  min-height: 350px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255,255,255,0.05);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Layers (Switchable Content) */
.console-layer {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  animation: fade-in 0.5s ease;
  padding: 2rem;
  text-align: center;
}
.console-layer.hidden { display: none; }

/* Text Styles */
.console-text h2 { margin: 0; font-size: 1.2rem; font-weight: 700; color: #fff; letter-spacing: 1px; }
.console-text p { margin: 8px 0 0; font-size: 0.9rem; color: var(--text-muted); }

/* --- STATE 1: WARNING --- */
.icon-box.warning {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.1);
  border: 2px solid var(--amber-primary);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.2);
  animation: pulse-amber 1.5s infinite;
}
.icon-box.warning .icon { font-size: 3.5rem; }

/* --- STATE 2: COUNTDOWN --- */
.countdown-ring {
  position: relative;
  width: 180px; height: 180px;
  display: flex; align-items: center; justify-content: center;
}

.progress-ring__circle {
  stroke: var(--red-alert);
  stroke-dasharray: 565; /* 2 * PI * 90 */
  stroke-dashoffset: 0;
  transform-origin: 50% 50%;
  transform: rotate(-90deg);
  animation: countdown-drain 6s linear forwards;
  filter: drop-shadow(0 0 10px var(--red-glow));
}

.timer-value {
  position: absolute;
  font-size: 5rem;
  font-weight: 900;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.timer-value.pop { animation: pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

/* --- STATE 3: RESET CORE --- */
.hyper-core {
  position: relative;
  width: 160px; height: 160px;
}

.core-inner {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 60px; height: 60px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 50px var(--cyan-primary);
  z-index: 2;
  animation: core-flash 0.2s infinite alternate;
}

.core-outer {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  border: 4px solid var(--cyan-primary);
  border-radius: 50%;
  border-top-color: transparent;
  border-bottom-color: transparent;
  animation: spin-crazy 1s infinite linear;
}

.shockwave {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 0%; height: 0%;
  border: 2px solid #fff;
  border-radius: 50%;
  animation: ripple 1s infinite linear;
}

.blink-text { animation: blink 0.2s infinite; color: var(--cyan-primary) !important; }

/* Footer */
.hud-footer {
  margin-top: 1rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.player-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,0.4);
  padding: 8px 16px;
  border-radius: 50px;
  border: 1px solid var(--glass-border);
  font-size: 0.8rem;
}
.player-pill .label { color: var(--text-muted); font-weight: 700; font-size: 0.6rem; letter-spacing: 1px; }
.player-pill .value { font-weight: 700; color: #fff; }
.player-pill .coins { color: var(--amber-primary); font-weight: 700; margin-left: 8px; }

.message-glass {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  padding: 1rem 3rem;
  border-radius: 100px;
  border: 1px solid var(--glass-border);
  text-align: center;
  min-width: 400px;
  font-weight: 500;
  font-family: monospace;
}
.message-glass.warning { border-color: var(--amber-primary); color: var(--amber-primary); }
.message-glass.danger { border-color: var(--red-alert); color: var(--red-alert); background: rgba(239, 68, 68, 0.1); }
.message-glass.active { border-color: var(--cyan-primary); color: var(--cyan-primary); }
.message-glass.success { border-color: var(--green-success); color: var(--green-success); }

/* Animation Keyframes */
@keyframes fade-in { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes blink-red { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes pulse-amber { 0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(245, 158, 11, 0.2); } 50% { transform: scale(1.05); box-shadow: 0 0 50px rgba(245, 158, 11, 0.5); } }
@keyframes pop { 0% { transform: scale(0.5); opacity: 0; } 60% { transform: scale(1.2); } 100% { transform: scale(1); opacity: 1; } }
@keyframes countdown-drain { to { stroke-dashoffset: 565; } }
@keyframes spin-crazy { 100% { transform: rotate(360deg); } }
@keyframes ripple { 0% { width: 0%; height: 0%; opacity: 1; border-width: 5px; } 100% { width: 200%; height: 200%; opacity: 0; border-width: 0px; } }
@keyframes blink { 50% { opacity: 0; } }

/* View Effects */
.shake-mild { animation: shake 0.5s ease-in-out; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.flash-white { animation: flash 0.1s infinite; }
@keyframes flash { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(2) contrast(1.2); } }

.success-fade { animation: success-flash 1s forwards; }
@keyframes success-flash { 0% { filter: brightness(2) sepia(1) hue-rotate(90deg); } 100% { filter: brightness(1); } }