:root {
  --bg: #0f1218;
  --card: #1a1f29;
  --card-soft: #232a37;
  --text: #eef3f8;
  --muted: #b8c0cd;
  --accent: #ff4655;
  --accent-strong: #ff2f41;
  --green: #4ec981;
  --red: #ff7f88;
  --border: #2f3848;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(circle at top, #1b2534 0%, var(--bg) 48%);
  color: var(--text);
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  background: linear-gradient(120deg, #121725 15%, #1f2838 80%);
  border-bottom: 1px solid var(--border);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(70deg, transparent 20%, rgba(255, 70, 85, 0.15) 100%);
}

.hero-content {
  position: relative;
  padding: 3.4rem 0 2.6rem;
}

.tag {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12rem;
  margin-bottom: 0.3rem;
  font-weight: 700;
}

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

.hero p {
  color: var(--muted);
  max-width: 65ch;
}

.main-nav {
  display: flex;
  gap: 0.7rem;
  padding: 1rem 0;
}

.tab-btn {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.7rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

.tab-btn.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

h2,
h3 {
  margin-top: 1.3rem;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 0.8rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
}

input,
textarea,
select,
button {
  border-radius: 0.45rem;
  border: 1px solid var(--border);
  font: inherit;
}

input,
textarea,
select {
  background: #111620;
  color: var(--text);
  padding: 0.55rem 0.65rem;
}

button {
  background: var(--accent);
  color: white;
  padding: 0.6rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: var(--accent-strong);
}

.secondary {
  background: transparent;
  color: var(--text);
}

.secondary:hover {
  background: var(--card-soft);
}

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

.game-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.9rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  overflow: hidden;
}

.game-cover {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  background: #0b0f16;
}

.game-content {
  padding: 0.85rem 0.9rem 0.9rem 0;
}

.title-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
}

.game-title {
  margin: 0;
}

.score-badge {
  background: #111620;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-weight: 700;
  white-space: nowrap;
}

.meta,
.summary {
  color: var(--muted);
}

.meta {
  font-size: 0.9rem;
  margin: 0.45rem 0;
}

.summary {
  margin: 0 0 0.7rem;
}

.arguments {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.arguments h4 {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}

.arguments ul {
  margin: 0;
  padding-left: 1.05rem;
  font-size: 0.87rem;
}

.pros-list li {
  color: var(--green);
}

.cons-list li {
  color: var(--red);
}

.hidden {
  display: none;
}

.admin-login-form,
.game-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  padding: 1rem;
  margin: 0.8rem 0;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.7rem;
}

.actions {
  display: flex;
  gap: 0.6rem;
}

.admin-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  padding: 0.8rem;
  margin-bottom: 0.6rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#results-count {
  color: var(--muted);
}

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

  .game-cover {
    max-height: 220px;
  }

  .game-content {
    padding: 0 0.9rem 0.9rem;
  }
}
