:root {
  --bg: #7c0a12;
  --surface: #8b1019;
  --surface-alt: #a11420;
  --text: #ffe8a3;
  --muted: #f3d98a;
  --accent: #ffd447;
  --accent-2: #ffc107;
  --good: #fff2be;
  --warning: #ffe08a;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(160deg, #69070f, #840d17 45%, #a91522);
  color: var(--text);
  min-height: 100vh;
}

a {
  color: var(--accent);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(97, 7, 14, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #f2cd60;
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, #ffd447, #ffefad, #ffbf00, #ffd447);
  box-shadow: 0 0 0 3px #f5d477;
}

.brand h1 {
  margin: 0;
  font-size: 1.1rem;
}

.brand p {
  margin: 0.1rem 0 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.nav a {
  text-decoration: none;
  color: var(--text);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.nav a:hover,
.nav a.active {
  border-color: #f6d97b;
  background: #b11a29;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.hero {
  background: linear-gradient(135deg, rgba(147, 17, 30, 0.8), rgba(180, 45, 44, 0.75));
  border: 1px solid #f2cd60;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.hero h2 {
  margin-top: 0;
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
}

.hero p {
  max-width: 750px;
  color: #fff4cb;
  line-height: 1.6;
}

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

.card {
  background: rgba(118, 10, 20, 0.9);
  border: 1px solid #f2cd60;
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.card h3,
.section h3 {
  margin-top: 0;
}

.section {
  margin-top: 1.5rem;
  background: rgba(109, 10, 20, 0.9);
  border: 1px solid #efc75a;
  border-radius: 16px;
  padding: 1.3rem;
}

.logo-placeholder {
  margin-top: 0.7rem;
  border: 2px dashed #f4d884;
  border-radius: 14px;
  min-height: 170px;
  display: grid;
  place-items: center;
  color: #ffeeb2;
  text-align: center;
  padding: 1rem;
}

.location-list,
.values-list {
  padding-left: 1.15rem;
  line-height: 1.55;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.badge {
  font-size: 0.85rem;
  color: #5f090f;
  background: linear-gradient(130deg, #ffd447, #ffefad);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-weight: 700;
}

.badge.pride {
  background: linear-gradient(130deg, #ffdf6e, #fff0b6, #ffc928);
}

.game-board {
  --tile-size: min(7.5vw, 34px);
  display: grid;
  gap: 2px;
  justify-content: start;
  margin-top: 1rem;
  max-width: 100%;
  overflow: auto;
  padding-bottom: 0.5rem;
}

.tile {
  width: var(--tile-size);
  height: var(--tile-size);
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  background: #c33a35;
  color: #fff4cb;
}

.tile.wall {
  background: #3f0006;
}

.tile.fog {
  background: #6a0c14;
  color: transparent;
}

.tile.start {
  background: #905905;
}

.tile.goal {
  background: #ba8402;
}

.tile.player {
  outline: 2px solid #fff6d1;
}

.reaction-tile.active {
  transform: translateY(-1px);
}

.reaction-tile.tile-rights {
  background: #8f6810;
}

.reaction-tile.tile-support {
  background: #7a3f11;
}

.reaction-tile.tile-harm {
  background: #3f0006;
}

.game-status {
  margin-top: 0.8rem;
  font-weight: 600;
  color: #ffe8a3;
}

.game-status.status-good {
  color: #fff2be;
}

.game-status.status-warn {
  color: #ffd98f;
}

.touch-controls {
  margin-top: 1rem;
  display: grid;
  gap: 0.5rem;
  justify-content: start;
}

.touch-row {
  display: flex;
  gap: 0.5rem;
}

.touch-controls button {
  border: 1px solid #f5d477;
  background: #9f1320;
  color: #ffefad;
  border-radius: 10px;
  padding: 0.5rem 0.9rem;
  font-weight: 700;
}

footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #f2cd60;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 720px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    width: 100%;
  }

  .game-board {
    --tile-size: min(9vw, 30px);
  }
}
