* {
  box-sizing: border-box;
}

:root {
  --bg: #09090d;
  --bg-soft: #101116;
  --panel: #171820;
  --panel-strong: #20212a;
  --line: #343642;
  --line-soft: #252732;
  --text: #f4f4f6;
  --muted: #c8c8d0;
  --gold: #f5c542;
  --gold-dark: #b98514;
  --red: #d91f2f;
  --red-dark: #8d121c;
  --teal: #35b8a6;
  --blue: #6ea8ff;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.34);
}

html {
  background: var(--bg);
}

body {
  background:
    linear-gradient(180deg, rgba(217, 31, 47, 0.16), rgba(9, 9, 13, 0) 280px),
    linear-gradient(90deg, rgba(245, 197, 66, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 54px 54px, 54px 54px, auto;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
  margin: 0;
  min-height: 100vh;
  text-align: center;
}

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

a:hover,
a:focus-visible {
  color: #ffe58a;
}

.nav {
  align-items: center;
  backdrop-filter: blur(14px);
  background: rgba(12, 12, 17, 0.9);
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
  padding: 10px clamp(10px, 2vw, 18px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav a {
  align-items: center;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 700;
  justify-content: center;
  min-height: 36px;
  padding: 6px 10px;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav a:hover,
.nav a:focus-visible {
  background: rgba(245, 197, 66, 0.14);
  border-color: var(--gold);
  color: #fff6ce;
  transform: translateY(-1px);
}

body[data-page="home"] .nav a[href="index.html"],
body[data-page="join"] .nav a[href="join.html"],
body[data-page="gallery"] .nav a[href="gallery.html"],
body[data-page="games"] .nav a[href="games.html"],
body[data-page="events"] .nav a[href="events.html"],
body[data-page="utilities"] .nav a[href="utilities.html"],
body[data-page="player-aids"] .nav a[href="player-aids.html"],
body[data-page="donate"] .nav a[href="donate.html"],
body[data-page="supporters"] .nav a[href="supporters.html"],
body[data-page="contact"] .nav a[href="contact.html"] {
  background: linear-gradient(180deg, #ffd45a, var(--gold));
  border-color: #ffe38a;
  color: #16120a;
}

.banner {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    #111116;
  border-bottom: 1px solid rgba(245, 197, 66, 0.18);
  display: flex;
  justify-content: center;
  padding: clamp(10px, 3vw, 22px) 14px;
}

.banner img {
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  display: block;
  height: auto;
  max-width: min(100%, 720px);
  width: auto;
}

.content,
.calendar-section {
  margin: 0 auto;
  max-width: 980px;
  padding: clamp(24px, 4vw, 42px) clamp(16px, 4vw, 24px);
  text-align: center;
}

.content.narrow {
  max-width: 780px;
}

.content h1,
.calendar-section h2 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  letter-spacing: 0;
  line-height: 1.12;
  margin: 0 0 14px;
  text-align: center;
}

.content h2,
.section-title {
  color: var(--gold);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  line-height: 1.2;
  margin: 0 0 14px;
}

.content p,
.calendar-section p {
  color: var(--muted);
  font-size: 1rem;
  margin: 0 auto 16px;
  max-width: 820px;
}

.lead {
  color: #eeeeef !important;
  font-size: 1.02rem !important;
  text-align: center;
}

.eyebrow {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0 0 12px;
  text-align: center;
  text-transform: uppercase;
}

.section-band {
  border-top: 1px solid var(--line-soft);
  margin-top: clamp(24px, 4vw, 38px);
  padding-top: clamp(20px, 4vw, 30px);
}

.info-grid,
.supporter-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.info-card,
.supporter-card,
.aid-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  padding: 16px;
  text-align: left;
}

.info-card h3,
.supporter-card h3,
.aid-card h3 {
  color: #fff;
  font-size: 1.02rem;
  line-height: 1.25;
  margin: 0 0 8px;
}

.info-card p,
.supporter-card p,
.aid-card p {
  font-size: 0.94rem;
  margin: 0;
}

.cta-row,
.button-container,
.button-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 22px;
}

.primary-button,
.secondary-button,
.join-button,
.game-button {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.primary-button,
.join-button {
  background: linear-gradient(180deg, #ffd45a, var(--gold));
  border: 1px solid #ffe38a;
  color: #16120a;
}

.secondary-button,
.game-button {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  color: var(--text);
}

.primary-button:hover,
.primary-button:focus-visible,
.secondary-button:hover,
.secondary-button:focus-visible,
.join-button:hover,
.join-button:focus-visible,
.game-button:hover,
.game-button:focus-visible {
  border-color: var(--gold);
  color: #fff;
  transform: translateY(-2px);
}

.primary-button:hover,
.primary-button:focus-visible,
.join-button:hover,
.join-button:focus-visible {
  color: #16120a;
}

.join-button {
  gap: 10px;
  width: min(100%, 250px);
}

.join-button img {
  height: 24px;
  width: 24px;
}

.button-grid {
  align-items: stretch;
}

.game-image-button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: block;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease;
  width: min(100%, 220px);
}

.game-image-button:hover,
.game-image-button:focus-visible {
  border-color: var(--gold);
  color: var(--text);
  transform: translateY(-2px);
}

.game-image-button img {
  aspect-ratio: 4 / 3;
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.game-image-button span,
.game-button {
  padding: 10px 12px;
  text-align: center;
}

.search-container {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 22px auto 10px;
  max-width: 700px;
  padding: 12px;
}

.search-container input {
  background: #0f1016;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  min-height: 42px;
  padding: 8px 11px;
  width: min(100%, 300px);
}

.search-container input:focus {
  border-color: var(--gold);
  outline: 2px solid rgba(245, 197, 66, 0.18);
}

.games-container {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  margin-top: 20px;
}

.game-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  overflow: hidden;
  text-align: center;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.game-card:hover {
  border-color: rgba(245, 197, 66, 0.7);
  transform: translateY(-2px);
}

.game-card a {
  color: var(--text);
  text-decoration: none;
}

.game-card img {
  aspect-ratio: 1 / 1;
  background: #101116;
  display: block;
  object-fit: contain;
  padding: 10px;
  width: 100%;
}

.game-card h3 {
  font-size: 0.94rem;
  line-height: 1.25;
  margin: 12px 12px 8px;
}

.game-card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 12px 8px;
}

.gallery {
  justify-content: center;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 240px));
  margin-top: 22px;
}

.gallery img {
  aspect-ratio: 4 / 3;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.26);
  cursor: pointer;
  height: 100%;
  object-fit: cover;
  transition: border-color 0.18s ease, transform 0.18s ease;
  width: 100%;
}

.gallery img:hover,
.gallery img:focus-visible {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.modal {
  align-items: center;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  height: 100%;
  justify-content: center;
  left: 0;
  padding: 18px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.modal img {
  border-radius: 8px;
  max-height: 92vh;
  max-width: 94vw;
  object-fit: contain;
}

.calendar-section {
  padding-top: 10px;
}

.calendar-section h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.calendar-container,
.form-container {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin: 18px auto 0;
  overflow: hidden;
  padding: 10px;
}

.calendar-container {
  background: #0f1016;
}

.calendar-container iframe {
  border: 0;
  display: block;
  filter: invert(1) hue-rotate(180deg) saturate(0.9) contrast(0.92);
  height: min(72vh, 650px);
  min-height: 520px;
  width: 100%;
}

.form-container {
  max-width: 700px;
}

.form-container iframe {
  border: 0;
  display: block;
  height: 965px;
  width: 100%;
}

.placeholder-panel {
  border-top: 1px solid var(--line-soft);
  margin-top: 26px;
  padding-top: 24px;
  text-align: center;
}

.status-pill {
  background: rgba(53, 184, 166, 0.14);
  border: 1px solid rgba(53, 184, 166, 0.5);
  border-radius: 999px;
  color: #bff5ec;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 14px;
  padding: 6px 10px;
  text-transform: uppercase;
}

.footer {
  background: #0d0e13;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  padding: 20px 16px;
  text-align: center;
}

.footer p {
  margin: 0;
}

@media (max-width: 860px) {
  .info-grid,
  .supporter-grid {
    grid-template-columns: 1fr;
  }

  .content,
  .calendar-section {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 600px) {
  .nav {
    gap: 6px;
    padding: 9px 7px;
  }

  .nav a {
    font-size: 0.78rem;
    min-height: 34px;
    padding: 5px 8px;
  }

  .banner {
    padding: 10px;
  }

  .cta-row,
  .button-container,
  .button-grid,
  .search-container {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .secondary-button,
  .join-button,
  .game-button,
  .game-image-button,
  .search-container input {
    width: 100%;
  }

  .calendar-container iframe {
    min-height: 460px;
  }
}

/* ===================== Play Completion ===================== */

.pc-user {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 22px auto 6px;
  max-width: 800px;
}

.pc-user input {
  background: #0f1016;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  min-height: 42px;
  padding: 8px 11px;
  width: min(100%, 260px);
}

.pc-user input:focus {
  border-color: var(--gold);
  outline: 2px solid rgba(245, 197, 66, 0.18);
}

.pc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 6px auto 14px;
  max-width: 800px;
}

.pc-tab {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  min-height: 40px;
  padding: 8px 14px;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.pc-tab:hover,
.pc-tab:focus-visible {
  background: rgba(245, 197, 66, 0.14);
  border-color: var(--gold);
  color: #fff6ce;
  transform: translateY(-1px);
}

.pc-tab.active {
  background: linear-gradient(180deg, #ffd45a, var(--gold));
  border-color: #ffe38a;
  color: #16120a;
}

.pc-controls {
  align-items: center;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 0 auto 8px;
  max-width: 820px;
  padding: 12px;
}

.pc-controls input,
.pc-controls select {
  background: #0f1016;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  min-height: 42px;
  padding: 8px 11px;
}

.pc-controls input {
  width: min(100%, 260px);
}

.pc-controls input:focus,
.pc-controls select:focus {
  border-color: var(--gold);
  outline: 2px solid rgba(245, 197, 66, 0.18);
}

.pc-field {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
}

.pc-summary {
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 700;
}

.pc-note {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 24px;
}

/* Cards re-use .game-card; these add the played/unplayed treatment. */
.game-card {
  position: relative;
}

.game-card.unplayed {
  opacity: 0.55;
}

.game-card.unplayed img {
  filter: grayscale(1);
}

.game-card.unplayed:hover {
  opacity: 1;
}

.game-card.played {
  border-color: rgba(245, 197, 66, 0.45);
}

.pc-rank {
  background: rgba(12, 12, 17, 0.85);
  border: 1px solid var(--gold);
  border-radius: 6px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  left: 8px;
  padding: 2px 7px;
  position: absolute;
  top: 8px;
  z-index: 2;
}

.pc-year {
  color: var(--muted);
  font-weight: 400;
}

.pc-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 12px 10px;
}

.pc-rating {
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 700;
}

.pc-plays {
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 8px;
}

.pc-plays.played {
  background: rgba(53, 184, 166, 0.16);
  border: 1px solid var(--teal);
  color: #8fe6da;
}

.pc-plays.unplayed {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--muted);
}

.pc-expand {
  background: rgba(255, 255, 255, 0.045);
  border: none;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 10px;
  text-align: center;
  transition: background 0.18s ease, color 0.18s ease;
  width: 100%;
}

.pc-expand:hover {
  background: rgba(245, 197, 66, 0.12);
  color: #fff6ce;
}

.pc-expansions {
  border-top: 1px solid var(--line-soft);
  padding: 8px 12px 12px;
  text-align: left;
}

.pc-exp-count,
.pc-exp-loading,
.pc-exp-empty {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 4px 0 8px;
}

.pc-exp-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pc-exp-list li {
  align-items: baseline;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: space-between;
  padding: 5px 0;
}

.pc-exp-list li:last-child {
  border-bottom: none;
}

.pc-exp-list a {
  font-size: 0.84rem;
  text-decoration: none;
}

.pc-exp-list .exp-tag {
  color: var(--muted);
  font-size: 0.74rem;
  white-space: nowrap;
}

.exp-unplayed a {
  color: var(--muted);
}

.exp-played a {
  color: var(--gold);
}

@media (max-width: 600px) {
  .pc-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .pc-controls input,
  .pc-controls select {
    width: 100%;
  }
}
