﻿body {
  margin: 0;
  font-family: sans-serif;
  background: #121212;
  color: white;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  font-size: 18px;
}

/* Toggle switch */
.switch {
  position: relative;
  width: 50px;
  height: 26px;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #444;
  border-radius: 26px;
  transition: 0.3s;
}

.slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked + .slider {
  background: #ff4081;
}

input:checked + .slider::before {
  transform: translateX(24px);
}

/* Cards */
.card-container {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 12px;
  padding: 12px;
  box-sizing: border-box;
}

.card {
  perspective: 1000px;
  height: 100%;
}

.card:first-child {
  grid-column: span 2;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s;
  transform-style: preserve-3d;
}

.card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
}

.card-front {
  background: #222;
}

.card-back {
  background: #223;
  transform: rotateY(180deg);
  padding: 10px;
  text-align: center;
}

/* Confetti */
.confetti {
  position: fixed;
  top: -10px;
  width: 8px;
  height: 8px;
  background: red;
  opacity: 0.8;
  animation: fall linear forwards;
}

@keyframes fall {
  to {
    transform: translateY(110vh) rotate(360deg);
  }
}