*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.betaNotice {
  width: 100%;
  height: 22px;
  line-height: 22px;
  background: rgba(79, 142, 247, 0.13);
  color: rgba(180, 210, 255, 0.75);
  border-bottom: 1px solid rgba(79, 142, 247, 0.2);
  padding: 0 12px;
  text-align: center;
  font-size: 11px;
  font-weight: 400;
  font-family: "Space Grotesk", system-ui, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}
.betaNoticeLink {
  color: rgba(122, 167, 255, 0.9);
  text-decoration: underline;
}
.betaNoticeLink:hover {
  color: rgba(180, 210, 255, 1);
}

:root {
  --bg: #070b14;
  --nav-bg: rgba(7, 11, 20, 0.82);
  --surface: rgba(255, 255, 255, 0.042);
  --surface-h: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.075);
  --border-h: rgba(255, 255, 255, 0.18);
  --text: #dde3f5;
  --muted: #58698e;
  --dice: #4f8ef7;
  --dice-glow: rgba(79, 142, 247, 0.2);
  --madn: #9b6ef3;
  --madn-glow: rgba(155, 110, 243, 0.2);
  --sudoku: #e8a23a;
  --swim: #e05252;
  --swim-glow: rgba(224, 82, 82, 0.2);
  --blackjack: #1fae63;
  --blackjack-glow: rgba(31, 174, 99, 0.2);
}

body {
  font-family: "Space Grotesk", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background */
.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.bg-orb {
  position: absolute;
  border-radius: 50%;
}
.bg-orb-1 {
  width: 700px;
  height: 700px;
  top: -200px;
  left: -200px;
  background: radial-gradient(
    circle,
    rgba(79, 142, 247, 0.09) 0%,
    transparent 65%
  );
}
.bg-orb-2 {
  width: 600px;
  height: 600px;
  bottom: -180px;
  right: -180px;
  background: radial-gradient(
    circle,
    rgba(155, 110, 243, 0.09) 0%,
    transparent 65%
  );
}

/* Nav */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: var(--nav-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text);
}
.nav-logo-icon {
  font-size: 1.2rem;
  line-height: 1;
}
.nav-logo-name {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}

.nav-right {
  display: flex;
  align-items: center;
}

.discord-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.95rem;
  border-radius: 100px;
  background: #5865f2;
  color: #fff;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition:
    opacity 0.18s,
    transform 0.18s;
  white-space: nowrap;
}
.discord-login-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.discord-profile {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.28rem 0.5rem 0.28rem 0.28rem;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.18s;
  cursor: pointer;
}
.discord-profile img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}
.profile-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-menu-btn {
  font-size: 0.65rem;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0 0 0.1rem;
  transition:
    color 0.15s,
    transform 0.15s;
}
.profile-menu-btn:hover {
  color: var(--text);
}
.profile-menu-btn.open {
  transform: rotate(180deg);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: #0c1220;
  border: 1px solid var(--border-h);
  border-radius: 12px;
  padding: 0.4rem;
  display: none;
  flex-direction: column;
  gap: 0.15rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  z-index: 120;
}
.profile-dropdown.open {
  display: flex;
}
.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.12s;
}
.profile-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.profile-dropdown-item.profile-dropdown-danger {
  color: #e05252;
}
.profile-dropdown-item.profile-dropdown-danger:hover {
  background: rgba(224, 82, 82, 0.1);
}

/* ============== Settings modal ============== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 11, 20, 0.92);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 1.5rem;
}
.modal.open {
  display: flex;
}
.modal-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem 2rem 1.75rem;
  width: 100%;
  max-width: 420px;
  align-items: stretch;
  text-align: left;
}
.settings-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.settings-modal-head h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.2rem;
}
.settings-close-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem;
}
.settings-close-btn:hover {
  color: var(--text);
}

.settings-group {
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
  margin-top: 0.9rem;
}
.settings-group:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.settings-group-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
}
.settings-row-copy label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
}
.settings-row-copy p {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 0.1rem;
}
.settings-row-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.settings-row-control-volume input[type="range"] {
  width: 110px;
}
.settings-row-control select,
.settings-row-control input[type="text"] {
  font-family: inherit;
  font-size: 0.82rem;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
}
.settings-row-control input[type="text"] {
  width: 140px;
  outline: none;
}
.settings-row-control input[type="text"]:focus {
  border-color: var(--border-h);
}
.settings-empty {
  font-size: 0.8rem;
  color: var(--muted);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: background 0.15s;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--dice);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

/* Main */
main {
  position: relative;
  z-index: 1;
  max-width: 1060px;
  margin: 0 auto;
  padding: 2.25rem 1.5rem 3rem;
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: 2.25rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.75rem;
  border-radius: 100px;
  background: rgba(61, 220, 132, 0.07);
  border: 1px solid rgba(61, 220, 132, 0.18);
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(61, 220, 132, 0.82);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #3ddc84;
  box-shadow: 0 0 6px rgba(61, 220, 132, 0.9);
}

.hero h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin-bottom: 1.1rem;
  background: linear-gradient(140deg, #dde3f5 25%, #7c9ef5 65%, #9b6ef3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 0.975rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 380px;
  margin: 0 auto;
}

/* Grid */
.games {
  user-select: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(295px, 1fr));
  gap: 1.1rem;
}

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.22s,
    border-color 0.22s,
    box-shadow 0.22s;
}
.card:hover {
  transform: translateY(-4px);
}
.card.card-maintenance {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
  filter: grayscale(0.6);
}
.card-badge.card-badge-maintenance {
  background: rgba(224, 82, 82, 0.12) !important;
  border: 1px solid rgba(224, 82, 82, 0.3) !important;
  color: #f07878 !important;
}
.card.dice:hover {
  border-color: rgba(79, 142, 247, 0.45);
  box-shadow: 0 12px 48px var(--dice-glow);
}
.card.madn:hover {
  border-color: rgba(155, 110, 243, 0.45);
  box-shadow: 0 12px 48px var(--madn-glow);
}
.card.sudoku:hover {
  border-color: rgba(232, 162, 58, 0.45);
  box-shadow: 0 12px 48px rgba(232, 162, 58, 0.2);
}
.card.swim:hover {
  border-color: rgba(224, 82, 82, 0.45);
  box-shadow: 0 12px 48px var(--swim-glow);
}
.card.blackjack:hover {
  border-color: rgba(31, 174, 99, 0.45);
  box-shadow: 0 12px 48px var(--blackjack-glow);
}

/* Preview area */
.card-preview {
  height: 116px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.card.dice .card-preview {
  background: linear-gradient(155deg, #091226 0%, #0b1d40 100%);
}
.card.madn .card-preview {
  background: linear-gradient(155deg, #0d0820 0%, #170f35 100%);
}
.card.sudoku .card-preview {
  background: linear-gradient(155deg, #140e05 0%, #1c1306 100%);
}
.card.swim .card-preview {
  background: linear-gradient(155deg, #1a0808 0%, #2d0f0f 100%);
}
.card.blackjack .card-preview {
  background: linear-gradient(155deg, #051a10 0%, #0b2a1a 100%);
}

/* Subtle grid overlay on preview */
.card-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Dice visual */
.dice-vis {
  position: relative;
  width: 128px;
  height: 68px;
}
.die {
  position: absolute;
  font-size: 2.1rem;
  line-height: 1;
  filter: drop-shadow(0 2px 10px rgba(79, 142, 247, 0.45));
  user-select: none;
}
.die:nth-child(1) {
  left: 4px;
  top: 14px;
  transform: rotate(-14deg);
  font-size: 2.3rem;
}
.die:nth-child(2) {
  left: 44px;
  top: 6px;
  transform: rotate(4deg);
  opacity: 0.75;
}
.die:nth-child(3) {
  left: 83px;
  top: 16px;
  transform: rotate(20deg);
  opacity: 0.5;
  font-size: 1.85rem;
}

/* MADN pawn visual */
.madn-vis {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  padding-bottom: 4px;
}
.pawn {
  width: 20px;
  border-radius: 50% 50% 28% 28% / 55% 55% 45% 45%;
  position: relative;
  flex-shrink: 0;
}
.pawn::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  background: inherit;
  filter: brightness(1.25);
}
.pawn-r {
  height: 32px;
  background: #d95555;
  box-shadow: 0 0 14px rgba(217, 85, 85, 0.55);
}
.pawn-b {
  height: 38px;
  background: var(--dice);
  box-shadow: 0 0 14px var(--dice-glow);
}
.pawn-g {
  height: 30px;
  background: #3ddc84;
  box-shadow: 0 0 14px rgba(61, 220, 132, 0.45);
}
.pawn-y {
  height: 34px;
  background: #e8c23a;
  box-shadow: 0 0 14px rgba(232, 194, 58, 0.45);
}

/* Sudoku visual */
.sudoku-vis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  width: 80px;
}
.sc {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  background: rgba(232, 162, 58, 0.06);
  border: 1px solid rgba(232, 162, 58, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  color: rgba(232, 162, 58, 0.35);
  font-variant-numeric: tabular-nums;
}
.sc.f {
  background: rgba(232, 162, 58, 0.13);
  color: rgba(232, 162, 58, 0.75);
}

/* Card body */
.card-body {
  padding: 1.35rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  flex: 1;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.card-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
  white-space: nowrap;
}
.card.dice .card-badge {
  background: rgba(79, 142, 247, 0.1);
  border: 1px solid rgba(79, 142, 247, 0.25);
  color: #7ab0fa;
}
.card.madn .card-badge {
  background: rgba(155, 110, 243, 0.1);
  border: 1px solid rgba(155, 110, 243, 0.25);
  color: #b48ef5;
}
.card.sudoku .card-badge {
  background: rgba(232, 162, 58, 0.1);
  border: 1px solid rgba(232, 162, 58, 0.25);
  color: var(--sudoku);
}
.card.swim .card-badge {
  background: rgba(224, 82, 82, 0.1);
  border: 1px solid rgba(224, 82, 82, 0.25);
  color: #f07878;
}
.card.blackjack .card-badge {
  background: rgba(31, 174, 99, 0.1);
  border: 1px solid rgba(31, 174, 99, 0.25);
  color: var(--blackjack);
}

.card-desc {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.65;
}

.card-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cta {
  font-size: 0.84rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.card.dice .cta {
  color: var(--dice);
}
.card.madn .cta {
  color: var(--madn);
}
.card.sudoku .cta {
  color: var(--sudoku);
}
.card.swim .cta {
  color: var(--swim);
}
.card.blackjack .cta {
  color: var(--blackjack);
}

/* Swim card visual */
.swim-vis {
  display: flex;
  align-items: center;
  gap: 10px;
}
.swim-mini {
  width: 38px;
  height: 54px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 3px;
}
.swim-mini.red {
  color: #cc2222;
}
.swim-mini.black {
  color: #111;
}
.swim-mini:nth-child(1) {
  transform: rotate(-12deg) translateY(6px);
}
.swim-mini:nth-child(3) {
  transform: rotate(10deg) translateY(5px);
}

/* Blackjack card visual */
.blackjack-vis {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bj-mini {
  width: 38px;
  height: 54px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 3px;
}
.bj-mini.red {
  color: #cc2222;
}
.bj-mini.black {
  color: #111;
}
.bj-mini:nth-child(1) {
  transform: rotate(-10deg) translateY(4px);
}
.bj-mini:nth-child(2) {
  transform: rotate(10deg) translateY(-2px);
}

.cta-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.5;
  font-size: 0.75rem;
  transition:
    transform 0.18s,
    opacity 0.18s;
}
.card:hover .cta-arrow {
  transform: translateX(4px);
  opacity: 0.9;
}

/* Highscores */
.highscores-section {
  margin-top: 10rem;
  animation: up 0.45s 0.2s ease both;
}

.section-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.1rem;
  letter-spacing: -0.01em;
}

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

.hs-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.3rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hs-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  height: 3rem;
  margin-bottom: 1.3rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--border);
}

.hs-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hs-card-title i {
  width: 1em;
  text-align: center;
}
.hs-card:nth-child(1) .hs-card-title {
  color: var(--dice);
}
.hs-card:nth-child(2) .hs-card-title {
  color: var(--sudoku);
}
.hs-card:nth-child(3) .hs-card-title {
  color: var(--blackjack);
}

.hs-diff-select {
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  height: 1.7rem;
  padding: 0 1.75rem 0 0.7rem;
  box-sizing: border-box;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2358698e'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E")
    no-repeat right 0.55rem center / 0.7rem;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s;
}
.hs-diff-select:hover {
  border-color: var(--border-h);
}
.hs-diff-select:focus {
  outline: none;
  border-color: var(--sudoku);
}
.hs-diff-select option {
  background: #0c1220;
  color: var(--text);
}

.hs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hs-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.4rem 0.2rem;
}
.hs-rank {
  width: 20px;
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}
.hs-row:nth-child(1) .hs-rank {
  color: #e8c23a;
}
.hs-row:nth-child(2) .hs-rank {
  color: #c7ccd8;
}
.hs-row:nth-child(3) .hs-rank {
  color: #c98a4b;
}

.hs-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
}

.hs-name {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hs-score {
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.hs-empty {
  list-style: none;
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.5rem 0.2rem;
  text-align: center;
}

@media (max-width: 520px) {
  .hs-card {
    padding: 1.1rem 1.1rem 1.3rem;
  }
}

/* Footer */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1rem 1.5rem 2.5rem;
  font-size: 0.76rem;
  color: rgba(221, 227, 245, 0.2);
}
footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}
footer a:hover {
  color: rgba(221, 227, 245, 0.45);
}

/* Entrance */
@keyframes up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.hero {
  animation: up 0.45s ease both;
}
.discord-section {
  animation: up 0.45s 0.08s ease both;
}
.games {
  animation: up 0.45s 0.16s ease both;
}

@media (prefers-reduced-motion: reduce) {
  .hero,
  .discord-section,
  .games {
    animation: none;
  }
}

@media (max-width: 520px) {
  main {
    padding: 3rem 1rem 4rem;
  }
  nav {
    padding: 0 1rem;
  }
  .games {
    grid-template-columns: 1fr;
  }
}

/* Discord Section */
.discord-section {
  margin-top: 1.5rem;
}

.discord-connect-card,
.discord-connected-card {
  background: rgba(88, 101, 242, 0.08);
  border: 1px solid rgba(88, 101, 242, 0.22);
  border-radius: 20px;
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.discord-connect-left {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  flex: 1;
}

.discord-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(88, 101, 242, 0.18);
  border: 1px solid rgba(88, 101, 242, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #7289da;
  flex-shrink: 0;
}

.discord-connect-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.discord-connect-sub {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0.8rem;
  max-width: 380px;
}

.discord-benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.discord-benefits li {
  font-size: 0.82rem;
  color: rgba(221, 227, 245, 0.65);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.benefit-check {
  color: #5865f2;
  font-weight: 700;
}

.discord-connect-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.discord-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 100px;
  background: #5865f2;
  color: #fff;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition:
    opacity 0.18s,
    transform 0.18s;
  white-space: nowrap;
}
.discord-cta-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.discord-hint {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
}

.discord-connected-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.discord-section-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.discord-connected-label {
  font-size: 0.75rem;
  color: rgba(88, 101, 242, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.discord-connected-name {
  font-size: 1rem;
  font-weight: 700;
}

.discord-disconnect-btn {
  padding: 0.45rem 1rem;
  border-radius: 100px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.discord-disconnect-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.25);
}

@media (max-width: 600px) {
  .discord-connect-card,
  .discord-connected-card {
    flex-direction: column;
  }
  .discord-connect-right {
    width: 100%;
  }
  .discord-cta-btn {
    width: 100%;
    justify-content: center;
  }
}
