:root {
  --bg-top: #090312;
  --bg-bottom: #12051d;
  --panel: rgba(14, 10, 28, 0.88);
  --panel-soft: rgba(25, 16, 49, 0.82);
  --panel-edge: rgba(255, 255, 255, 0.08);
  --text: #f7f4ff;
  --muted: #cec5f7;
  --accent-blue: #4aa8ff;
  --accent-violet: #8a4dff;
  --accent-pink: #ff4d9a;
  --accent-red: #ff4a5f;
  --accent-sun: #ff8f7c;
  --danger: #ff657a;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 101, 122, 0.22), transparent 22%),
    radial-gradient(circle at 18% 16%, rgba(138, 77, 255, 0.24), transparent 24%),
    radial-gradient(circle at 84% 28%, rgba(74, 168, 255, 0.2), transparent 20%),
    linear-gradient(180deg, var(--bg-top) 0%, #0c0418 42%, var(--bg-bottom) 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55) 18%, rgba(0, 0, 0, 0.95));
}

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.site-header,
.site-footer {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0 0.9rem;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(138, 77, 255, 0.45);
}

.brand img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(138, 77, 255, 0.45));
}

.site-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  background: rgba(13, 9, 26, 0.58);
  border: 1px solid var(--panel-edge);
  backdrop-filter: blur(14px);
}

.site-nav a,
.text-link {
  color: #ffd8ea;
  text-decoration: none;
}

.site-nav a {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(255, 77, 154, 0.16);
  color: #ffffff;
}

.site-nav a.active {
  color: white;
  background: linear-gradient(135deg, rgba(138, 77, 255, 0.35), rgba(255, 77, 154, 0.35));
}

.hero,
.grid {
  display: grid;
  gap: 1.5rem;
}

.hero {
  grid-template-columns: 1.4fr 0.9fr;
  align-items: stretch;
  margin-top: 1rem;
}

.hero h1,
.page-header h1,
.panel h2 {
  margin-top: 0;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 0.98;
  margin-bottom: 1rem;
  max-width: 11ch;
  text-wrap: balance;
  text-shadow: 0 0 26px rgba(138, 77, 255, 0.28);
}

.hero-copy,
.page-header p,
.panel p,
.article-body p,
label {
  line-height: 1.7;
  color: var(--text);
}

.hero-card,
.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 18%),
    linear-gradient(180deg, var(--panel-soft), var(--panel));
  border: 1px solid var(--panel-edge);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  backdrop-filter: blur(16px);
}

.hero-card {
  align-self: center;
  position: relative;
  overflow: hidden;
}

.hero-card::before,
.panel::before {
  content: "";
  position: absolute;
  inset: auto -20% -60% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 77, 154, 0.24), transparent 70%);
  pointer-events: none;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #f7a8c8;
  font-size: 0.74rem;
}

.player-count {
  font-size: 2rem;
  font-weight: 700;
  color: white;
}

.status-meta {
  color: #ffd8ea;
  font-size: 0.95rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 0;
  padding: 0.9rem 1.3rem;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  min-height: 48px;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-pink) 55%, var(--accent-red));
  color: #fff;
  box-shadow: 0 12px 30px rgba(255, 77, 154, 0.24);
}

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

.button-danger {
  background: var(--danger);
  color: white;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.5rem;
}

.card-list,
.stack-list {
  display: grid;
  gap: 1rem;
}

.mini-card {
  display: grid;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--text);
  padding: 1rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(74, 168, 255, 0.08), rgba(255, 77, 154, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.page-header {
  margin: 1rem 0 1.5rem;
}

.form-panel,
label {
  display: grid;
  gap: 0.45rem;
}

input,
textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 0.85rem 1rem;
  font: inherit;
}

input::placeholder,
textarea::placeholder {
  color: rgba(247, 244, 255, 0.68);
}

input:focus,
textarea:focus,
.button:focus,
a:focus {
  outline: 2px solid rgba(74, 168, 255, 0.8);
  outline-offset: 2px;
}

.list-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1rem;
}

.list-row:first-child {
  border-top: 0;
  padding-top: 0;
}

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

.error {
  color: #ffd4dd;
}

.login-panel,
.article-panel {
  max-width: 820px;
}

.site-footer {
  padding: 0 0 2rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #ffd8ea;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #ffffff;
}

.row-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  main,
  .site-header,
  .site-footer {
    width: min(100% - 1.5rem, 1000px);
  }

  .hero,
  .two-up {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 14ch;
  }
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav {
    justify-content: center;
    border-radius: 24px;
    padding: 0.55rem;
  }

  .site-nav a {
    text-align: center;
    flex: 1 1 40%;
  }

  .hero {
    margin-top: 0.4rem;
  }

  .hero-card,
  .panel {
    padding: 1.2rem;
    border-radius: 20px;
  }

  .page-header {
    margin-top: 0.5rem;
  }

  .list-row {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .list-row form,
  .list-row .button {
    width: 100%;
  }

  .row-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions .button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  main,
  .site-header,
  .site-footer {
    width: calc(100% - 1rem);
  }

  .brand {
    font-size: 0.92rem;
    gap: 0.7rem;
  }

  .brand img {
    width: 52px;
    height: 52px;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 11vw, 3.2rem);
  }

  .player-count {
    font-size: 1.7rem;
  }
}
