:root {
  --bg: #0f1224;
  --panel: #1a1f3a;
  --panel-2: #242b52;
  --text: #eef2ff;
  --muted: #b7bde6;
  --accent: #7c8bff;
  --good: #2fd6a1;
  --girls: #ff7acc;
  --boys: #4dc7ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #1d2450 0%, var(--bg) 55%);
}

.home {
  width: min(1100px, 95%);
  margin: 2rem auto;
}

.hero {
  text-align: center;
  margin-bottom: 1.5rem;
}

.eyebrow {
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

h1 {
  margin: 0.2rem 0 0.6rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.hero p {
  margin: 0;
  color: var(--muted);
}

.game-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 1rem 0 1.7rem;
}

.chip {
  display: inline-block;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  color: #fff;
  border: 1px solid #4b58a7;
  background: #263172;
}

.chip-girls {
  border-color: #9c336f;
  background: #5c2457;
}

.chip-boys {
  border-color: #256d95;
  background: #174968;
}

.category-section {
  margin-bottom: 1.7rem;
}

.category-section h2 {
  margin: 0 0 0.85rem;
}

.games-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.game-card {
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid #343f77;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.game-card-girls {
  border-color: #9c336f;
}

.game-card-boys {
  border-color: #2f6789;
}

.game-card h2,
.game-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}

.game-card p {
  color: var(--muted);
}

.play-link,
.back-link {
  display: inline-block;
  text-decoration: none;
  color: #fff;
  margin-top: 0.35rem;
  font-weight: 700;
}

.back-link {
  margin-bottom: 1rem;
}

button,
input {
  border-radius: 10px;
  border: 1px solid #4b58a7;
  background: #111633;
  color: var(--text);
  padding: 0.55rem 0.75rem;
}

button {
  cursor: pointer;
  background: linear-gradient(135deg, #5e6fff, var(--accent));
  border: none;
  font-weight: 600;
}

button:hover {
  filter: brightness(1.08);
}

.rps-controls,
.guess-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.8rem 0;
}

.result {
  margin: 0.3rem 0 0;
  color: #d8ddff;
  min-height: 1.5rem;
}

.memory-board {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.card {
  height: 56px;
  border-radius: 10px;
  border: 1px solid #4550a0;
  background: #0d1330;
  font-size: 1.5rem;
}

.card.revealed,
.card.matched {
  background: #1e2a6b;
}

.card.matched {
  border-color: var(--good);
}

.dress-preview {
  margin-top: 0.8rem;
  font-size: 3rem;
}

.reaction-btn.waiting {
  background: #996a1f;
}

.reaction-btn.ready {
  background: #1f9d58;
}

.arena-wrap {
  margin-top: 0.8rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #2f6789;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.35);
}

#arenaCanvas {
  width: 100%;
  display: block;
  background: #05070f;
  cursor: crosshair;
}

.stack-scoreboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem;
  margin: 0.9rem 0;
}

.stack-scoreboard p {
  margin: 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid #3d4788;
  border-radius: 10px;
  background: #10183b;
}

.stack-question h2 {
  font-size: 1.1rem;
  margin: 0.2rem 0 0.65rem;
}

.stack-options {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.stack-option-btn {
  text-align: left;
}

#stackRestartBtn {
  margin-top: 0.7rem;
}

.chip-guide {
  border-color: #5b4ca6;
  background: #322a68;
}

.game-card-guide {
  border-color: #5b4ca6;
}

.guide-page {
  display: grid;
  gap: 1rem;
}

.guide-hero {
  margin-bottom: 0.2rem;
}

.guide-card {
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid #3e4b8f;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.guide-card h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

.guide-card p,
.guide-card li {
  color: var(--muted);
}

.guide-tip {
  border-left: 3px solid var(--accent);
  padding-left: 0.75rem;
}

.host-card {
  display: grid;
  grid-template-columns: 1.3fr minmax(180px, 260px);
  gap: 1rem;
  align-items: center;
}

.host-avatar {
  width: 100%;
  border-radius: 14px;
  border: 1px solid #5b4ca6;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.3);
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.mood-grid {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.mood-card {
  margin: 0;
  border: 1px solid #4857a6;
  border-radius: 12px;
  overflow: hidden;
  background: #171e42;
}

.mood-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.mood-card figcaption {
  padding: 0.55rem 0.65rem;
  color: var(--text);
  font-size: 0.92rem;
}

.float-animation {
  animation: floatY 4.5s ease-in-out infinite;
}

.pulse-animation {
  animation: pulseGlow 2.6s ease-in-out infinite;
}

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

@keyframes pulseGlow {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(124, 139, 255, 0);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(124, 139, 255, 0.3);
  }
}

@media (max-width: 760px) {
  .host-card {
    grid-template-columns: 1fr;
  }
}
