:root {
  --bg: #071923;
  --bg-soft: #0d2635;
  --surface: rgba(9, 33, 47, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f3f8fb;
  --muted: #9fc0cf;
  --teal: #22c7a9;
  --lime: #d7ff5a;
  --gold: #ffbf47;
  --pink: #ff7db4;
  --danger: #ff8585;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  --bg-gradient:
    radial-gradient(circle at top left, rgba(34, 199, 169, 0.18), transparent 22%),
    radial-gradient(circle at 85% 10%, rgba(255, 191, 71, 0.2), transparent 20%),
    linear-gradient(160deg, #04131e 0%, #082130 48%, #0b3040 100%);
  --panel-blur: blur(16px);
}

html[data-theme="light"] {
  --bg: #eef5fb;
  --bg-soft: #dbeaf4;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: rgba(15, 41, 58, 0.08);
  --line: rgba(15, 41, 58, 0.10);
  --text: #163042;
  --muted: #567082;
  --teal: #0ea88f;
  --lime: #7ca300;
  --gold: #d99b1a;
  --pink: #d15f92;
  --danger: #d45c5c;
  --shadow: 0 26px 60px rgba(51, 83, 103, 0.18);
  --bg-gradient:
    radial-gradient(circle at top left, rgba(94, 181, 255, 0.20), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(255, 205, 107, 0.26), transparent 22%),
    linear-gradient(180deg, #f6fbff 0%, #e6f1f7 55%, #d5e7ef 100%);
  --panel-blur: blur(18px);
}

html[data-theme="nice"] {
  --bg: #fff7df;
  --bg-soft: #ffe8b3;
  --surface: rgba(255, 253, 243, 0.82);
  --surface-strong: rgba(98, 70, 17, 0.10);
  --line: rgba(107, 77, 23, 0.12);
  --text: #442c12;
  --muted: #7d6141;
  --teal: #1aa58f;
  --lime: #7aa611;
  --gold: #cf8612;
  --pink: #d36472;
  --danger: #c45d4d;
  --shadow: 0 28px 64px rgba(156, 111, 31, 0.18);
  --bg-gradient:
    radial-gradient(circle at top left, rgba(255, 208, 87, 0.35), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(103, 208, 190, 0.20), transparent 24%),
    linear-gradient(180deg, #fffdf4 0%, #fff1ca 52%, #ffe1a4 100%);
  --panel-blur: blur(18px);
}

html[data-theme="rain"] {
  --bg: #0e1725;
  --bg-soft: #13243a;
  --surface: rgba(17, 28, 46, 0.84);
  --surface-strong: rgba(213, 230, 255, 0.08);
  --line: rgba(177, 205, 235, 0.12);
  --text: #eef5ff;
  --muted: #aac0d8;
  --teal: #65bfe1;
  --lime: #b4ddff;
  --gold: #9ec1ff;
  --pink: #a0b4ff;
  --danger: #ff9f9f;
  --shadow: 0 30px 80px rgba(2, 8, 20, 0.42);
  --bg-gradient:
    radial-gradient(circle at top left, rgba(113, 172, 255, 0.18), transparent 24%),
    radial-gradient(circle at 78% 10%, rgba(148, 191, 255, 0.16), transparent 22%),
    linear-gradient(180deg, #08111d 0%, #122238 48%, #1a314e 100%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Outfit", sans-serif;
  background: var(--bg-gradient);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 8px 0 64px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}

.admin-menu {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.admin-submenu {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.admin-tab {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.admin-tab:hover {
  transform: translateY(-1px);
}

.admin-tab.active {
  background: linear-gradient(135deg, #d7ff5a 0%, #6effc8 100%);
  color: #062132;
  border-color: transparent;
  font-weight: 700;
}

.admin-focus-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 18px;
}

.page-title,
.auth-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.04em;
  font-size: clamp(32px, 5vw, 54px);
}

.auth-panel {
  width: min(560px, 100%);
}

.single-col {
  grid-template-columns: 1fr;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  align-items: center;
  padding: 6px 0 14px;
}

.hero-copy,
.panel,
.stat-card,
.glass-card,
.loading-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--panel-blur);
}

.hero-copy {
  padding: 16px 18px;
}

.hero h1,
.section-head h2,
.section-head h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.04em;
}

.hero h1 {
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.94;
  max-width: 10.5ch;
}

.hero-text,
.stat-card span,
.micro-copy,
.empty,
label,
input,
select,
textarea {
  color: var(--muted);
}

.hero-text {
  display: none;
}

.kicker,
.eyebrow,
.section-head p {
  margin: 0 0 10px;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  font-weight: 700;
}

.hero-actions,
.button-row,
.notice-row,
.meta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 10px;
}

.button {
  border: none;
  border-radius: 999px;
  cursor: pointer;
  padding: 13px 20px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: linear-gradient(135deg, #d7ff5a 0%, #6effc8 100%);
  color: #062132;
  font-weight: 700;
  box-shadow: 0 16px 28px rgba(193, 255, 78, 0.28);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.button.small {
  padding: 10px 14px;
}

.button.wide {
  width: 100%;
  justify-content: center;
}

.notice-row {
  margin-top: 10px;
}

.notice-pill,
.soft-badge,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.th-with-help {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.help-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(215, 255, 90, 0.16);
  color: var(--lime);
  font-size: 11px;
  font-weight: 700;
  cursor: help;
}

.notice-pill {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.notice-pill.weather {
  background: rgba(34, 199, 169, 0.12);
  border: 1px solid var(--line);
}

.notice-pill.success {
  background: rgba(34, 199, 169, 0.12);
  border: 1px solid rgba(34, 199, 169, 0.24);
}

.notice-pill.error {
  background: rgba(255, 133, 133, 0.14);
  color: #ffd3d3;
}

.inline-feedback {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.inline-feedback.success {
  background: rgba(34, 199, 169, 0.12);
  border-color: rgba(34, 199, 169, 0.24);
}

.inline-feedback.error {
  background: rgba(255, 133, 133, 0.14);
  border-color: rgba(255, 133, 133, 0.24);
}

.hero-visual {
  position: relative;
  min-height: 100%;
}

.hero-visual img {
  width: 100%;
  display: block;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 10px 12px;
  min-width: 132px;
}

.glass-card p,
.stat-card p {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
}

.glass-card strong,
.stat-card strong,
.podium-card strong {
  display: block;
  font-size: 20px;
  margin-top: 4px;
}

.stats-grid,
.two-col,
.podium-grid {
  display: grid;
  gap: 18px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  padding: 12px 14px;
  min-height: 96px;
}

.stat-card strong {
  font-size: 24px;
  margin: 6px 0 4px;
}

.section {
  margin-top: 18px;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  padding: 22px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.soft-badge {
  background: rgba(34, 199, 169, 0.12);
  color: var(--teal);
}

.theme-preview-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 18px;
  min-height: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(34, 199, 169, 0.12), transparent 55%),
    rgba(255, 255, 255, 0.03);
}

.theme-preview-card h3,
.theme-preview-card p {
  margin: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  color: var(--text);
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 2px),
    calc(100% - 16px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

option {
  background: var(--bg-soft);
  color: var(--text);
}

textarea {
  resize: vertical;
}

.chip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.chip {
  text-align: left;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.chip strong,
.chip span {
  display: block;
}

.chip span {
  margin-top: 4px;
  color: var(--muted);
}

.chip.active {
  background: linear-gradient(135deg, rgba(34, 199, 169, 0.24), rgba(215, 255, 90, 0.14));
  border-color: rgba(215, 255, 90, 0.45);
}

.table-wrap {
  overflow-x: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.pager-row {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.pager-copy {
  color: var(--muted);
  font-size: 13px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: normal;
  word-break: break-word;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.tag {
  background: rgba(255, 255, 255, 0.06);
}

.tag.member {
  color: #b8ffe6;
}

.tag.guest {
  color: #ffe3a6;
}

.pos {
  color: #9fffd8;
}

.neg {
  color: #ffb2b2;
}

.podium-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}

.podium-card {
  border-radius: 24px;
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(5, 18, 27, 0.82);
}

.rank-1 {
  background:
    radial-gradient(circle at top right, rgba(215, 255, 90, 0.3), transparent 40%),
    rgba(5, 18, 27, 0.82);
}

.rank-2 {
  background:
    radial-gradient(circle at top right, rgba(143, 211, 255, 0.25), transparent 42%),
    rgba(5, 18, 27, 0.82);
}

.rank-3 {
  background:
    radial-gradient(circle at top right, rgba(255, 125, 180, 0.25), transparent 42%),
    rgba(5, 18, 27, 0.82);
}

html[data-theme="light"] .podium-card,
html[data-theme="nice"] .podium-card {
  color: var(--text);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.64)),
    rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 36px rgba(51, 83, 103, 0.12);
}

html[data-theme="light"] .rank-1,
html[data-theme="nice"] .rank-1 {
  background:
    radial-gradient(circle at top right, rgba(255, 205, 107, 0.38), transparent 42%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(255, 247, 208, 0.92));
}

html[data-theme="light"] .rank-2,
html[data-theme="nice"] .rank-2 {
  background:
    radial-gradient(circle at top right, rgba(143, 211, 255, 0.34), transparent 44%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(225, 241, 255, 0.92));
}

html[data-theme="light"] .rank-3,
html[data-theme="nice"] .rank-3 {
  background:
    radial-gradient(circle at top right, rgba(255, 125, 180, 0.28), transparent 44%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(255, 232, 239, 0.92));
}

html[data-theme="light"] .podium-card p,
html[data-theme="light"] .podium-card span,
html[data-theme="nice"] .podium-card p,
html[data-theme="nice"] .podium-card span {
  color: var(--muted);
}

html[data-theme="light"] .podium-card strong,
html[data-theme="nice"] .podium-card strong {
  color: var(--text);
}

.podium-rank {
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--lime);
  font-weight: 700;
}

.podium-card h3,
.podium-card p,
.podium-card span {
  margin: 0;
}

.podium-card h3 {
  font-size: 18px;
  line-height: 1.08;
}

.podium-card p {
  margin-top: 2px;
  font-size: 11px;
}

.podium-card strong {
  margin-top: 6px;
  font-size: 20px;
}

.podium-card span:last-child {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.35;
}

.match-feed {
  display: grid;
  gap: 14px;
}

.match-showcase {
  display: grid;
  gap: 18px;
}

.match-card {
  border-radius: 22px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.match-card.scheduled {
  background:
    linear-gradient(135deg, rgba(34, 199, 169, 0.14), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
}

.match-card p,
.match-card h4 {
  margin: 0;
}

.match-card h4 {
  margin-top: 8px;
  font-size: 20px;
}

.meta-row {
  justify-content: space-between;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.recent-match-card {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
    var(--surface);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.09);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  transform-origin: center;
}

.recent-match-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.18);
  border-color: rgba(34, 199, 169, 0.22);
}

.recent-match-card:active {
  transform: translateY(-1px) scale(0.995);
}

.recent-match-header,
.recent-match-meta,
.match-side-list {
  padding-left: 10px;
  padding-right: 10px;
}

.recent-match-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.recent-match-copy p,
.recent-match-copy h3,
.match-team-copy strong,
.match-team-copy span,
.review-team-card strong,
.review-team-card span,
.review-detail-card p,
.review-detail-card strong {
  margin: 0;
}

.recent-match-copy p {
  color: var(--muted);
  font-size: 10px;
}

.recent-match-copy h3 {
  margin-top: 2px;
  font-size: clamp(12px, 1.5vw, 14px);
  line-height: 1.12;
  font-family: "Space Grotesk", sans-serif;
}

.round-icon-button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 180ms ease, background 180ms ease;
}

.round-icon-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
}

.round-icon-button:active {
  transform: scale(0.95);
}

.recent-match-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 5px;
  padding-bottom: 2px;
}

.match-code,
.match-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
}

.match-code {
  padding: 5px 8px;
  color: var(--teal);
  background: rgba(34, 199, 169, 0.08);
  border: 1px solid rgba(34, 199, 169, 0.32);
}

.match-status {
  padding: 5px 10px;
}

.match-status.done {
  color: #f6fff7;
  background: linear-gradient(135deg, #12c44f 0%, #0b9d3c 100%);
  box-shadow: 0 14px 28px rgba(18, 196, 79, 0.24);
}

.match-side-list {
  padding-top: 2px;
  padding-bottom: 3px;
}

.match-side-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
}

.match-side-row + .match-side-row {
  border-top: 1px solid var(--line);
}

.match-team-block {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.avatar-group.compact .avatar-bubble + .avatar-bubble,
.avatar-bubble + .avatar-bubble {
  margin-left: -10px;
}

.avatar-bubble {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.72);
  background: linear-gradient(135deg, rgba(215, 255, 90, 0.26), rgba(34, 199, 169, 0.28));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.avatar-bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-bubble.placeholder span {
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.match-team-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.match-team-copy strong {
  font-size: clamp(11px, 1.5vw, 13px);
  line-height: 1.2;
}

.match-team-copy span {
  color: var(--muted);
  font-size: 10px;
}

.match-side-list .match-team-copy span {
  display: none;
}

.match-score-box {
  min-width: 32px;
  min-height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.match-score-box.winner {
  background: rgba(121, 230, 149, 0.14);
  color: #0d9a4b;
  box-shadow: inset 0 0 0 1px rgba(18, 196, 79, 0.28);
}

.match-score-box.loser {
  background: rgba(255, 255, 255, 0.06);
}

.recent-match-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.footer-action {
  border: none;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-size: 11px;
  transition: background 180ms ease;
}

.footer-action:last-child {
  border-right: none;
}

.footer-action:hover {
  background: rgba(255, 255, 255, 0.05);
}

.player-history-stack {
  display: grid;
  gap: 12px;
}

.personal-history-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 15px;
  border-radius: 18px;
  border: 1px solid rgba(107, 138, 255, 0.2);
  background:
    radial-gradient(circle at top right, rgba(118, 138, 255, 0.16), transparent 38%),
    linear-gradient(160deg, rgba(70, 102, 230, 0.16), rgba(40, 66, 154, 0.10));
}

.personal-history-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.personal-history-head strong,
.personal-history-head span,
.personal-history-top p,
.personal-history-card strong,
.personal-history-meta span {
  margin: 0;
}

.personal-history-head strong {
  display: block;
  font-size: 17px;
}

.personal-history-head span {
  color: var(--muted);
  font-size: 12px;
}

.personal-history-list {
  display: grid;
  gap: 10px;
}

.personal-history-card {
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(119, 136, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(93, 121, 255, 0.10), rgba(93, 121, 255, 0.04)),
    rgba(255, 255, 255, 0.03);
}

.personal-history-card.win {
  border-color: rgba(34, 199, 169, 0.18);
  background:
    linear-gradient(180deg, rgba(34, 199, 169, 0.12), rgba(34, 199, 169, 0.04)),
    rgba(255, 255, 255, 0.03);
}

.personal-history-card.loss {
  border-color: rgba(107, 138, 255, 0.18);
}

.personal-history-top,
.personal-history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.personal-history-top p {
  color: var(--muted);
  font-size: 11px;
}

.personal-history-card strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.3;
}

.personal-history-meta {
  margin-top: 8px;
  flex-wrap: wrap;
}

.personal-history-meta span,
.personal-result {
  font-size: 12px;
}

.footer-action:active {
  background: rgba(255, 255, 255, 0.09);
}

.footer-action:disabled {
  opacity: 0.65;
  cursor: wait;
}

.footer-action.review .action-icon {
  color: #ff8ba9;
}

.action-icon {
  font-size: 17px;
  font-weight: 700;
}

.compact-result-card {
  padding: 14px 16px;
  border-radius: 18px;
}

.compact-result-card p {
  font-size: 12px;
}

.compact-result-card h4 {
  margin-top: 6px;
  font-size: 16px;
  line-height: 1.25;
}

.compact-result-card .meta-row {
  margin-top: 8px;
  font-size: 12px;
}

.result-editor-grid {
  display: grid;
  gap: 16px;
}

.result-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.result-team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.result-team-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.result-team-card h4 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.result-score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.result-score-vs {
  align-self: center;
  justify-self: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding-bottom: 12px;
}

.result-editor-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.result-editor-actions .button {
  min-width: 160px;
}

.result-save-pill {
  align-self: center;
}

.avatar-settings-card {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.avatar-settings-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar-settings-actions {
  display: grid;
  gap: 10px;
}

.avatar-preview {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.avatar-preview.large {
  width: 72px;
  height: 72px;
}

.avatar-preview img,
.table-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.table-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.table-avatar.placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.review-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(3, 12, 21, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.review-modal-card {
  width: min(760px, 100%);
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 26px;
}

.review-modal-head,
.review-summary-row,
.review-score-grid,
.review-detail-grid {
  display: flex;
  gap: 14px;
}

.review-modal-head {
  align-items: center;
  justify-content: space-between;
}

.review-modal-head h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(26px, 4vw, 34px);
}

.review-summary-row {
  flex-wrap: wrap;
  margin-top: 18px;
}

.review-score-grid {
  align-items: center;
  margin-top: 22px;
}

.review-team-card,
.review-detail-card {
  flex: 1;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  padding: 18px;
}

.review-team-card {
  display: grid;
  gap: 10px;
}

.review-team-card b {
  font-size: 38px;
  line-height: 1;
}

.review-team-card span,
.review-detail-card p {
  color: var(--muted);
}

.review-versus {
  font-family: "Space Grotesk", sans-serif;
  font-size: 28px;
  color: var(--muted);
}

.review-detail-grid {
  margin-top: 18px;
}

.review-detail-card strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

html[data-theme="light"] .recent-match-card,
html[data-theme="nice"] .recent-match-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.82)),
    rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] .round-icon-button,
html[data-theme="nice"] .round-icon-button {
  background: rgba(15, 41, 58, 0.06);
}

html[data-theme="light"] select,
html[data-theme="nice"] select,
html[data-theme="rain"] select,
html[data-theme="dark"] select {
  color: var(--text);
}

html[data-theme="light"] .match-score-box.loser,
html[data-theme="nice"] .match-score-box.loser {
  background: rgba(15, 41, 58, 0.05);
  color: var(--muted);
}

.pairing-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

.pairing-player-pool,
.validation-list,
.schedule-slot-grid {
  display: grid;
  gap: 14px;
}

.pairing-player-pool {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.pool-player {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.05)),
    rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 18px;
  padding: 13px 15px;
  text-align: left;
  display: grid;
  gap: 4px;
  cursor: pointer;
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.pool-player:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.10),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.pool-player strong,
.pool-player span,
.slot-player-card strong,
.slot-player-card span,
.validation-card strong,
.validation-card span,
.team-column h3 {
  margin: 0;
}

.pool-player span {
  color: var(--muted);
}

.pool-player.active {
  border-color: rgba(215, 255, 90, 0.55);
  background:
    linear-gradient(135deg, rgba(215, 255, 90, 0.22), rgba(34, 199, 169, 0.18)),
    rgba(255, 255, 255, 0.05);
  box-shadow:
    0 12px 24px rgba(101, 218, 173, 0.12),
    inset 0 0 0 1px rgba(215, 255, 90, 0.16);
}

.pool-player.assigned {
  opacity: 0.5;
  box-shadow: none;
}

.validation-card {
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  gap: 6px;
}

.validation-card span {
  color: var(--muted);
}

.validation-card.ok {
  box-shadow: inset 0 0 0 1px rgba(121, 230, 149, 0.22);
}

.validation-card.bad {
  box-shadow: inset 0 0 0 1px rgba(255, 133, 133, 0.25);
}

.schedule-slot-grid {
  margin-top: 18px;
}

.schedule-slot-card {
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  padding: 20px;
}

.schedule-slot-head,
.team-board {
  display: grid;
  gap: 14px;
}

.slot-card-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.backup-badge {
  background: rgba(255, 191, 71, 0.14);
  color: var(--gold);
}

.schedule-slot-head {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.team-board {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 14px 0;
}

.team-column {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(6, 20, 31, 0.34), rgba(6, 20, 31, 0.22)),
    rgba(255, 255, 255, 0.015);
}

.team-column h3 {
  margin-bottom: 12px;
  font-family: "Space Grotesk", sans-serif;
  padding: 0 2px;
}

.team-player-slot {
  margin-bottom: 12px;
  padding: 4px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.015);
}

.slot-player-card {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(215, 255, 90, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.08)),
    rgba(255, 255, 255, 0.06);
  padding: 12px 14px;
  display: grid;
  gap: 4px;
  min-height: 68px;
  align-content: center;
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.10),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  cursor: grab;
}

.slot-player-card strong {
  font-size: 14px;
}

.slot-player-card span {
  font-size: 11px;
  color: var(--muted);
}

.slot-player-card.empty {
  color: var(--muted);
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.02);
  cursor: pointer;
}

.slot-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
}

.quarter-select {
  min-width: 160px;
}

.loading-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-card {
  padding: 32px 36px;
  text-align: center;
}

.spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--lime);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1100px) {
  .hero,
  .two-col,
  .pairing-layout,
  .admin-focus-grid,
  .stats-grid,
  .podium-grid {
    grid-template-columns: 1fr;
  }

  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 1280px);
  }

  .hero-copy,
  .panel,
  .stat-card {
    padding: 22px;
  }

  .glass-card {
    position: static;
    margin-top: 14px;
  }

  .form-grid,
  .chip-grid,
  .pairing-player-pool,
  .schedule-slot-head,
  .team-board {
    grid-template-columns: 1fr;
  }

  .result-meta-grid,
  .result-team-grid {
    grid-template-columns: 1fr;
  }

  .result-score-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .result-score-vs {
    justify-self: flex-start;
    padding-bottom: 0;
  }

  .result-editor-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .result-editor-actions .button {
    width: 100%;
    min-width: 0;
  }

  .result-save-pill {
    width: 100%;
    justify-content: center;
  }

  .admin-menu {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: none;
    font-size: 46px;
  }

  .table-wrap {
    overflow: visible;
    border: none;
    background: transparent;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 12px;
  }

  tbody tr {
    padding: 10px 12px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
  }

  td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    white-space: normal;
    text-align: right;
  }

  td:last-child {
    border-bottom: none;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: left;
    flex: 0 0 45%;
  }

  .notice-pill.weather {
    width: 100%;
  }

  .recent-match-header,
  .recent-match-meta,
  .match-side-list {
    padding-left: 16px;
    padding-right: 16px;
  }

  .recent-match-header {
    align-items: flex-start;
  }

  .match-side-row {
    align-items: flex-start;
  }

  .match-team-block {
    align-items: flex-start;
    gap: 12px;
  }

  .match-team-copy strong {
    font-size: 19px;
  }

  .avatar-bubble {
    width: 42px;
    height: 42px;
  }

  .match-score-box {
    min-width: 52px;
    min-height: 52px;
    font-size: 28px;
  }

  .review-modal-card {
    padding: 18px;
  }

  .review-score-grid,
  .review-detail-grid {
    flex-direction: column;
  }

  .review-versus {
    align-self: center;
  }

  .avatar-settings-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-wrap.compact-mobile {
    overflow-x: auto;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
  }

  .compact-mobile table {
    display: table;
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
  }

  .compact-mobile thead {
    display: table-header-group;
  }

  .compact-mobile tbody {
    display: table-row-group;
  }

  .compact-mobile tr {
    display: table-row;
  }

  .compact-mobile th,
  .compact-mobile td {
    display: table-cell;
    width: auto;
    padding: 10px 8px;
    white-space: nowrap;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .compact-mobile td::before {
    content: none;
  }

  .compact-mobile tbody tr {
    padding: 0;
    border-radius: 0;
    border: none;
    background: transparent;
  }

  .leaderboard-table th:nth-child(4),
  .leaderboard-table td:nth-child(4),
  .leaderboard-table th:nth-child(5),
  .leaderboard-table td:nth-child(5),
  .leaderboard-table th:nth-child(6),
  .leaderboard-table td:nth-child(6),
  .leaderboard-table th:nth-child(7),
  .leaderboard-table td:nth-child(7),
  .leaderboard-table th:nth-child(8),
  .leaderboard-table td:nth-child(8),
  .leaderboard-table th:nth-child(9),
  .leaderboard-table td:nth-child(9) {
    display: none;
  }

  .leaderboard-table th:nth-child(1),
  .leaderboard-table td:nth-child(1) {
    width: 16%;
  }

  .leaderboard-table th:nth-child(2),
  .leaderboard-table td:nth-child(2) {
    width: 40%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .leaderboard-table th:nth-child(3),
  .leaderboard-table td:nth-child(3),
  .leaderboard-table th:nth-child(10),
  .leaderboard-table td:nth-child(10) {
    width: 22%;
    text-align: right;
  }

  .penalty-table th:nth-child(4),
  .penalty-table td:nth-child(4) {
    display: table-cell;
    width: 22%;
    text-align: right;
  }

  .penalty-table th:nth-child(1),
  .penalty-table td:nth-child(1) {
    width: 14%;
  }

  .penalty-table th:nth-child(2),
  .penalty-table td:nth-child(2) {
    width: 36%;
  }

  .penalty-table th:nth-child(3),
  .penalty-table td:nth-child(3) {
    width: 25%;
    text-align: right;
  }
}
