/* =========================================================================
   Ende des Leidens — Countdown
   Layout und Optik bewusst unverändert gegenüber der Einzeldatei-Version.
   Neu: Fokus-Sichtbarkeit, prefers-reduced-motion, echte Button-Elemente.
   ========================================================================= */

:root {
  --bg-dark: #07070a;
  --card-bg: rgba(255, 255, 255, 0.025);
  --card-border: rgba(255, 255, 255, 0.08);
  --neon-cyan: #00f0ff;
  --neon-magenta: #ff007f;
  --neon-purple: #8a2be2;
  --neon-lime: #39ff14;
  --neon-yellow: #ffd700;
  --text-main: #f5f5f7;
  --text-dim: #9a9aa8;
  --postit-bg: #fff176;
  --postit-text: #2c2c2e;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  padding: clamp(2rem, 5vw, 4rem) env(safe-area-inset-right) clamp(3.5rem, 7vw, 5.5rem) env(safe-area-inset-left);
  gap: 2rem;
}

/* Button-Reset: Buttons, die wie Text oder Karten aussehen sollen */
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Blitz-Overlay */
.lightning-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: radial-gradient(circle at center, rgba(0, 240, 255, 0.35), rgba(255, 0, 127, 0.25), transparent 80%);
  opacity: 0;
  pointer-events: none;
  z-index: 10000;
  transition: opacity 0.15s ease-out;
}

body.flash-active .lightning-overlay { opacity: 1; }

/* Hintergrund-Glow */
.bg-glow {
  position: fixed;
  width: 80vw;
  height: 80vw;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.08) 0%, rgba(138, 43, 226, 0.05) 45%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

body.minute-boost .bg-glow {
  transform: translate(-50%, -50%) scale(1.35);
  background: radial-gradient(circle, rgba(0, 240, 255, 0.18) 0%, rgba(255, 0, 127, 0.12) 45%, transparent 70%);
}

body.party-mode .bg-glow {
  transform: translate(-50%, -50%) scale(1.6);
  background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, rgba(255, 0, 127, 0.25) 40%, rgba(0, 240, 255, 0.2) 70%, transparent 85%);
  animation: pulseGlow 2.5s infinite alternate;
}

@keyframes pulseGlow {
  0%   { opacity: 0.75; transform: translate(-50%, -50%) scale(1.5); }
  100% { opacity: 1;    transform: translate(-50%, -50%) scale(1.75); }
}

canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 9999;
  pointer-events: none;
}

/* Karten-Container */
.container {
  position: relative;
  z-index: 2;
  max-width: 980px;
  width: 92%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  transition: border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-card {
  text-align: center;
  padding: 2.8rem 1.8rem;
}

.container.minute-boost {
  border-color: rgba(0, 240, 255, 0.6);
  box-shadow:
    0 0 45px rgba(0, 240, 255, 0.25),
    0 0 80px rgba(255, 0, 127, 0.15),
    inset 0 0 20px rgba(0, 240, 255, 0.1);
  transform: scale(1.015);
}

.container.party-mode {
  border: 2px solid var(--neon-yellow);
  box-shadow:
    0 0 60px rgba(255, 215, 0, 0.5),
    0 0 120px rgba(255, 0, 127, 0.4),
    0 0 180px rgba(0, 240, 255, 0.3),
    inset 0 0 40px rgba(255, 215, 0, 0.2);
  animation: borderRainbow 3.5s infinite linear;
}

@keyframes borderRainbow {
  0%   { border-color: #00f0ff; box-shadow: 0 0 60px rgba(0,240,255,0.5), 0 0 120px rgba(255,0,127,0.4); }
  33%  { border-color: #ff007f; box-shadow: 0 0 60px rgba(255,0,127,0.5), 0 0 120px rgba(57,255,20,0.4); }
  66%  { border-color: #39ff14; box-shadow: 0 0 60px rgba(57,255,20,0.5), 0 0 120px rgba(255,215,0,0.4); }
  100% { border-color: #00f0ff; box-shadow: 0 0 60px rgba(0,240,255,0.5), 0 0 120px rgba(255,0,127,0.4); }
}

h1 {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: clamp(1.8rem, 5.5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 0.4rem;
  background: linear-gradient(135deg, #ffffff 30%, #a5a5b5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.4s ease;
}

.container.minute-boost h1 {
  background: linear-gradient(135deg, #ffffff 0%, var(--neon-cyan) 50%, var(--neon-magenta) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: clamp(0.75rem, 2.5vw, 0.9rem);
  color: var(--text-dim);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 2.8rem;
}

/* Im Finale wird alles andere ausgeblendet */
body.party-mode .main-clock,
body.party-mode .secondary-grid,
body.party-mode .quote-box,
body.party-mode .tally-card,
body.party-mode .milestones-card,
body.party-mode .envelope-trigger,
body.party-mode .docked-postit {
  display: none !important;
}

/* Haupt-Countdown */
.main-clock {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(0.6rem, 3vw, 1.5rem);
  margin-bottom: 2.8rem;
  flex-wrap: wrap;
}

.time-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: clamp(90px, 25vw, 140px);
}

.number {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.container.minute-boost .number {
  color: #fff;
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.9), 0 0 40px rgba(0, 240, 255, 0.4);
  transform: scale(1.05);
}

.label {
  font-size: clamp(0.65rem, 2vw, 0.75rem);
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-dim);
  margin-top: 0.8rem;
  font-weight: 600;
}

.separator {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: clamp(2rem, 6vw, 4.5rem);
  color: rgba(255, 255, 255, 0.15);
  margin-top: -1.5rem;
  transition: color 0.4s ease, text-shadow 0.4s ease;
}

.container.minute-boost .separator {
  color: var(--neon-magenta);
  text-shadow: 0 0 15px var(--neon-magenta);
}

/* Sekundäre Kennzahlen */
.secondary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.5rem, 2vw, 1rem);
  border-top: 1px solid var(--card-border);
  padding-top: 2rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: clamp(0.8rem, 2.5vw, 1.4rem);
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.03);
}

.stat-number {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: clamp(1.4rem, 4.5vw, 2.2rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -1px;
  margin-bottom: 0.2rem;
}

.stat-label {
  font-size: clamp(0.6rem, 1.8vw, 0.75rem);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

/* Sprüche */
.quote-box {
  margin-top: 2.2rem;
  padding: 1.1rem 1.6rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  transition: all 0.4s ease;
}

.container.minute-boost .quote-box {
  border-color: rgba(0, 240, 255, 0.4);
  background: rgba(0, 240, 255, 0.08);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
}

.quote-text {
  font-size: clamp(0.85rem, 2.8vw, 0.95rem);
  color: #cfcfda;
  font-style: italic;
  letter-spacing: 0.5px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.quote-text.fade-out {
  opacity: 0;
  transform: translateY(-3px);
}

.container.minute-boost .quote-text {
  color: #fff;
  font-style: normal;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.7);
}

/* Finale */
.finale-box {
  display: none;
  padding: 1rem 0.5rem;
}

body.party-mode .finale-box { display: block; }

.finale-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--neon-yellow);
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.5);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.finale-title {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: clamp(2.4rem, 7.5vw, 4.8rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffd700 0%, #ff007f 50%, #00f0ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.finale-message {
  font-size: clamp(1.05rem, 3.2vw, 1.35rem);
  color: #f1f1f7;
  max-width: 720px;
  margin: 0 auto 2.8rem;
  line-height: 1.6;
  font-weight: 500;
}

.finale-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2.8rem;
}

.finale-stat-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 215, 0, 0.35);
  padding: 1.4rem 1rem;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.finale-stat-num {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--neon-yellow);
  margin-bottom: 0.3rem;
}

.finale-stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
}

.finale-action-btn {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: clamp(0.95rem, 3vw, 1.1rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 1.2rem 2.8rem;
  border-radius: 50px;
  background: linear-gradient(90deg, #ff007f, #ffd700, #00f0ff);
  color: #000;
  box-shadow: 0 0 35px rgba(255, 0, 127, 0.7), 0 0 60px rgba(255, 215, 0, 0.5);
  transition: all 0.3s ease;
}

.finale-action-btn:hover {
  transform: scale(1.06) translateY(-3px);
  box-shadow: 0 0 50px rgba(255, 0, 127, 0.9), 0 0 90px rgba(0, 240, 255, 0.8);
}

/* Strichliste */
.tally-card {
  padding: 1.5rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.tally-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 0.8rem;
}

.tally-title {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: clamp(0.9rem, 3vw, 1.05rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.tally-action-btn {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0.45rem 1rem;
  border-radius: 50px;
  background: rgba(0, 240, 255, 0.1);
  color: var(--neon-cyan);
  border: 1px solid var(--neon-cyan);
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.tally-action-btn:hover:not(.done) {
  background: rgba(0, 240, 255, 0.25);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.5);
  transform: scale(1.03);
}

.tally-action-btn.done {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
  cursor: default;
}

.tally-meta {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  text-align: center;
}

.tally-meta b {
  color: var(--neon-lime);
  font-weight: 600;
}

.tally-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.9rem;
  justify-content: center;
  align-items: center;
  padding: 0.4rem 0.2rem;
  position: relative;
}

.tally-svg {
  width: 32px;
  height: 28px;
  overflow: visible;
  transition: transform 0.2s ease;
}

.tally-svg:hover { transform: scale(1.15) rotate(-2deg); }

.tally-svg line {
  stroke: #c8c8d8;
  stroke-width: 2.3;
  stroke-linecap: round;
  transition: all 0.3s ease;
}

.tally-svg line.slash {
  stroke: var(--neon-cyan);
  stroke-width: 2.5;
  filter: drop-shadow(0 0 3px rgba(0, 240, 255, 0.5));
}

.container.minute-boost .tally-svg line {
  stroke: #fff;
  filter: drop-shadow(0 0 5px var(--neon-cyan));
}

.tally-svg line.fresh-mark {
  opacity: 0;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
}

.tally-svg line.fresh-mark.animate-draw {
  animation: sketchLineIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes sketchLineIn {
  to { opacity: 1; stroke-dashoffset: 0; }
}

/* Kreidestift */
.chalk-pen {
  position: absolute;
  top: 55%;
  right: -80px;
  transform: translateY(-50%) rotate(-25deg);
  width: 65px;
  height: 18px;
  background: linear-gradient(90deg, #00f0ff 0%, #d8f8ff 40%, #555 45%, #222 100%);
  border-radius: 4px 10px 10px 4px;
  box-shadow: -5px 5px 15px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 240, 255, 0.8);
  pointer-events: none;
  opacity: 0;
  z-index: 100;
}

.chalk-pen.animate {
  animation: drawChalkFromRight 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes drawChalkFromRight {
  0%   { right: -70px; opacity: 1; transform: translateY(-50%) rotate(-25deg) scale(1); }
  50%  { right: 50%;   opacity: 1; transform: translateY(-40%) rotate(-35deg) scale(1.1); }
  100% { right: 85%;   opacity: 0; transform: translateY(-60%) rotate(-15deg) scale(0.8); }
}

/* Briefcouvert und Post-it */
.envelope-trigger {
  position: fixed;
  right: 1.5rem;
  top: 30%;
  z-index: 4000;
  background: linear-gradient(135deg, rgba(255, 241, 118, 0.15), rgba(255, 241, 118, 0.05));
  border: 1px solid rgba(255, 241, 118, 0.4);
  padding: 0.8rem 1.2rem;
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(255, 241, 118, 0.2);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  animation: envelopeFloat 3s infinite ease-in-out;
}

.envelope-trigger:hover {
  border-color: rgba(255, 241, 118, 0.8);
  box-shadow: 0 15px 40px rgba(0,0,0,0.7), 0 0 30px rgba(255, 241, 118, 0.4);
}

@keyframes envelopeFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.envelope-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 5px rgba(255, 241, 118, 0.6));
}

.envelope-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--neon-yellow);
  line-height: 1.2;
  text-align: left;
}

.docked-postit {
  position: fixed;
  right: 1.5rem;
  top: 30%;
  z-index: 3900;
  width: 195px;
  background: var(--postit-bg);
  color: var(--postit-text);
  padding: 1.4rem 1.2rem 1.2rem;
  border-radius: 4px 4px 14px 4px;
  box-shadow: -5px 15px 30px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 241, 118, 0.15);
  transform: rotate(-3deg);
  display: none;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  font-family: 'Caveat', cursive, sans-serif;
}

.docked-postit.show {
  display: block;
  animation: postItDock 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes postItDock {
  0%   { opacity: 0; transform: scale(1.4) rotate(0deg) translate(-50px, 0); }
  100% { opacity: 1; transform: scale(1) rotate(-3deg) translate(0, 0); }
}

.docked-postit:hover {
  transform: rotate(0deg) scale(1.05);
  box-shadow: -8px 20px 40px rgba(0, 0, 0, 0.8), 0 0 35px rgba(255, 241, 118, 0.3);
}

.docked-postit::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(2deg);
  width: 70px;
  height: 22px;
  background: rgba(255, 255, 255, 0.45);
  border-left: 1px dashed rgba(0,0,0,0.1);
  border-right: 1px dashed rgba(0,0,0,0.1);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.postit-handtext {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  color: #1a1a1c;
  margin-bottom: 0.5rem;
}

.postit-footer {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #5a5a5a;
  border-top: 1px dashed rgba(0,0,0,0.15);
  padding-top: 0.4rem;
  display: flex;
  justify-content: space-between;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(7, 7, 10, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 60000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-overlay[hidden] { display: none; }
.modal-overlay.show { opacity: 1; }

.big-postit {
  background: var(--postit-bg);
  color: var(--postit-text);
  max-width: 440px;
  width: 100%;
  padding: 3rem 2.5rem 2.5rem;
  border-radius: 6px 6px 20px 6px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8), 0 0 50px rgba(255, 241, 118, 0.25);
  position: relative;
  transform: scale(0.7) rotate(6deg);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Caveat', cursive, sans-serif;
}

.modal-overlay.show .big-postit { transform: scale(1) rotate(-1deg); }

.big-postit::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  width: 120px;
  height: 30px;
  background: rgba(255, 255, 255, 0.5);
  border-left: 1px dashed rgba(0,0,0,0.1);
  border-right: 1px dashed rgba(0,0,0,0.1);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.big-postit-title {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #5a5a5a;
  margin-bottom: 1.2rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding-bottom: 0.5rem;
}

.big-postit-content {
  font-size: clamp(1.5rem, 4.6vw, 2rem);
  font-weight: 700;
  line-height: 1.35;
  color: #111;
  margin-bottom: 2.2rem;
}

.big-postit-btn {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  background: #111;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  width: 100%;
}

.big-postit-btn:hover {
  background: #2c2c2e;
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.popup-card {
  background: rgba(20, 20, 26, 0.92);
  border: 1px solid var(--neon-cyan);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 50px rgba(0, 240, 255, 0.25), 0 20px 40px rgba(0, 0, 0, 0.8);
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.show .popup-card { transform: scale(1); }

.popup-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--neon-cyan);
  margin-bottom: 0.8rem;
}

.popup-title {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: clamp(1.4rem, 5vw, 1.8rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.6rem;
}

.popup-desc {
  font-size: 0.95rem;
  color: #b9b9c6;
  line-height: 1.5;
  margin-bottom: 2rem;
}

.popup-btn {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  background: linear-gradient(90deg, var(--neon-cyan), #00a8ff);
  color: #000;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.5);
  transition: all 0.3s ease;
  width: 100%;
}

.popup-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.8);
}

.sync-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  color: #fff;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.95rem;
  text-align: center;
  margin-bottom: 0.75rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.sync-input:focus { border-color: var(--neon-cyan); }

.sync-status {
  min-height: 1.2rem;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.sync-status.ok  { color: var(--neon-lime); }
.sync-status.err { color: var(--neon-magenta); }

.modal-secondary {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.link-btn {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-btn:hover { color: #fff; }

/* Meilensteine */
.milestones-card { padding: 2.5rem 2rem; }

.milestones-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.milestones-header h2 {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
}

.milestones-header p {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.milestone-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 1.2rem 1.5rem;
  transition: all 0.4s ease;
  flex-wrap: wrap;
  gap: 1rem;
}

.milestone-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.milestone-title {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.milestone-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

.milestone-status {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  white-space: nowrap;
}

.milestone-item.latest-reached {
  border-color: rgba(57, 255, 20, 0.5);
  background: rgba(57, 255, 20, 0.05);
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.1);
}
.milestone-item.latest-reached .milestone-status {
  color: var(--neon-lime);
  border-color: rgba(57, 255, 20, 0.6);
  background: rgba(57, 255, 20, 0.12);
}

.milestone-item.reached {
  border-color: rgba(57, 255, 20, 0.25);
  background: rgba(57, 255, 20, 0.015);
  opacity: 0.65;
}
.milestone-item.reached .milestone-status {
  color: var(--neon-lime);
  border-color: rgba(57, 255, 20, 0.35);
  background: rgba(57, 255, 20, 0.06);
}

.milestone-item.active {
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.04);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.1);
}
.milestone-item.active .milestone-status {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.15);
}

/* Footer */
.stealth-triggers {
  position: relative;
  z-index: 10;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  opacity: 0.45;
  transition: opacity 0.3s ease;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: -0.5px;
  color: var(--text-dim);
}

.stealth-triggers:hover,
.stealth-triggers:focus-within { opacity: 0.95; }

.stealth-btn {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  transition: color 0.2s ease;
}

.stealth-btn:hover { color: #fff; }

.sync-trigger-btn {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 0.35rem 0.8rem;
  border-radius: 50px;
  color: var(--neon-cyan);
  transition: all 0.3s ease;
}

.sync-trigger-btn:hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

.sync-trigger-btn.active {
  color: var(--neon-lime);
  border-color: rgba(57, 255, 20, 0.4);
  background: rgba(57, 255, 20, 0.08);
}

/* Responsive */
@media (max-width: 850px) {
  .envelope-trigger {
    top: auto;
    bottom: 1.8rem;
    right: 1.2rem;
    padding: 0.7rem 1rem;
  }
  .docked-postit {
    top: auto;
    bottom: 1.8rem;
    right: 1.2rem;
    width: 170px;
    padding: 1.2rem 1rem 1rem;
  }
}

@media (max-width: 600px) {
  .tally-svg { width: 24px; height: 21px; }
  .tally-grid { gap: 0.45rem 0.65rem; }
}

@media (max-width: 550px) {
  .separator { display: none; }
  .main-clock { gap: 1.2rem; }
  .secondary-grid { grid-template-columns: 1fr; }
  .container { padding: 2.2rem 1.2rem; }
  .milestone-item { flex-direction: column; align-items: flex-start; }
  .milestone-status { align-self: flex-start; }
  .tally-header { flex-direction: column; align-items: center; }
}

/* =========================================================================
   Reduzierte Bewegung: Blitze, Dauer-Animationen und Partikel abschalten.
   Das JS liest denselben Media-Query aus und erzeugt dann keine Partikel.
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .lightning-overlay { display: none; }
  canvas { display: none; }
  .bg-glow { transition: none; }
  .container.minute-boost { transform: none; }
  .container.minute-boost .number { transform: none; }
}
