body {
  margin: 0;
  padding: 0;
  font-family: "Trebuchet MS", "Verdana", "Tahoma", sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(0, 200, 255, 0.05), transparent 40%),
    radial-gradient(circle at 80% 10%, rgba(255, 0, 255, 0.08), transparent 45%),
    linear-gradient(135deg, #031933 0%, #0c2042 45%, #041126 100%);
  color: #fff;
  min-height: 100vh;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px,
      transparent 3px),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.06), transparent 55%);
  pointer-events: none;
  mix-blend-mode: screen;
}

#vhs-noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.05));
  opacity: 0.2;
  animation: noise 0.8s steps(2) infinite;
  mix-blend-mode: screen;
  z-index: 1;
}

#aurora-layer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  /* Polarlichter über den ganzen Bildschirm */
  background:
    radial-gradient(ellipse at 10% 20%, rgba(255, 0, 255, 0.4), transparent 40%),
    radial-gradient(ellipse at 90% 15%, rgba(0, 255, 255, 0.4), transparent 40%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 255, 0, 0.35), transparent 50%),
    radial-gradient(ellipse at 15% 80%, rgba(255, 0, 128, 0.35), transparent 45%),
    radial-gradient(ellipse at 85% 75%, rgba(128, 0, 255, 0.35), transparent 45%),
    radial-gradient(ellipse at 30% 60%, rgba(0, 255, 128, 0.3), transparent 50%),
    radial-gradient(ellipse at 70% 40%, rgba(255, 128, 0, 0.3), transparent 45%),
    radial-gradient(ellipse at 50% 10%, rgba(128, 255, 255, 0.3), transparent 40%);
  background-size: 200% 200%;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 1.2s ease;
}

/* ... other styles ... */

.reindeer-fly {
  position: fixed;
  font-size: 36px;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.9));
  z-index: 4;
  animation: fly linear forwards;
  pointer-events: none;
  --reindeer-facing: -1;
}

.reindeer-fly.rtl {
  animation-name: fly-rtl;
  --reindeer-facing: 1;
}

@keyframes title-pulse {
  0% {
    text-shadow: 0 0 10px #ff00ff, 0 0 20px #00ffff;
    transform: scale(1);
  }

  50% {
    text-shadow: 0 0 20px #ffff00, 0 0 40px #ff00ff, 0 0 60px #00ffff;
    transform: scale(1.05);
  }

  100% {
    text-shadow: 0 0 10px #ff00ff, 0 0 20px #00ffff;
    transform: scale(1);
  }
}

body.title-pulse-on h1 {
  animation: title-pulse 1.5s ease-in-out infinite;
  /* Schnellerer Puls */
}

#unlock-flash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 16;
  background: radial-gradient(circle at 50% 50%, rgba(255, 253, 106, 0.25), transparent 55%);
}

#unlock-flash.show {
  opacity: 1;
}

#unlock-banner {
  padding: 12px 18px;
  border: 2px solid #fffd6a;
  background: linear-gradient(135deg, rgba(255, 92, 244, 0.7), rgba(90, 240, 255, 0.7));
  color: #0a1022;
  font-weight: 800;
  letter-spacing: 0.8px;
  box-shadow: 0 0 30px rgba(255, 253, 106, 0.55), 0 0 60px rgba(90, 240, 255, 0.45);
  text-transform: uppercase;
}

#hud {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 14px 0 6px;
}

#progress-wrap,
#hud-meta {
  border: 1px solid rgba(115, 225, 255, 0.35);
  background: linear-gradient(135deg, rgba(8, 24, 52, 0.9), rgba(5, 12, 28, 0.9));
  padding: 10px;
  box-shadow: 0 0 12px rgba(115, 225, 255, 0.2);
}

.hud-label {
  font-size: 12px;
  color: #8ad9ff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

#progress-bar {
  width: 100%;
  height: 12px;
  background: #0a1426;
  border: 1px solid #2ea7ff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 8px rgba(115, 225, 255, 0.35);
}

#progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #5af0ff, #ff5cf4);
  box-shadow: 0 0 10px rgba(255, 92, 244, 0.5);
  transition: width 0.6s ease;
}

#progress-text {
  margin-top: 6px;
  font-size: 13px;
  color: #cceeff;
}

#achievements {
  margin: 10px 0 2px;
  padding: 12px;
  border: 1px solid rgba(115, 225, 255, 0.35);
  background: linear-gradient(135deg, rgba(6, 18, 40, 0.9), rgba(6, 10, 24, 0.9));
  box-shadow: 0 0 12px rgba(115, 225, 255, 0.2);
}

.achievements-head {
  font-size: 12px;
  color: #8ad9ff;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

#achievements-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.achv {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(90, 240, 255, 0.3);
  background: rgba(8, 20, 46, 0.8);
  box-shadow: inset 0 0 10px rgba(90, 240, 255, 0.1);
  border-radius: 4px;
  opacity: 0.7;
}

.achv.on {
  border-color: rgba(255, 253, 106, 0.7);
  box-shadow: 0 0 12px rgba(255, 253, 106, 0.35);
  opacity: 1;
}

.achv-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5cf4;
  box-shadow: 0 0 10px #ff5cf4;
}

.achv.on .achv-dot {
  background: #4cffb5;
  box-shadow: 0 0 10px #4cffb5;
}

.achv-label {
  flex: 1;
  font-size: 13px;
}

.achv-day {
  font-size: 12px;
  color: #8ad9ff;
  white-space: nowrap;
}

#chor-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.chor-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(115, 225, 255, 0.35);
  background: rgba(8, 20, 46, 0.6);
}

.chor-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chor-name {
  font-weight: 700;
  color: #cceeff;
}

.chor-day {
  font-size: 12px;
  color: #8ad9ff;
}

#chor-bottom-list {
  margin-top: 16px;
  padding-top: 8px;
}

#chor-bottom-list h3 {
  margin: 0 0 8px 0;
}

.chor-items-wrap {
  display: grid;
  gap: 8px;
}

#server-time {
  font-family: "Courier New", monospace;
  color: #fffd6a;
  font-size: 14px;
}

#wrapper {
  width: 900px;
  max-width: 94vw;
  margin: 40px auto 60px;
  padding: 26px 30px 40px;
  background: linear-gradient(135deg, rgba(9, 22, 49, 0.85), rgba(7, 12, 28, 0.85));
  border: 2px solid #73e1ff;
  box-shadow: 0 0 25px rgba(115, 225, 255, 0.5), 0 0 80px rgba(255, 0, 255, 0.25);
  backdrop-filter: blur(3px);
  position: relative;
}

h1 {
  text-align: center;
  text-shadow: 0 0 10px #00e5ff, 0 0 22px #ff21ff;
  margin-bottom: 25px;
  letter-spacing: 1px;
}

h2 {
  margin-top: 0;
  text-shadow: 0 0 5px #ffcc00;
}

h3 {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #9ff1ff;
  text-shadow: 0 0 8px #00c8ff;
}

#login-box,
#calendar,
#challenge-box {
  margin-top: 20px;
  padding: 15px;
  border: 1px solid #5cc0ff;
  background: linear-gradient(135deg, #0f1f3f, #060b1a);
  box-shadow: inset 0 0 12px rgba(0, 255, 255, 0.15);
}

.hidden {
  display: none !important;
}

input[type="password"] {
  width: 60%;
  padding: 6px;
  margin-right: 10px;
  border: 1px solid #5cc0ff;
  background: #020617;
  color: #fff;
}

button {
  padding: 6px 12px;
  border: 1px solid #ffcc00;
  background: linear-gradient(90deg, #303854, #1b102f);
  color: #ffd547;
  cursor: pointer;
  font-weight: bold;
  text-transform: uppercase;
  box-shadow: 0 0 10px rgba(255, 213, 71, 0.6);
}

button:hover {
  background: #ffcc00;
  color: #0f0f23;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.error {
  color: #ff6666;
}

#days-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.day-tile {
  border: 1px solid #5cc0ff;
  text-align: center;
  padding: 10px 0;
  background: #071024;
  cursor: pointer;
  font-size: 16px;
  box-shadow: 0 0 5px rgba(0, 200, 255, 0.4);
}

.day-tile.open {
  background: #0b3a16;
  border-color: #4cff4c;
  box-shadow: 0 0 8px rgba(76, 255, 76, 0.7);
}

.day-tile.locked {
  background: #1a1a1a;
  border-color: #555;
  color: #777;
  cursor: default;
  box-shadow: none;
}

.hint {
  font-size: 12px;
  color: #ccc;
  margin-top: 10px;
}

#challenge-box {
  margin-top: 30px;
}

/* Extras */
#extras {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 28px;
  margin-bottom: 24px;
}

.panel {
  border: 1px solid #73e1ff;
  background: radial-gradient(circle at 30% 20%, rgba(32, 162, 255, 0.1), transparent 50%),
    linear-gradient(135deg, #0f1f36, #0a0f25);
  padding: 14px;
  box-shadow: 0 0 15px rgba(115, 225, 255, 0.25);
  min-height: 320px;
  /* Mehr Platz für Inhalte */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.badge {
  font-family: "Courier New", monospace;
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid #fffd6a;
  color: #fffd6a;
  background: rgba(255, 253, 106, 0.08);
  box-shadow: 0 0 8px rgba(255, 253, 106, 0.4);
  border-radius: 2px;
  white-space: nowrap;
}

.badge.on {
  border-color: #4cffb5;
  color: #c8fffa;
  box-shadow: 0 0 10px rgba(76, 255, 181, 0.4);
  background: rgba(76, 255, 181, 0.1);
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.panel.hidden {
  display: none;
}

#snake-canvas {
  width: 100%;
  height: 200px;
  image-rendering: pixelated;
  background: #020710;
  border: 1px solid #5cc0ff;
  box-shadow: inset 0 0 12px rgba(0, 255, 255, 0.12);
  touch-action: none;
}

#pong-canvas {
  width: 100%;
  height: 160px;
  background: #050912;
  border: 1px solid #ff8df5;
  box-shadow: inset 0 0 10px rgba(255, 141, 245, 0.35);
  touch-action: none;
}

.touch-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.touch-dpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 40px);
  gap: 6px;
  width: 100%;
  max-width: 260px;
}

.touch-dpad .touch-btn {
  padding: 6px;
}

.touch-dpad .wide {
  grid-column: 1 / 4;
}

.touch-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.touch-btn {
  flex: 1;
  min-width: 90px;
  padding: 8px 10px;
  text-align: center;
  border: 1px solid #ffcc00;
  color: #ffd547;
  background: linear-gradient(90deg, #303854, #1b102f);
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.2);
  cursor: pointer;
}

.touch-btn:active {
  transform: scale(0.98);
  box-shadow: 0 0 14px rgba(255, 204, 0, 0.35);
}

#snow-layer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 3;
}

#star-layer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 2;
}

#ornament-layer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow: hidden;
}

.ornament-ball {
  position: absolute;
  top: -40px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.9), transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.25), transparent 45%),
    linear-gradient(135deg, rgba(255, 92, 244, 0.8), rgba(90, 240, 255, 0.8));
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.25);
  animation-name: ornament-fall;
  animation-timing-function: linear;
  animation-iteration-count: 1;
}

@keyframes ornament-fall {
  from {
    transform: translate3d(0, -60px, 0) rotate(0deg);
    opacity: 0.9;
  }

  to {
    transform: translate3d(0, 120vh, 0) rotate(80deg);
    opacity: 0;
  }
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #c4f1ff;
  border-radius: 50%;
  opacity: 0.9;
  animation: star-twinkle 1.6s infinite alternate;
}

.shooting {
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), transparent);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
  animation: shooting 1s linear forwards;
}

#reindeer {
  position: fixed;
  top: 12%;
  left: -15%;
  font-size: 36px;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
  z-index: 4;
  animation: fly 12s linear infinite;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
}

.modal-content {
  position: relative;
  width: min(90vw, 420px);
  background: linear-gradient(135deg, #0f1f3f, #060b1a);
  border: 1px solid #73e1ff;
  box-shadow: 0 0 20px rgba(115, 225, 255, 0.4);
  padding: 18px 18px 22px;
  z-index: 1;
}

.modal-close {
  position: absolute;
  right: 8px;
  top: 8px;
  background: transparent;
  border: 1px solid #ffcc00;
  color: #ffcc00;
  padding: 2px 8px;
}

.modal-content p {
  margin-top: 10px;
  line-height: 1.4;
  white-space: pre-line;
}

.snowflake {
  position: fixed;
  top: -10px;
  background: #e7f7ff;
  border-radius: 50%;
  opacity: 0.8;
  animation-name: snow-fall;
  animation-timing-function: linear;
}

.confetti {
  position: fixed;
  top: -8px;
  width: 8px;
  height: 10px;
  opacity: 0.9;
  transform: rotate(12deg);
  animation: confetti-fall 1.3s ease-out forwards;
  z-index: 15;
}

.confetti:nth-child(3n) {
  border-radius: 50%;
}

.confetti:nth-child(5n) {
  transform: rotate(-18deg);
}

@keyframes snow-fall {
  0% {
    transform: translate3d(0, -10px, 0);
    opacity: 0.8;
  }

  100% {
    transform: translate3d(0, 110vh, 0);
    opacity: 0;
  }
}

@keyframes blink {
  from {
    opacity: 0.6;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes blink-bright {
  from {
    opacity: 1;
    transform: scale(0.95);
    filter: brightness(1.2);
  }

  to {
    opacity: 1;
    transform: scale(1.05);
    filter: brightness(1.5);
  }
}

@keyframes star-twinkle {
  from {
    opacity: 0.5;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes shooting {
  from {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }

  to {
    transform: translate3d(-140px, 50px, 0);
    opacity: 0;
  }
}

@keyframes confetti-fall {
  0% {
    transform: translate3d(0, -20px, 0) rotate(-6deg);
    opacity: 1;
  }

  100% {
    transform: translate3d(0, 140vh, 0) rotate(42deg);
    opacity: 0;
  }
}

@keyframes fly {
  0% {
    left: -20%;
    transform: translateY(0) scale(1) scaleX(var(--reindeer-facing, -1));
  }

  50% {
    transform: translateY(-8px) scale(1.05) scaleX(var(--reindeer-facing, -1));
  }

  100% {
    left: 120%;
    transform: translateY(0) scale(1) scaleX(var(--reindeer-facing, -1));
  }
}

@keyframes fly-rtl {
  0% {
    left: 120%;
    transform: translateY(0) scale(1) scaleX(var(--reindeer-facing, -1));
  }

  50% {
    transform: translateY(-8px) scale(1.05) scaleX(var(--reindeer-facing, -1));
  }

  100% {
    left: -20%;
    transform: translateY(0) scale(1) scaleX(var(--reindeer-facing, -1));
  }
}

@keyframes noise {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(1px, -1px, 0);
  }
}

@keyframes aurora-shift {
  0% {
    filter: hue-rotate(0deg);
  }

  100% {
    filter: hue-rotate(30deg);
  }
}

@keyframes title-pulse {
  0% {
    text-shadow: 0 0 8px #ff5cf4, 0 0 18px #5af0ff;
  }

  50% {
    text-shadow: 0 0 16px #fffd6a, 0 0 28px #5af0ff, 0 0 42px #ff5cf4;
  }

  100% {
    text-shadow: 0 0 8px #ff5cf4, 0 0 18px #5af0ff;
  }
}

body.aurora-on #aurora-layer {
  opacity: 0.55;
  animation: aurora-shift 8s ease-in-out infinite alternate;
}

body.title-pulse-on h1 {
  animation: title-pulse 2.8s ease-in-out infinite;
}

/* Mobile tweaks */
@media (max-width: 780px) {
  #wrapper {
    width: 96vw;
    padding: 18px 16px 26px;
  }

  #days-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  button {
    width: 100%;
    max-width: 240px;
  }

  .panel {
    min-height: 0;
  }

  #hud {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  #achievements-list {
    grid-template-columns: 1fr;
  }

  #hud {
    grid-template-columns: 1fr;
  }

  #unlock-banner {
    text-align: center;
  }

  #hud {
    font-size: 12px;
  }

  h1 {
    font-size: 22px;
    line-height: 1.3;
  }

  #days-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  #snake-canvas {
    height: 200px;
  }

  #pong-canvas {
    height: 160px;
  }

  .panel-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .touch-controls {
    width: 100%;
    justify-content: center;
  }

  .touch-dpad {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 60px);
  }

  .touch-dpad .touch-btn,
  .touch-col .touch-btn {
    font-size: 18px;
    padding: 12px;
    min-width: auto;
  }
}
