:root {
  color-scheme: dark;
  --bg: #0f1020;
  --accent: #ffd166;
  --accent2: #ef476f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(circle at 20% 20%, #1d1f3d, var(--bg) 60%);
  color: #f5f5ff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.5rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.subtitle { opacity: 0.8; margin-top: 0.25rem; }

.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0 1rem;
}

.unit {
  display: flex;
  flex-direction: column;
  min-width: 5.5rem;
  padding: 1rem 0.75rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 30px rgba(255, 209, 102, 0.12);
}

.value {
  font-size: clamp(2.2rem, 9vw, 4rem);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.label {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.7;
}

.sep {
  font-size: clamp(2rem, 8vw, 3.5rem);
  line-height: 1.4;
  opacity: 0.4;
}

.clock { opacity: 0.65; font-variant-numeric: tabular-nums; }

/* Fest-modus kl. 10:30 */
.party {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  padding: 2rem 1rem 4rem;
  background: linear-gradient(160deg, #2b0a3d, #0f1020 70%);
  text-align: center;
}

.massasje {
  margin: 1rem 0 0.5rem;
  font-size: clamp(3rem, 14vw, 9rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: linear-gradient(90deg, var(--accent), var(--accent2), #06d6a0, var(--accent));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 3s linear infinite, wobble 1.2s ease-in-out infinite;
}

.party-sub { opacity: 0.8; margin-bottom: 2rem; }

.memes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  max-width: 1100px;
  margin: 0 auto;
}

.meme {
  padding: 0.9rem 0.5rem;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: pop 0.5s backwards, float 3s ease-in-out infinite;
}

.meme .emoji { display: block; font-size: 2rem; }
.meme .text { display: block; margin-top: 0.35rem; font-size: 0.8rem; opacity: 0.85; }
.meme .num { display: block; margin-top: 0.3rem; font-size: 0.65rem; opacity: 0.5; }

/* Admin-side */
.admin {
  width: min(460px, 100%);
  padding: 2rem 1.5rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 1.5rem;
  text-align: left;
}

.admin-form label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
}

.admin-form input[type="password"],
.admin-form input[type="number"] {
  margin-bottom: 0.9rem;
  padding: 0.7rem 0.8rem;
  font: inherit;
  color: inherit;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.6rem;
}

.admin-actions { display: flex; gap: 0.6rem; margin: 0.3rem 0 0.9rem; }

.btn {
  flex: 1;
  padding: 0.8rem 1rem;
  font: inherit;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
  border-radius: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.16); }
.btn:disabled { opacity: 0.5; cursor: progress; }

.btn-go {
  color: #1a1206;
  background: var(--accent);
  border-color: transparent;
}

.btn-go:hover:not(:disabled) { background: #ffe09a; }

.remember {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-size: 0.8rem !important;
}

.result {
  margin: 1.2rem 0 0;
  padding: 0.75rem;
  font-size: 0.9rem;
  border-radius: 0.6rem;
  background: rgba(0, 0, 0, 0.3);
  text-align: left;
}

.result.ok { box-shadow: inset 0 0 0 1px rgba(6, 214, 160, 0.5); }
.result.bad { box-shadow: inset 0 0 0 1px var(--accent2); }

.hint { font-size: 0.8rem; opacity: 0.6; }
.hint a { color: var(--accent); }

@keyframes shimmer { to { background-position: 300% 0; } }
@keyframes wobble { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } }
@keyframes pop { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
}
