/* Muenspeak Game Platform — foundation UI */

:root {
  --brand-blue: #6a88f5;
  --bg-deep: #4f66b8;
  --bg-surface: #5872c4;
  --bg-elevated: #627dce;
  --border: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.22);
  --text: #f8faff;
  --text-muted: #c8d4f8;
  --accent: #6a88f5;
  --accent-dim: rgba(106, 136, 245, 0.22);
  --accent-strong: #5478eb;
  --accent-cyan: #7dd3fc;
  --success: #4ade80;
  --danger: #fb7185;
  --shadow: 0 24px 70px rgba(28, 38, 82, 0.38);
  --shadow-soft: 0 12px 36px rgba(28, 38, 82, 0.26);
  --glow-accent: 0 0 0 1px rgba(106, 136, 245, 0.24), 0 18px 50px rgba(106, 136, 245, 0.22);
  --game-header-bg: rgba(8, 10, 18, 0.92);
  --header-slide: 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Outfit", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --step--1: clamp(0.85rem, 0.82rem + 0.12vw, 0.95rem);
  --step-0: clamp(1rem, 0.95rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.05rem + 0.55vw, 1.45rem);
  --step-2: clamp(1.45rem, 1.2rem + 0.9vw, 1.85rem);
  --step-3: clamp(1.85rem, 1.45rem + 1.4vw, 2.35rem);
  --step-4: clamp(2.25rem, 1.65rem + 2.2vw, 3rem);
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.75rem;
  --space-8: 2.5rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 0.2s;
  --t-med: 0.28s;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  min-height: 100%;
  background-color: var(--bg-deep);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--text);
  /* Solid base only — gradients live on #app::before so nothing bleeds through */
  background-color: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

a:hover {
  color: var(--accent-strong);
}

a.btn,
a.btn:hover,
a.btn:focus {
  text-decoration: none;
}

a.btn-primary,
a.btn-primary:hover:not(:disabled) {
  color: #ffffff;
}

a.btn-secondary,
a.btn-secondary:hover:not(:disabled) {
  color: #f8faff;
}

a.btn-secondary:hover:not(:disabled) {
  color: #ffffff;
}

a.btn-ghost:hover:not(:disabled) {
  color: var(--text);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

/* Layout — single app root: #app.shell */

.shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

#app.shell {
  position: relative;
  isolation: isolate;
  z-index: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  background-color: var(--bg-deep);
}

/* Decorative background (no text — visual layer only, behind UI) */
#app.shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(165deg, #6a88f5 0%, #5878e8 42%, #4659a8 100%),
    radial-gradient(ellipse 88% 62% at 18% -8%, rgba(255, 255, 255, 0.22), transparent 58%),
    radial-gradient(ellipse 55% 45% at 100% 100%, rgba(125, 211, 252, 0.16), transparent 52%),
    radial-gradient(ellipse 40% 35% at 0% 88%, rgba(255, 255, 255, 0.1), transparent 48%);
}

#app.shell > .site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

#app.shell > main,
#app.shell > footer.footer-min {
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--border);
  background: rgba(52, 68, 130, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--brand-blue) 0%, var(--accent-cyan) 100%);
  border: 0;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(106, 136, 245, 0.38);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Platform top bar (Steam / Discord–style) */

.site-header--platform {
  flex-wrap: wrap;
  row-gap: var(--space-3);
}

.nav-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  flex: 1 1 auto;
  min-width: min(100%, 17rem);
}

.nav-link {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--step--1);
  color: var(--text-muted);
  border: 1px solid transparent;
  transition:
    color var(--t-fast) var(--ease-out),
    background var(--t-fast) var(--ease-out),
    border-color var(--t-fast) var(--ease-out),
    box-shadow var(--t-med) var(--ease-out);
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
}

.nav-link.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 0 24px rgba(106, 136, 245, 0.18);
}

.nav-trailing {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  max-width: 11rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
  transition:
    border-color var(--t-fast) var(--ease-out),
    box-shadow var(--t-med) var(--ease-out);
}

.user-chip:hover {
  border-color: rgba(155, 123, 255, 0.34);
  box-shadow: var(--glow-accent);
}

.user-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.55);
  flex-shrink: 0;
}

.user-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-compact {
  padding: 0.55rem 0.95rem;
  font-size: var(--step--1);
}

@media (max-width: 720px) {
  .site-header--platform .nav-main {
    order: 3;
    width: 100%;
    justify-content: center;
    padding-top: var(--space-2);
    border-top: 1px solid var(--border);
  }

  .site-header--platform .nav-trailing {
    margin-left: auto;
  }
}

main {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.footer-min {
  padding: 1.25rem clamp(1rem, 4vw, 2.5rem);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--step--1);
  text-align: center;
}

/* Typography */

h1,
h2,
h3 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

.hero-title {
  font-size: var(--step-4);
  background: linear-gradient(120deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: var(--step-1);
  color: var(--text-muted);
  max-width: 42ch;
  margin: 0 0 1.75rem;
}

/* Cards & panels */

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: var(--shadow-soft);
}

.card--elevated {
  box-shadow: var(--shadow);
  border-color: rgba(255, 255, 255, 0.1);
  transition:
    border-color var(--t-med) var(--ease-out),
    box-shadow var(--t-med) var(--ease-out),
    transform var(--t-fast) var(--ease-out);
}

.card--elevated:hover {
  border-color: rgba(155, 123, 255, 0.28);
  box-shadow: var(--glow-accent);
  transform: translateY(-1px);
}

.card--glass {
  background: linear-gradient(155deg, color-mix(in srgb, var(--bg-surface) 88%, white), var(--bg-elevated));
  border-color: rgba(255, 255, 255, 0.1);
}

.card + .card {
  margin-top: 1.25rem;
}

.card-title {
  font-size: var(--step-1);
  margin-bottom: 0.35rem;
}

.card-desc {
  color: var(--text-muted);
  font-size: var(--step--1);
  margin: 0 0 1.25rem;
}

.panel-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .panel-grid.two {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

@media (min-width: 960px) {
  .lobby-choice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .lobby-choice-grid > .card + .card {
    margin-top: 0;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1.15rem;
  font-family: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background var(--t-fast) var(--ease-out),
    border-color var(--t-fast) var(--ease-out),
    transform var(--t-fast) var(--ease-out),
    box-shadow var(--t-med) var(--ease-out),
    filter var(--t-fast) var(--ease-out);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(165deg, #7b96f7, var(--accent-strong));
  border-color: color-mix(in srgb, var(--accent-strong) 45%, transparent);
  box-shadow: 0 8px 28px rgba(106, 136, 245, 0.34);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(106, 136, 245, 0.42);
}

.btn-secondary {
  color: var(--text);
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}

.btn-secondary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--bg-elevated) 82%, #7c5cff);
  border-color: rgba(196, 181, 253, 0.28);
}

.btn-ghost {
  color: var(--text-muted);
  background: transparent;
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text);
  background: rgba(155, 123, 255, 0.1);
}

.btn-block {
  width: 100%;
}

.btn .btn-icon {
  font-size: 1.1em;
  opacity: 0.9;
}

/* Forms */

.field {
  margin-bottom: 1rem;
}

.field:last-child {
  margin-bottom: 0;
}

label,
.field-label {
  display: block;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

input[type="text"],
input[type="search"] {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  font-size: var(--step-0);
  color: var(--text);
  background: rgba(18, 12, 36, 0.42);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder {
  color: var(--text-muted);
  opacity: 0.75;
}

input:hover {
  border-color: rgba(196, 181, 253, 0.34);
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.input-mono {
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

.hint {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Hero layout */

.hero {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: 0.5rem 0 2rem;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    padding: 1rem 0 3rem;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat-pill {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: var(--step--1);
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: rgba(155, 123, 255, 0.08);
}

.stat-pill strong {
  color: var(--accent);
  font-weight: 600;
}

.preview-card {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  padding: 1.25rem;
  background: linear-gradient(160deg, var(--bg-elevated), var(--bg-surface));
  border: 1px solid var(--border-strong);
  overflow: hidden;
}

.preview-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 20%, rgba(124, 92, 255, 0.16), transparent 50%);
  pointer-events: none;
}

.preview-inner {
  position: relative;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  padding: 1rem;
  min-height: 180px;
}

.preview-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* Room */

.room-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.room-bar__controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.room-bar__info {
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

.room-bar__info:hover {
  color: var(--accent-strong, var(--accent));
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: rgba(255, 255, 255, 0.08);
}

.room-bar__info:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.room-bar__info-i {
  font-size: 0.95rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
}

.room-code {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: var(--step--1);
}

.room-code__value {
  color: var(--accent);
  letter-spacing: 0.08em;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-family: inherit;
  cursor: pointer;
  border-radius: 4px;
  text-decoration: underline dotted transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}

.room-code__value:hover {
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.room-code__value:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.6);
  animation: pulse 2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .status-dot {
    animation: none;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.status-dot.offline {
  background: var(--danger);
  box-shadow: none;
  animation: none;
}

.user-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.user-list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.user-list li.is-self {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  background: var(--accent-dim);
}

.avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  background: linear-gradient(145deg, #334155, #1e293b);
  color: var(--text);
  flex-shrink: 0;
}

.user-meta {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.badge-you {
  background: rgba(110, 231, 255, 0.18);
  color: var(--accent-strong);
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: var(--step--1);
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 300;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: var(--step--1);
  box-shadow: var(--shadow);
  opacity: 0;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s ease;
  max-width: min(90vw, 400px);
  pointer-events: none;
}

.toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.error {
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
}

.page-title {
  font-size: var(--step-3);
  margin-bottom: 0.35rem;
}

.page-sub {
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  max-width: 52ch;
}

/* —— Game platform layout (home + shared) —— */

.platform-main {
  width: 100%;
  max-width: 1225px;
  margin: 0 auto;
  padding: clamp(0.25rem, 4vw, 0.75rem);
}

.platform-hero {
  display: grid;
  gap: var(--space-6);
  align-items: stretch;
  margin-bottom: var(--space-8);
}

@media (min-width: 880px) {
  .platform-hero {
    grid-template-columns: 1.35fr 0.65fr;
    align-items: center;
  }
}

.platform-kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-4);
  font-size: var(--step--1);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.live-pill {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 14px rgba(74, 222, 128, 0.65);
  animation: pulse 2.2s ease-in-out infinite;
}

.platform-title {
  margin: 0 0 var(--space-4);
  font-size: var(--step-4);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  background: linear-gradient(115deg, #f5f2ff 0%, #c4b5fd 42%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.platform-lead {
  margin: 0;
  max-width: 48ch;
  font-size: var(--step-1);
  color: var(--text-muted);
  line-height: 1.6;
}

.platform-hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  padding: var(--space-5);
  min-height: 100%;
}

.mini-stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color var(--t-fast) var(--ease-out);
}

.mini-stat:hover {
  border-color: rgba(110, 231, 255, 0.2);
}

.mini-stat__val {
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--text);
}

.mini-stat__key {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.platform-grid {
  display: grid;
  gap: var(--space-6);
  align-items: stretch;
}

/* Yan yana kartlarda .card + .card üst boşluğu sağ sütunu aşağı iter; grid gap yeterli */
.platform-grid > .card + .card {
  margin-top: 0;
}

@media (min-width: 960px) {
  .platform-grid {
    grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  }

  /* İki sütun aynı yükseklikte; sağ panelde liste kalan alanı doldurur */
  .platform-quick,
  .lobby-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .lobby-panel .home-rooms-viewport {
    flex: 1 1 auto;
    min-height: 280px;
    max-height: none;
  }
}

.platform-quick .card-head {
  margin-bottom: var(--space-4);
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.join-row {
  display: flex;
  gap: var(--space-3);
  align-items: flex-end;
  flex-wrap: wrap;
}

.field--inline-grow {
  flex: 1 1 12rem;
  margin-bottom: 0;
}

.join-row__btn {
  flex-shrink: 0;
  min-height: 2.65rem;
}

/* Homepage quick-start: one primary CTA, secondary join path */

.field-inline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.field-inline-meta .hint {
  margin: 0;
  flex: 1 1 10rem;
}

.quick-actions--primary {
  margin-bottom: 0;
}

.btn-primary--lead {
  min-height: 3rem;
  font-weight: 700;
  font-size: calc(var(--step-0) * 1.05);
  box-shadow: 0 10px 36px rgba(34, 211, 238, 0.28);
}

.quick-or {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-5) 0 var(--space-4);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.quick-or::before,
.quick-or::after {
  content: "";
  flex: 1;
  min-width: 1.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.quick-or span {
  flex-shrink: 0;
  max-width: 100%;
}

.join-row--secondary {
  padding-top: var(--space-1);
}

.join-row--secondary .join-row__btn {
  border-color: rgba(255, 255, 255, 0.12);
}

.lobby-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.lobby-panel__sub {
  margin-bottom: 0;
}

.lobby-live {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.lobby-live .status-dot {
  width: 6px;
  height: 6px;
}

/* Ana sayfa — aktif odalar kutusu (sabit min/max yükseklik, taşma kaydırılır) */
.home-rooms-viewport {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 280px;
  max-height: min(420px, 52vh);
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
}

.home-rooms-viewport .room-tile-grid {
  min-height: min(100%, 1px);
}

.home-rooms-empty {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-5);
  font-size: var(--step-0);
  color: var(--text-muted);
  pointer-events: none;
}

.home-rooms-empty[hidden] {
  display: none !important;
}

.lobby-live--live .status-dot {
  background: var(--success);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.35);
}

.room-tile-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .room-tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.room-tile {
  position: relative;
  isolation: isolate;
  z-index: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(24, 28, 42, 0.95), rgba(18, 21, 31, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transition:
    transform var(--t-med) var(--ease-out),
    border-color var(--t-med) var(--ease-out),
    box-shadow var(--t-med) var(--ease-out);
}

.room-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(800px circle at 100% 0%, rgba(124, 92, 255, 0.12), transparent 45%);
  opacity: 0.9;
  pointer-events: none;
  transition: opacity var(--t-med) var(--ease-out);
}

.room-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(155, 123, 255, 0.34);
  box-shadow:
    0 16px 48px rgba(8, 5, 18, 0.42),
    0 0 0 1px rgba(155, 123, 255, 0.16);
}

.room-tile:hover::before {
  opacity: 1;
}

.room-tile__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  position: relative;
  z-index: 1;
}

.room-tile__mode {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
}

.room-tile--uno .room-tile__mode {
  color: #facc15;
}

.room-tile--uno::before {
  background:
    radial-gradient(650px circle at 100% 0%, rgba(250, 204, 21, 0.11), transparent 42%),
    radial-gradient(600px circle at 0% 100%, rgba(34, 197, 94, 0.08), transparent 44%);
}

.room-tile__players {
  font-size: var(--step--1);
  color: var(--text-muted);
}

.room-tile__players strong {
  color: var(--text);
  font-weight: 700;
}

.room-tile__name {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: var(--step-1);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.room-tile__id {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: var(--step--1);
}

.room-tile__id code {
  font-family: var(--mono);
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.room-tile__join {
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.lobby-footnote {
  margin: var(--space-5) 0 0;
  text-align: center;
  font-size: var(--step--1);
  color: var(--text-muted);
}

.page-games .platform-main,
.page-home .platform-main {
  max-width: 1225px;
}

.platform-main--wide {
  max-width: 1320px;
  padding: clamp(1rem, 4vw, 2.5rem);
}

.home-intro {
  max-width: 820px;
  margin: 0 0 clamp(1.25rem, 4vw, 2.25rem);
}

.page-light .platform-title {
  background: linear-gradient(115deg, #ffffff 0%, #dbeafe 38%, #bfdbfe 72%, #6a88f5 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* —— Oyun odası: koyu header, beyaz metin, otomatik gizlenme —— */
.page-game-room .site-header--platform,
.page-game-room .tank-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 320;
  background: var(--game-header-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #f7f8ff;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform var(--header-slide);
  will-change: transform;
}

.page-game-room .site-header--platform.is-retracted,
.page-game-room .tank-topbar.is-retracted {
  transform: translateY(-100%);
  pointer-events: none;
}

.page-game-room .brand,
.page-game-room .tank-brand,
.page-game-room .room-code,
.page-game-room .tank-room-code {
  color: rgba(255, 255, 255, 0.92);
}

.page-game-room .nav-link {
  color: rgba(255, 255, 255, 0.62);
}

.page-game-room .nav-link:hover,
.page-game-room .nav-link.is-active,
.page-game-room .tank-topbar nav a.is-active {
  color: #fff;
}

.page-game-room .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.page-game-room .nav-link.is-active {
  background: rgba(106, 136, 245, 0.22);
  border-color: rgba(106, 136, 245, 0.38);
}

.page-game-room .btn-ghost,
.page-game-room .tank-link-btn {
  color: rgba(255, 255, 255, 0.78);
}

.page-game-room .btn-ghost:hover:not(:disabled),
.page-game-room .tank-link-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.page-game-room .room-code__value {
  color: #fff;
}

.page-game-room #app.shell > .site-header {
  position: fixed;
}

.page-game-room.page-uno .uno-main,
.page-game-room.page-okey .okey-main {
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
}

.page-game-room.page-tank-room .tank-shell {
  grid-template-rows: 1fr;
  min-height: 100dvh;
}

.page-game-room.page-tank-room .tank-stage {
  min-height: 100dvh;
}

.page-game-room.page-tank-room .tank-overlay {
  inset: 0;
}

.page-game-room .tank-topbar nav a {
  color: rgba(255, 255, 255, 0.62);
}

.page-game-room .tank-topbar nav a:hover,
.page-game-room .tank-topbar nav a.is-active {
  color: #fff;
}

.game-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.9rem, 2vw, 1.25rem);
}

.game-card {
  position: relative;
  display: flex;
  min-height: 430px;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  color: var(--text);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition:
    transform var(--t-med) var(--ease-out),
    box-shadow var(--t-med) var(--ease-out),
    border-color var(--t-med) var(--ease-out);
}

.game-card:hover {
  color: var(--text);
  transform: translateY(-5px);
  border-color: rgba(155, 123, 255, 0.38);
  box-shadow: var(--shadow);
}

.game-card__body {
  display: grid;
  gap: 0.35rem;
  padding: 1.15rem;
}

.game-card__eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.game-card h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  letter-spacing: -0.02em;
}

.game-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.game-visual {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.12)),
    linear-gradient(145deg, #bfdbfe, #99f6e4);
}

.game-card > .game-visual {
  border-radius: 18px 18px 0 0;
}

.game-visual::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 14px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, black, transparent 84%);
}

.game-visual__piece {
  position: absolute;
  display: block;
  border-radius: 14px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.22);
}

/* Shared preview art — UNO cards, okey tiles, tanks, draw canvas */
.gv-uno,
.gv-okey,
.gv-tank,
.gv-canvas,
.gv-pencil,
.gv-scribble,
.gv-blast {
  position: absolute;
  display: block;
}

.gv-uno {
  width: 58px;
  height: 88px;
  border-radius: 9px;
  border: 3px solid rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.32);
  color: #fff;
}

.gv-uno__corner {
  position: absolute;
  top: 7px;
  left: 8px;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
}

.gv-uno__oval {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 62%;
  height: 68%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.93);
  color: #111827;
  font-size: 1.35rem;
  font-weight: 950;
  transform: translate(-50%, -50%) rotate(-16deg);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.gv-uno--red {
  left: 10%;
  top: 26%;
  transform: rotate(-14deg);
  background: linear-gradient(145deg, #ff5a5f, #b91c1c);
}

.gv-uno--blue {
  right: 8%;
  top: 20%;
  transform: rotate(12deg);
  background: linear-gradient(145deg, #60a5fa, #1d4ed8);
}

.gv-uno--green {
  left: 34%;
  top: 42%;
  transform: rotate(-3deg);
  background: linear-gradient(145deg, #4ade80, #15803d);
}

.gv-uno--back {
  left: 22%;
  top: 16%;
  transform: rotate(7deg) scale(0.94);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.96) 0 17%, transparent 18%),
    conic-gradient(#ef4444 0 25%, #facc15 0 50%, #22c55e 0 75%, #3b82f6 0);
}

.gv-uno--back .gv-uno__corner,
.gv-uno--back .gv-uno__oval {
  display: none;
}

.gv-okey {
  width: 44px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid #d6c69c;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.72), transparent 34%),
    linear-gradient(#fff8e8, #e5d5b2);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.28);
  font-size: 1.15rem;
  font-weight: 950;
  line-height: 1;
}

.gv-okey--red {
  left: 12%;
  top: 28%;
  transform: rotate(-10deg);
  color: #dc2626;
}

.gv-okey--blue {
  left: 36%;
  top: 38%;
  transform: rotate(4deg);
  color: #2563eb;
}

.gv-okey--yellow {
  right: 12%;
  top: 24%;
  transform: rotate(11deg);
  color: #ca8a04;
}

.gv-okey--fake {
  right: 28%;
  top: 52%;
  transform: rotate(-8deg);
  color: #7c3aed;
  box-shadow:
    0 0 0 2px rgba(250, 204, 21, 0.55),
    0 12px 24px rgba(15, 23, 42, 0.28);
}

.gv-tank {
  width: 78px;
  height: 52px;
  border-radius: 10px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.34);
}

.gv-tank::before {
  content: "";
  position: absolute;
  left: 18%;
  top: 50%;
  width: 44%;
  height: 34%;
  border-radius: 6px;
  transform: translateY(-50%);
  background: inherit;
  filter: brightness(0.92);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18);
}

.gv-tank::after {
  content: "";
  position: absolute;
  right: 8%;
  top: 50%;
  width: 46%;
  height: 10px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.55);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.gv-tank--green {
  left: 10%;
  top: 34%;
  transform: rotate(-8deg);
  background: linear-gradient(145deg, #22ff72, #0b8e38);
}

.gv-tank--red {
  right: 10%;
  top: 28%;
  transform: rotate(10deg);
  background: linear-gradient(145deg, #ff4343, #a60b0b);
}

.gv-blast {
  left: 46%;
  top: 18%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, #fde047 0 28%, rgba(250, 204, 21, 0.35) 42%, transparent 68%);
  box-shadow: 0 0 24px rgba(250, 204, 21, 0.55);
  animation: gv-blast-pulse 1.8s ease-in-out infinite;
}

@keyframes gv-blast-pulse {
  0%,
  100% {
    transform: scale(0.88);
    opacity: 0.72;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

.gv-canvas {
  left: 14%;
  top: 18%;
  width: 132px;
  height: 96px;
  border-radius: 16px;
  background: #fffdf8;
  border: 2px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.24);
  overflow: hidden;
}

.gv-canvas::before {
  content: "";
  position: absolute;
  inset: 14px 18px 18px 14px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 28% 42%, transparent 18px, #111827 19px 20px, transparent 21px),
    radial-gradient(circle at 62% 36%, transparent 10px, #ef4444 11px 12px, transparent 13px),
    linear-gradient(118deg, transparent 44%, #2563eb 44% 46%, transparent 46%),
    linear-gradient(148deg, transparent 58%, #16a34a 58% 60%, transparent 60%);
  opacity: 0.82;
}

.gv-pencil {
  right: 16%;
  top: 22%;
  width: 16px;
  height: 118px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fbbf24 0 72%, #fde68a 72% 82%, #111827 82%);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.28);
  transform: rotate(18deg);
}

.gv-scribble {
  left: 24%;
  bottom: 16%;
  width: 108px;
  height: 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.18);
}

.game-visual__piece--a {
  width: 86px;
  height: 118px;
  left: 18%;
  top: 22%;
  transform: rotate(-8deg);
  background: #ffffff;
}

.game-visual__piece--b {
  width: 104px;
  height: 104px;
  right: 13%;
  top: 24%;
  transform: rotate(10deg);
  background: rgba(255, 255, 255, 0.78);
}

.game-visual__piece--c {
  width: 128px;
  height: 22px;
  left: 22%;
  bottom: 19%;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.22);
}

.game-visual--draw {
  background:
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.9), transparent 24%),
    linear-gradient(145deg, #60a5fa, #34d399);
}

.game-visual--uno {
  background:
    radial-gradient(circle at 22% 24%, rgba(255, 255, 255, 0.78), transparent 22%),
    linear-gradient(145deg, #0f172a, #14532d 58%, #166534);
}

.game-visual--okey {
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.74), transparent 18%),
    linear-gradient(145deg, #0f766e, #84cc16);
}

.game-visual--tank {
  background:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(145deg, #334155, #14532d);
  background-size: 34px 34px, 34px 34px, auto;
}

.game-lobby-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  gap: 1.25rem;
  align-items: stretch;
  margin-bottom: 1.25rem;
}

.game-lobby-hero .game-visual {
  min-height: 190px;
  box-shadow: var(--shadow-soft);
}

.game-lobby-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 960px) {
  .game-lobby-grid {
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    align-items: stretch;
  }
}

.join-strip {
  display: flex;
  align-items: flex-end;
  gap: var(--space-3);
  padding: 0 0 var(--space-5);
  margin: 0 0 var(--space-5);
  border-bottom: 1px solid var(--border);
}

.join-strip--compact {
  padding: 0;
  margin: 0;
  border: 0;
}

.lobby-panel--wide {
  width: 100%;
}

.rooms-head {
  display: grid;
  gap: 1.25rem;
  align-items: end;
  margin-bottom: 1.25rem;
}

@media (min-width: 900px) {
  .rooms-head {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 470px);
  }
}

.rooms-join-card {
  margin: 0;
}

.rooms-wide-viewport {
  position: relative;
  min-height: 420px;
}

.room-tile-grid--wide {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.room-tile {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: var(--space-4);
  align-items: stretch;
  background: var(--bg-surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
}

.room-tile:hover {
  box-shadow: var(--shadow);
}

.room-tile::before {
  display: none;
}

.room-tile > .game-visual {
  min-height: 0;
  height: 100%;
  min-width: 0;
  border-radius: 12px;
}

.room-tile .gv-uno {
  width: 34px;
  height: 52px;
  border-width: 2px;
}

.room-tile .gv-uno__corner {
  top: 4px;
  left: 5px;
  font-size: 8px;
}

.room-tile .gv-uno__oval {
  font-size: 0.82rem;
}

.room-tile .gv-okey {
  width: 28px;
  height: 40px;
  font-size: 0.78rem;
}

.room-tile .gv-tank {
  width: 46px;
  height: 30px;
}

.room-tile .gv-tank::after {
  height: 6px;
}

.room-tile .gv-blast {
  width: 18px;
  height: 18px;
}

.room-tile .gv-canvas {
  width: 72px;
  height: 52px;
}

.room-tile .gv-pencil {
  width: 10px;
  height: 68px;
}

.room-tile .gv-scribble {
  width: 56px;
  height: 8px;
}

.room-tile__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}

.room-tile__id {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: baseline;
}

.room-tile__id span {
  color: var(--text-muted);
}

.room-tile__id code {
  color: var(--text);
}

.room-tile--uno .room-tile__mode {
  color: #dc2626;
}

.room-tile--okey .room-tile__mode {
  color: #0f766e;
}

.room-tile--tank .room-tile__mode {
  color: #475569;
}

@media (max-width: 1020px) {
  .game-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .game-card-grid,
  .game-lobby-hero {
    grid-template-columns: 1fr;
  }

  .game-card {
    min-height: 0;
  }

  .game-visual {
    min-height: 200px;
  }

  .join-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .room-tile {
    grid-template-columns: 1fr;
  }

  .room-tile > .game-visual {
    min-height: 135px;
  }
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(4, 8, 16, 0.55);
  backdrop-filter: blur(8px);
}

.auth-modal[hidden] {
  display: none !important;
}

.auth-modal__panel {
  position: relative;
  width: min(420px, 94vw);
  padding: 1.25rem 1.25rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 16, 28, 0.96);
  color: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.page-light .auth-modal__panel {
  background: rgba(255, 255, 255, 0.98);
  color: #111827;
  border-color: rgba(15, 23, 42, 0.12);
}

.auth-modal__close {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.7;
}

.auth-modal__panel h2 {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
}

.auth-modal__hint {
  margin: 0 0 0.85rem;
  font-size: 0.86rem;
  line-height: 1.45;
  opacity: 0.78;
}

.auth-modal__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.auth-modal__tab {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: transparent;
  color: inherit;
  padding: 0.45rem 0.65rem;
  font: 600 0.88rem/1.2 var(--font);
  cursor: pointer;
}

.page-light .auth-modal__tab {
  border-color: rgba(15, 23, 42, 0.12);
}

.auth-modal__tab.is-active {
  background: rgba(106, 136, 245, 0.22);
  border-color: rgba(106, 136, 245, 0.55);
}

.auth-modal__form {
  display: grid;
  gap: 0.65rem;
}

.auth-modal__field {
  display: grid;
  gap: 0.28rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.auth-modal__field input {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font: 500 0.92rem/1.2 var(--font);
}

.page-light .auth-modal__field input {
  border-color: rgba(15, 23, 42, 0.12);
  background: #f8fafc;
  color: #111827;
}

.auth-modal__divider {
  margin: 0.85rem 0 0.65rem;
  text-align: center;
  font-size: 0.78rem;
  opacity: 0.65;
}

.auth-modal__google {
  color: #f8faff;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
}

.auth-modal__google:hover {
  color: #ffffff;
  background: linear-gradient(165deg, #8ba4f8 0%, #5478eb 100%);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: 0 10px 28px rgba(106, 136, 245, 0.34);
  transform: translateY(-1px);
}

.page-light .auth-modal__google {
  color: #1e293b;
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.12);
}

.page-light .auth-modal__google:hover {
  color: #ffffff;
  background: linear-gradient(165deg, #7b96f7 0%, var(--accent-strong) 100%);
  border-color: rgba(106, 136, 245, 0.42);
  box-shadow: 0 10px 28px rgba(106, 136, 245, 0.28);
}

.user-chip--account {
  margin-right: 0.25rem;
}

.scores-page {
  max-width: 980px;
  margin: 0 auto;
}

.scores-page__hero {
  margin-bottom: 1.15rem;
  padding: clamp(1.1rem, 3vw, 1.45rem) clamp(1.15rem, 3vw, 1.5rem);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 50px rgba(28, 38, 82, 0.16);
}

.scores-page__kicker {
  margin-bottom: 0.55rem;
  color: #64748b;
}

.scores-page__title {
  margin-bottom: 0.65rem;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: #0f172a;
}

.scores-page__lead {
  margin: 0;
  max-width: 62ch;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #334155;
}

.page-light .scores-page__lead {
  color: #334155;
}

.scores-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
  padding: 0.45rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 36px rgba(28, 38, 82, 0.12);
}

.scores-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 4.6rem;
  padding: 0.65rem 0.45rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.scores-tab:hover:not(.is-active) {
  background: #ffffff;
  border-color: rgba(106, 136, 245, 0.28);
  color: #0f172a;
  transform: translateY(-1px);
}

.scores-tab__mark {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  position: relative;
}

.scores-tab__mark::after {
  content: "";
  position: absolute;
  inset: 0.45rem;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.55;
}

.scores-tab__label {
  font: 800 0.92rem/1.15 var(--font);
  letter-spacing: 0.01em;
}

.scores-tab__meta {
  font: 600 0.68rem/1.2 var(--font);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

.scores-tab.is-active {
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

.scores-tab.is-active .scores-tab__meta {
  color: rgba(255, 255, 255, 0.82);
}

.scores-tab.is-active .scores-tab__mark {
  background: rgba(255, 255, 255, 0.22);
}

.scores-tab.is-active .scores-tab__mark::after {
  background: #ffffff;
  opacity: 1;
}

.scores-tab--uno.is-active {
  background: linear-gradient(160deg, #ef4444 0%, #dc2626 100%);
}

.scores-tab--okey.is-active {
  background: linear-gradient(160deg, #f59e0b 0%, #d97706 100%);
}

.scores-tab--tank.is-active {
  background: linear-gradient(160deg, #22c55e 0%, #15803d 100%);
}

.scores-tab--draw.is-active {
  background: linear-gradient(160deg, #6366f1 0%, #4f46e5 100%);
}

.scores-tab--uno .scores-tab__mark {
  color: #ef4444;
}

.scores-tab--okey .scores-tab__mark {
  color: #f59e0b;
}

.scores-tab--tank .scores-tab__mark {
  color: #22c55e;
}

.scores-tab--draw .scores-tab__mark {
  color: #6366f1;
}

.scores-table-wrap {
  overflow: auto;
  padding: 0.35rem 0.5rem 0.65rem;
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(15, 23, 42, 0.08);
}

.page-light .scores-table-wrap {
  background: rgba(255, 255, 255, 0.96);
}

.scores-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  color: #0f172a;
}

.scores-table th,
.scores-table td {
  padding: 0.62rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.page-light .scores-table th,
.page-light .scores-table td {
  border-bottom-color: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.scores-table th {
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  opacity: 1;
}

@media (max-width: 720px) {
  .scores-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.scores-rank {
  width: 3rem;
  text-align: center;
  vertical-align: middle;
  font-weight: 700;
  color: #64748b;
}

.scores-rank--plain {
  font-variant-numeric: tabular-nums;
}

.scores-rank__trophy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.12));
}

.scores-rank__trophy--gold {
  color: #fbbf24;
}

.scores-rank__trophy--silver {
  color: #94a3b8;
}

.scores-rank__trophy--bronze {
  color: #d97706;
}
