*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent: #a78bfa;
  --accent-dim: rgba(167, 139, 250, 0.15);
  --bg: #08080f;
  --text: #f4f4f5;
  --muted: #52525b;
  --subtle: #27272a;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  width: 100%;
  max-width: 360px;
  padding: 2rem 1rem;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--muted);
}

.mode-tabs {
  display: flex;
  gap: 0.15rem;
  background: var(--subtle);
  border-radius: 8px;
  padding: 3px;
}

.tab {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  letter-spacing: 0.02em;
}

.tab.active {
  background: #18181b;
  color: var(--text);
}

/* Ring */
.main {
  position: relative;
}

.ring-wrap {
  position: relative;
  width: 280px;
  height: 280px;
}

.ring-wrap svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}

.track {
  fill: none;
  stroke: #18181b;
  stroke-width: 2;
}

.progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
  filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.7));
}

.center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.time {
  font-family: 'Inter Tight', sans-serif;
  font-size: 5rem;
  font-weight: 200;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.session-label {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Footer */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: 100%;
}

/* Controls */
.controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: opacity 0.15s, transform 0.1s, background 0.2s;
}
button:active { transform: scale(0.96); }

.btn-primary {
  background: var(--accent);
  color: #0a0014;
  padding: 0.75rem 2.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  min-width: 120px;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  padding: 0.75rem 1rem;
  border: 1px solid var(--subtle);
}

.btn-ghost:hover { color: var(--text); border-color: #3f3f46; }

/* Settings */
.settings {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.setting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.setting-label {
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.setting-stepper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.setting-stepper button {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s;
}
.setting-stepper button:hover { color: var(--text); }

.setting-stepper span {
  font-size: 1rem;
  font-weight: 300;
  min-width: 2ch;
  text-align: center;
  color: var(--text);
}

.divider {
  width: 1px;
  height: 32px;
  background: var(--subtle);
}

/* Dots */
.dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--subtle);
  transition: background 0.3s, box-shadow 0.3s;
}

.dot.filled {
  background: var(--accent);
  box-shadow: 0 0 6px rgba(167, 139, 250, 0.6);
}
