* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #6C5CE7;
  --secondary: #FD79A8;
  --accent: #00CEC9;
  --gold: #FDCB6E;
  --dark: #2D3436;
  --light: #F8F9FE;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--light);
  color: var(--dark);
  line-height: 1.6;
}

h1, h2, h3 { font-family: 'Fredoka', sans-serif; }

.hidden { display: none !important; }

/* NAVBAR */
.navbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 2rem;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: white; flex-wrap: wrap; gap: 1rem;
  position: sticky; top: 0; z-index: 100;
}
.logo { font-size: 1.4rem; font-weight: 700; }
.logo span { color: var(--gold); }
.navbar nav a {
  color: white; text-decoration: none; margin: 0 0.8rem; font-weight: 500;
}
.navbar nav a:hover { color: var(--gold); }

#userInfo { display: flex; align-items: center; gap: 0.8rem; color: white; font-weight: 600; }

/* BUTTONS */
.btn {
  border: none; border-radius: 30px; padding: 0.6rem 1.4rem;
  font-weight: 600; cursor: pointer; transition: transform 0.15s ease;
  font-family: 'Poppins', sans-serif;
}
.btn:hover { transform: scale(1.05); }
.btn-primary { background: var(--gold); color: var(--dark); }
.btn-small { background: white; color: var(--primary); padding: 0.4rem 1rem; }
.btn-game { background: var(--accent); color: white; margin-top: 1rem; }

/* HERO */
.hero {
  text-align: center; padding: 4rem 1.5rem 3rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
}
.hero h1 { font-size: 2.4rem; margin-bottom: 0.6rem; }
.countdown-box { margin-top: 2rem; }
.countdown {
  font-size: 2.2rem; font-weight: 700; background: rgba(255,255,255,0.15);
  display: inline-block; padding: 1rem 2rem; border-radius: 20px; margin-top: 0.6rem;
}

/* SECTIONS */
.section { padding: 3rem 1.5rem; max-width: 1100px; margin: 0 auto; }
.section h2 { text-align: center; font-size: 2rem; margin-bottom: 0.5rem; color: var(--primary); }
.section-sub { text-align: center; color: #666; margin-bottom: 1.5rem; }

/* GALERIE */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.gallery-grid img {
  width: 100%; height: 200px; object-fit: cover; border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* GAMES */
.games-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.game-card {
  background: white; border-radius: 20px; padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08); text-align: center;
}
.game-card.wide { grid-column: 1 / -1; }
.game-display {
  font-size: 2rem; font-weight: 700; margin: 1rem 0; color: var(--secondary);
}
.reaction-box {
  margin-top: 1rem; height: 140px; border-radius: 16px;
  background: #d63031; color: white; display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 600; cursor: pointer; user-select: none;
}
.reaction-box.ready { background: #fdcb6e; color: var(--dark); }
.reaction-box.go { background: #00b894; }

.ttt-board {
  display: grid; grid-template-columns: repeat(3, 90px); gap: 8px;
  justify-content: center; margin: 1rem auto;
}
.ttt-cell {
  height: 90px; background: var(--light); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; font-weight: 700; cursor: pointer; color: var(--primary);
}

.memory-board {
  display: grid; grid-template-columns: repeat(4, 70px); gap: 8px;
  justify-content: center; margin: 1rem auto;
}
.memory-card {
  height: 70px; border-radius: 10px; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; cursor: pointer; color: transparent; transition: 0.2s;
}
.memory-card.flipped, .memory-card.matched { background: var(--gold); color: var(--dark); }
.memory-card.matched { background: var(--accent); }

/* HIGHSCORES */
.highscore-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem;
}
.highscore-card {
  background: white; border-radius: 20px; padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.highscore-card h3 { color: var(--secondary); margin-bottom: 0.8rem; }
.highscore-card ol { padding-left: 1.2rem; }
.highscore-card li { margin-bottom: 0.3rem; }

/* GÄSTEBUCH */
.guestbook-form {
  display: flex; flex-direction: column; gap: 0.8rem; max-width: 500px; margin: 0 auto 2rem;
}
.guestbook-form input, .guestbook-form textarea {
  padding: 0.8rem; border-radius: 12px; border: 1px solid #ddd; font-family: inherit;
}
.guestbook-list { display: flex; flex-direction: column; gap: 0.8rem; max-width: 600px; margin: 0 auto; }
.guestbook-entry {
  background: white; padding: 1rem; border-radius: 14px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06); border-left: 4px solid var(--accent);
}
.guestbook-entry strong { color: var(--primary); }

footer { text-align: center; padding: 2rem; color: #999; }

/* MODAL */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center; z-index: 200;
}
.modal-content {
  background: white; padding: 2rem; border-radius: 20px; width: 90%; max-width: 380px; position: relative;
}
.close { position: absolute; top: 12px; right: 18px; cursor: pointer; font-size: 1.4rem; }
.tabs { display: flex; margin-bottom: 1rem; gap: 0.5rem; }
.tab-btn {
  flex: 1; padding: 0.6rem; border: none; background: var(--light); border-radius: 10px; cursor: pointer; font-weight: 600;
}
.tab-btn.active { background: var(--primary); color: white; }
.tab-content { display: none; flex-direction: column; gap: 0.7rem; }
.tab-content.active { display: flex; }
.tab-content input { padding: 0.7rem; border-radius: 10px; border: 1px solid #ddd; }
.error { color: #d63031; font-size: 0.85rem; min-height: 1.2rem; }

@media (max-width: 600px) {
  .navbar { flex-direction: column; }
  .hero h1 { font-size: 1.7rem; }
}