﻿:root {
  --bg: #060606;
  --bg-soft: #0e0e0e;
  --panel: #151515;
  --panel-2: #1f1f1f;
  --line: #323232;
  --text: #f5f5f5;
  --muted: #b1b1b1;
  --accent: #ffffff;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 14px 38px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Sora", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.08), transparent 27%),
    radial-gradient(circle at 85% 18%, rgba(255, 255, 255, 0.06), transparent 30%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0px, rgba(255, 255, 255, 0.02) 2px, transparent 2px, transparent 8px),
    var(--bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

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

main {
  width: min(1180px, 92vw);
  margin: 2rem auto 4rem;
  display: grid;
  gap: 1.4rem;
}

.site-header {
  width: min(1180px, 92vw);
  margin: 1.1rem auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0.8rem;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid #444;
}

.brand span {
  font-family: "Oswald", sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
  padding: 0.55rem 0.7rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  transition: color 0.2s, background 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--accent);
  background: #232323;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 0.45rem 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.4rem;
  align-items: center;
  padding: 1.6rem;
  border-radius: var(--radius);
  background: linear-gradient(155deg, #101010, #0a0a0a);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.kicker {
  margin: 0;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
}

h1,
h2,
h3 {
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.03em;
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.05;
  margin-bottom: 0.8rem;
}

h2 {
  font-size: clamp(1.3rem, 2.3vw, 2rem);
  margin-bottom: 0.8rem;
}

h3 {
  font-size: 1.1rem;
}

.hero-copy p {
  margin: 0 0 1.2rem;
  color: var(--muted);
}

.hero-mark {
  justify-self: end;
}

.hero-mark img {
  width: min(420px, 100%);
  border-radius: 50%;
  border: 1px solid var(--line);
  box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.03);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.button {
  appearance: none;
  border: 1px solid var(--accent);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0.62rem 1.2rem;
  color: #090909;
  background: #f5f5f5;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.button:hover {
  transform: translateY(-2px);
  background: #ffffff;
}

.button-outline {
  color: var(--text);
  background: transparent;
}

.button-outline:hover {
  background: #1d1d1d;
}

.title-block,
.panel,
.metric-card,
.shop-card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--panel), #111);
}

.title-block,
.panel {
  padding: 1.3rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.metric-card {
  padding: 1.1rem;
}

.metric {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  margin: 0.2rem 0;
}

.metric-card span,
.table-note,
.player-card p,
.panel p,
.panel li,
.timeline span {
  color: var(--muted);
}

.season-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
}

.season-control label {
  font-weight: 600;
}

.season-control select {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0f0f0f;
  color: var(--text);
  font: inherit;
  padding: 0.45rem 0.6rem;
  min-width: 230px;
}

#player-stats-panel.is-hidden {
  display: none;
}

.stats-view-controls {
  margin-bottom: 1rem;
}

.dashboard-control-bar {
  justify-content: flex-start;
}

.dashboard-control-bar .table-note {
  flex-basis: 100%;
  margin: 0.1rem 0 0;
}

.player-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.team-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-hero {
  background:
    radial-gradient(ellipse at 85% 8%, rgba(56, 189, 248, 0.18), transparent 46%),
    radial-gradient(ellipse at 10% 92%, rgba(52, 211, 153, 0.12), transparent 42%),
    radial-gradient(ellipse at 52% 52%, rgba(251, 191, 36, 0.05), transparent 50%),
    linear-gradient(160deg, #181818, #0e0e0e);
}

.dashboard-stage {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 0.6rem;
  background: rgba(0, 0, 0, 0.52);
  min-height: 220px;
  overflow-x: auto;
}

.dashboard-stage svg {
  width: 100%;
  min-width: 740px;
  display: block;
}

.dashboard-legend {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.legend-item {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 0.6rem 0.7rem;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 0.4rem 0.5rem;
  align-items: center;
  transition: background 0.2s;
}

.legend-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.legend-item i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-item span {
  font-size: 0.82rem;
  color: #f0f0f0;
}

.legend-item strong {
  grid-column: 1 / -1;
  font-size: 0.77rem;
  color: #bcbcbc;
  font-weight: 600;
}

.player-graph-wrap {
  display: grid;
  gap: 0.6rem;
}

.player-graph-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 2.4fr 54px;
  gap: 0.6rem;
  align-items: center;
}

.player-graph-name {
  font-size: 0.9rem;
  color: #e8e8e8;
}

.player-graph-bar {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  overflow: hidden;
  min-height: 18px;
}

.player-graph-fill {
  display: block;
  height: 100%;
  min-height: 18px;
  transition: width 0.7s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.player-graph-value {
  text-align: right;
  color: #dfdfdf;
  font-weight: 600;
  font-size: 0.9rem;
}

.is-hidden {
  display: none !important;
}

#dashboard-empty-state {
  border-style: dashed;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.quick-links a {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  padding: 0.8rem;
  text-align: center;
  font-weight: 600;
  transition: background 0.2s;
}

.quick-links a:hover {
  background: #262626;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.cards-grid-single {
  grid-template-columns: minmax(0, 360px);
}

.player-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.95rem;
  background: linear-gradient(145deg, #1a1a1a, #131313);
}

.player-card h3 {
  margin-bottom: 0.45rem;
}

.player-card p {
  margin: 0.2rem 0;
  font-size: 0.92rem;
}

.formation h2 {
  margin: 0 0 1rem;
}

.pitch {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  background:
    linear-gradient(to right, transparent calc(50% - 1px), rgba(255, 255, 255, 0.16) calc(50% - 1px), rgba(255, 255, 255, 0.16) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(#121212, #0b0b0b);
  min-height: 560px;
  position: relative;
  overflow: hidden;
}

.pitch::before,
.pitch::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.pitch::before {
  top: 24%;
  width: 140px;
  height: 140px;
}

.pitch::after {
  bottom: 7%;
  width: 240px;
  height: 120px;
}

.pos {
  position: absolute;
  transform: translate(-50%, -50%);
  text-align: center;
  border: 1px solid #4c4c4c;
  border-radius: 10px;
  padding: 0.48rem 0.6rem;
  background: rgba(0, 0, 0, 0.78);
  font-weight: 700;
  font-size: 0.8rem;
  min-width: 118px;
}

.pos span {
  display: block;
  color: #bdbdbd;
  font-size: 0.72rem;
  margin-top: 0.15rem;
}

.st { top: 13%; left: 50%; }
.lw { top: 28%; left: 22%; }
.cdm { top: 30%; left: 50%; }
.rw { top: 28%; left: 78%; }
.lb { top: 50%; left: 20%; }
.cb { top: 55%; left: 50%; }
.rb { top: 50%; left: 80%; }
.gk { top: 83%; left: 50%; }

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

thead th {
  text-align: left;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  color: #d9d9d9;
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0.4rem;
}

tbody td {
  padding: 0.6rem 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #dfdfdf;
  font-size: 0.92rem;
}

.highlight-row td {
  background: rgba(255, 255, 255, 0.09);
  font-weight: 700;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.timeline li {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  background: #1a1a1a;
}

.timeline h3 {
  margin: 0 0 0.3rem;
}

.timeline p {
  margin: 0;
}

.merch-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shop-card {
  padding: 1.2rem;
}

.price {
  display: inline-block;
  margin-bottom: 0.8rem;
  font-weight: 700;
}

.qty-row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.qty-btn,
.qty-input {
  border: 1px solid var(--line);
  background: #0f0f0f;
  color: #fff;
  border-radius: 8px;
  height: 38px;
}

.qty-btn {
  width: 38px;
  font-size: 1.1rem;
  cursor: pointer;
}

.qty-input {
  width: 70px;
  padding: 0.3rem;
  text-align: center;
}

.cart-total {
  font-size: 1.15rem;
}

.contact-layout {
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 0.75rem;
}

.contact-form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.92rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.62rem;
  background: #0f0f0f;
  color: #f1f1f1;
  font: inherit;
}

.form-feedback {
  min-height: 1.2rem;
  font-size: 0.9rem;
}

.bars {
  display: grid;
  gap: 0.7rem;
}

.bar-item {
  display: grid;
  grid-template-columns: 85px 1fr 22px;
  gap: 0.5rem;
  align-items: center;
}

.bar {
  height: 12px;
  border-radius: 999px;
  background: #2a2a2a;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #fafafa, #bfbfbf);
}

.site-footer {
  width: min(1180px, 92vw);
  margin: 0 auto 1.2rem;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== STATISTICS DASHBOARD ===== */

.stats-title-block {
  background: linear-gradient(160deg, #141414, #0c0c0c);
  border-color: rgba(255, 255, 255, 0.07);
}

.stats-title-block h1 {
  background: linear-gradient(135deg, #ffffff 0%, #999 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.player-kpis .metric-card {
  display: flex;
  flex-direction: column;
  padding: 1.4rem;
  transition: transform 0.25s, box-shadow 0.25s;
}

.player-kpis .metric-card:hover {
  transform: translateY(-4px);
}

.kpi-icon {
  display: flex;
  align-items: center;
  margin-bottom: 0.7rem;
  color: var(--kpi-accent, #fff);
}

.kpi-label {
  font-size: 0.67rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.kpi-name {
  font-family: "Oswald", sans-serif;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  margin: 0 0 0.7rem;
  line-height: 1.1;
  color: var(--text);
  font-weight: 700;
}

.kpi-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.26rem 0.85rem;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  margin-top: auto;
  align-self: flex-start;
}

.kpi-gold {
  --kpi-accent: #fbbf24;
  border-color: rgba(251, 191, 36, 0.38);
  background: linear-gradient(155deg, #1c1503 0%, #111108 60%, #0d0d0d 100%);
  box-shadow: 0 0 32px rgba(251, 191, 36, 0.09), 0 14px 38px rgba(0, 0, 0, 0.4);
}
.kpi-gold .kpi-badge { background: rgba(251, 191, 36, 0.18); color: #fbbf24; }

.kpi-blue {
  --kpi-accent: #38bdf8;
  border-color: rgba(56, 189, 248, 0.38);
  background: linear-gradient(155deg, #03151e 0%, #060f16 60%, #0d0d0d 100%);
  box-shadow: 0 0 32px rgba(56, 189, 248, 0.09), 0 14px 38px rgba(0, 0, 0, 0.4);
}
.kpi-blue .kpi-badge { background: rgba(56, 189, 248, 0.18); color: #38bdf8; }

.kpi-green {
  --kpi-accent: #34d399;
  border-color: rgba(52, 211, 153, 0.38);
  background: linear-gradient(155deg, #03140d 0%, #060f09 60%, #0d0d0d 100%);
  box-shadow: 0 0 32px rgba(52, 211, 153, 0.09), 0 14px 38px rgba(0, 0, 0, 0.4);
}
.kpi-green .kpi-badge { background: rgba(52, 211, 153, 0.18); color: #34d399; }

.kpi-red {
  --kpi-accent: #f87171;
  border-color: rgba(248, 113, 113, 0.38);
  background: linear-gradient(155deg, #1a0505 0%, #110404 60%, #0d0d0d 100%);
  box-shadow: 0 0 32px rgba(248, 113, 113, 0.09), 0 14px 38px rgba(0, 0, 0, 0.4);
}
.kpi-red .kpi-badge { background: rgba(248, 113, 113, 0.18); color: #f87171; }

.dashboard-hero h2 {
  background: linear-gradient(135deg, #f5f5f5 0%, #666 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.dashboard-control-bar select {
  min-width: 145px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0c0c0c;
  color: var(--text);
  padding: 0.42rem 1.8rem 0.42rem 0.95rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23888' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  font-weight: 500;
  font-size: 0.88rem;
}

.dashboard-control-bar label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

#player-stats-panel {
  border-top: 2px solid rgba(56, 189, 248, 0.35);
}

#player-insights-panel {
  border-top: 2px solid rgba(52, 211, 153, 0.35);
}

.rank-num {
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.22);
  min-width: 28px;
  text-align: center;
}

tr.rank-1 .rank-num { color: #fbbf24; }
tr.rank-2 .rank-num { color: #94a3b8; }
tr.rank-3 .rank-num { color: #cd7f32; }
tr.rank-1 td:nth-child(2) { font-weight: 700; }

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-mark {
    justify-self: start;
    max-width: 250px;
  }

  .stats-grid,
  .quick-links,
  .cards-grid,
  .merch-grid,
  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 740px) {
  .site-header {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    margin-top: 0.35rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--line);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    border-radius: 10px;
    padding: 0.6rem;
  }

  .stats-grid,
  .quick-links,
  .cards-grid,
  .merch-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .dashboard-legend {
    grid-template-columns: 1fr;
  }

  .pitch {
    min-height: 670px;
  }

  .pos {
    min-width: 104px;
    font-size: 0.74rem;
  }

  .st { top: 11%; }
  .lw { top: 24%; left: 20%; }
  .cdm { top: 25%; left: 50%; }
  .rw { top: 24%; left: 80%; }
  .lb { top: 45%; left: 18%; }
  .cb { top: 50%; left: 50%; }
  .rb { top: 45%; left: 82%; }
  .gk { top: 79%; }

  .site-footer {
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-start;
  }
}
