:root {
  --color-accent-alt: #d400ff;
  --color-obsidian: rgba(8, 8, 12, 0.85);
  --color-text-p: #ffffff;
  --color-text-s: rgba(255, 255, 255, 0.5);
  --ease-prestige: cubic-bezier(0.23, 1, 0.32, 1);
  --glass-border: rgba(255, 255, 255, 0.1);
  --prism-highlight: rgba(255, 255, 255, 0.05);
}

body {
  width: 100%;
  max-width: 500px;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

/* --- Background --- */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 50% 0%, #0a0a1a 0%, #030305 100%);
}

.aurora-element {
  position: absolute;
  width: 150%;
  height: 150%;
  top: -25%;
  left: -25%;
  filter: blur(60px);
  opacity: 0.1;
  mix-blend-mode: screen;
  animation: aurora-drift 60s infinite alternate ease-in-out;
  animation-play-state: paused;
  will-change: transform, opacity;
}

.aurora-element:nth-child(1) { background: radial-gradient(circle at center, rgba(0, 229, 255, 0.2) 0%, transparent 70%); }
.aurora-element:nth-child(2) { background: radial-gradient(circle at center, rgba(212, 0, 255, 0.15) 0%, transparent 70%); animation-delay: -15s; }
.aurora-element:nth-child(3) { background: radial-gradient(circle at center, rgba(80, 80, 255, 0.1) 0%, transparent 70%); animation-delay: -35s; }

@keyframes aurora-drift {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(5%, -5%) rotate(5deg); }
}

.aurora-bg.state-running .aurora-element { animation-play-state: running; opacity: 0.15; }
.aurora-bg.state-danger .aurora-element:nth-child(1) { background: radial-gradient(circle at center, rgba(255, 0, 85, 0.3) 0%, transparent 70%); }
.aurora-bg.state-complete .aurora-element:nth-child(1) { background: radial-gradient(circle at center, rgba(0, 255, 150, 0.2) 0%, transparent 70%); }

/* --- Main Container --- */
.swiss-timer-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 20px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1s var(--ease-prestige), transform 1s var(--ease-prestige);
}

.swiss-timer-container.reveal {
  opacity: 1;
  transform: translateY(0);
}

.unified-dashboard {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* --- Top Bar --- */
.unified-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.status-pill {
  background: var(--color-obsidian);
  border: 1px solid var(--glass-border);
  padding: 8px 16px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(10px);
}

.status-label {
  font-size: 10px;
  font-weight: 900;
  color: var(--color-text-s);
  letter-spacing: 0.1em;
}

.status-value {
  font-size: 20px;
  font-weight: 950;
  color: var(--color-accent);
}

.quick-settings { display: flex; gap: 10px; }

.icon-btn {
  background: var(--color-obsidian);
  border: 1px solid var(--glass-border);
  color: rgba(255, 255, 255, 0.4);
  width: 50px;
  height: 50px;
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s var(--ease-prestige);
}

.icon-btn.active {
  color: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: 0 0 15px rgba(255, 62, 0, 0.2);
}

.icon-btn svg { width: 24px; height: 24px; }

/* --- Timer Display --- */
.timer-main-zone {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.timer-circle-wrapper {
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.timer-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.timer-background-path { 
  fill: none; 
  stroke: rgba(255, 255, 255, 0.05); 
  stroke-width: 4;
}
.timer-progress-path {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke 0.3s ease;
}

.time-text {
  font-size: clamp(80px, 30vw, 160px);
  font-weight: 950;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.time-text.long-time { font-size: clamp(60px, 20vw, 100px); }

/* --- Bottom Controls --- */
.unified-bottom-zone {
  padding-bottom: 20px;
}

.adjustment-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.control-btn {
  background: var(--color-obsidian);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  color: #fff;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--ease-prestige);
  backdrop-filter: blur(10px);
}

.control-btn:active {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-accent);
}

.pad-value {
  font-size: 18px;
  font-weight: 900;
}

.control-btn.sub .pad-value { opacity: 0.6; }

.pad-unit {
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
  opacity: 0.3;
  margin-top: 4px;
}

/* --- States & Effects --- */
.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--color-accent);
}

.pulse-dot.running { animation: pulse 1.5s infinite; }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
}

.time-text.danger { animation: danger-pulse 0.5s infinite; color: #ff3b3b; }
@keyframes danger-pulse {
  0%, 100% { transform: scale(1); text-shadow: 0 0 20px rgba(255, 59, 59, 0.4); }
  50% { transform: scale(1.05); text-shadow: 0 0 30px rgba(255, 59, 59, 0.6); }
}

.timer-progress-path.danger { stroke: #ff3b3b !important; }

.flashing-bg::after {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(255, 59, 59, 0.05);
  animation: bg-pulse 0.5s infinite;
  pointer-events: none;
  z-index: 5;
}
@keyframes bg-pulse { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }

/* --- Footer --- */
.minimal-footer {
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-link {
  font-size: 10px;
  font-weight: 900;
  color: var(--color-text-s);
  text-decoration: none;
  letter-spacing: 0.2em;
  border: 1px solid var(--glass-border);
  padding: 8px 20px;
  border-radius: 20px;
  transition: all 0.3s;
}

.home-link:hover {
  color: #fff;
  border-color: #fff;
}
