/* =========================================================
   Qaz Liqası — style.css (minimalist)
   ========================================================= */

:root {
  --bg: #f7f4ed;
  --bg-accent: #efe9dc;
  --surface: #ffffff;
  --border: #e6e0d3;
  --ink: #1f1c17;
  --muted: #7a7466;
  --brand: #4a1259;           /* loqo bənövşəyisi */
  --accent: #4a1259;
  --accent-soft: #f1e6f5;
  --gold: #e9b93a;
  --gold-soft: #fff6d6;
  --silver: #b9bec7;
  --silver-soft: #f1f3f6;
  --bronze: #cf8a4e;
  --bronze-soft: #f9ebdd;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(31, 28, 23, 0.08);
  --shadow-lg: 0 24px 48px rgba(31, 28, 23, 0.12);
  --font: "Baloo 2", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 50% -200px, var(--bg-accent), transparent 70%),
    var(--bg);
  min-height: 100vh;
}

/* ---------- Konteyner ---------- */
.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

/* ---------- Başlıq ---------- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 18px;
}
.logo-goose {
  width: 84px;
  height: 84px;
  display: block;
  transition: transform 0.3s ease;
}
.logo:hover .logo-goose { transform: rotate(-6deg) scale(1.06); }
.header h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.5px;
  color: var(--brand);
}
.header h1::after {
  content: ".";
  color: var(--accent);
}
.tagline {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
}
.season-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.season-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}
.season-value {
  font-size: 1.15rem;
  font-weight: 700;
}

/* ---------- Podium ---------- */
.podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 16px;
  align-items: end;
  margin-bottom: 32px;
}

.player {
  position: relative;
  text-align: center;
  padding: 32px 18px 26px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.player:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.player:hover .avatar svg,
.player:hover .avatar img {
  transform: rotate(-8deg) scale(1.06);
}

.rank-1 {
  padding-top: 44px;
  padding-bottom: 36px;
  border-color: var(--gold);
  box-shadow: var(--shadow), 0 0 0 4px var(--gold-soft);
}

/* Sıra nişanı */
.rank-badge {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 800;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--border);
}
.rank-1 .rank-badge { background: var(--gold);   border-color: var(--gold); }
.rank-2 .rank-badge { background: var(--silver-soft); border-color: var(--silver); }
.rank-3 .rank-badge { background: var(--bronze-soft); border-color: var(--bronze); }

.crown-float {
  position: absolute;
  top: -6px;
  right: 18px;
  font-size: 1.7rem;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-10deg); }
  50%      { transform: translateY(-5px) rotate(6deg); }
}

/* Avatar */
.avatar {
  width: 124px;
  height: 124px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--silver-soft);
  overflow: hidden;
}
.rank-1 .avatar { width: 148px; height: 148px; background: var(--gold-soft); }
.rank-2 .avatar { background: var(--silver-soft); }
.rank-3 .avatar { background: var(--bronze-soft); }

.avatar svg {
  width: 84%;
  height: 84%;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 3px 4px rgba(31, 28, 23, 0.15));
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.name {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
}
.rank-1 .name { font-size: 1.8rem; }

.nickname {
  margin: 2px 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.points {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 18px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.points-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
}
.rank-1 .points {
  background: var(--accent-soft);
  border-color: transparent;
}
.rank-1 .points-value {
  font-size: 2.6rem;
  color: var(--accent);
}
.points-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  font-weight: 600;
}

/* ---------- Cədvəl ---------- */
.table-wrap {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.05rem;
}
.table th, .table td {
  padding: 16px 22px;
  text-align: left;
}
.table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.table tbody tr + tr { border-top: 1px solid var(--border); }
.table tbody tr { transition: background 0.2s ease; }
.table tbody tr:hover { background: var(--bg); }
.table tbody td.col-player { font-weight: 700; }

.col-rank { width: 70px; }
.col-points {
  width: 90px;
  text-align: right !important;
  font-weight: 800;
  font-size: 1.25rem;
}

.pill {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--ink);
}
.pill-gold   { background: var(--gold); }
.pill-silver { background: var(--silver-soft); border: 2px solid var(--silver); }
.pill-bronze { background: var(--bronze-soft); border: 2px solid var(--bronze); }

/* ---------- Footer ---------- */
.footer {
  margin-top: 40px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}
.footer p { margin: 6px 0; }
.honk {
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 3px;
}

/* ---------- Mobil: kompakt, bir ekrana sığan ---------- */
@media (max-width: 640px) {
  /* Məzmun ekrandan qısa olanda şaquli mərkəzdə dursun */
  .container {
    padding: 18px 14px 24px;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* Başlıq */
  .header {
    margin-bottom: 22px;
    gap: 10px;
    flex-wrap: nowrap;
  }
  .logo { gap: 10px; }
  .logo-goose { width: 52px; height: 52px; }
  .header h1 { font-size: 1.7rem; }
  .tagline { font-size: 0.74rem; margin-top: 2px; }
  .season-badge {
    flex-shrink: 0;
    align-items: center;
    padding: 5px 10px;
    border-radius: 10px;
  }
  .season-label { font-size: 0.55rem; letter-spacing: 1px; }
  .season-value { font-size: 0.85rem; line-height: 1.1; }
  .tagline { white-space: nowrap; }

  /* Podium: üfüqi sətirlər */
  .podium {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 16px;
  }
  .rank-1 { order: 1; }
  .rank-2 { order: 2; }
  .rank-3 { order: 3; }

  .player,
  .rank-1 {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "avatar name points"
      "avatar nick points";
    align-items: center;
    column-gap: 14px;
    text-align: left;
    padding: 12px 14px 12px 12px;
    border-radius: 16px;
    margin: 0;
  }
  .rank-1 { box-shadow: var(--shadow), 0 0 0 3px var(--gold-soft); }

  .rank-badge {
    top: -9px;
    left: 10px;
    transform: none;
    width: 22px; height: 22px;
    font-size: 0.72rem;
    border-width: 1.5px;
  }
  .crown-float {
    top: -10px;
    right: 10px;
    font-size: 1.1rem;
  }

  .avatar,
  .rank-1 .avatar {
    grid-area: avatar;
    width: 58px; height: 58px;
    margin: 0;
  }
  .rank-1 .avatar { width: 66px; height: 66px; }
  .avatar svg { width: 88%; height: 88%; }

  .name,
  .rank-1 .name {
    grid-area: name;
    font-size: 1.1rem;
    align-self: end;
    line-height: 1.15;
  }
  .rank-1 .name { font-size: 1.25rem; }

  .nickname {
    grid-area: nick;
    margin: 0;
    font-size: 0.78rem;
    align-self: start;
  }

  .points {
    grid-area: points;
    padding: 4px 12px;
    gap: 4px;
  }
  .points-value,
  .rank-1 .points-value { font-size: 1.4rem; }
  .rank-1 .points-value { font-size: 1.7rem; }
  .points-label { font-size: 0.65rem; letter-spacing: 1px; }

  /* Cədvəl */
  .table { font-size: 0.92rem; }
  .table th, .table td { padding: 10px 14px; }
  .table thead th { font-size: 0.62rem; letter-spacing: 1.5px; }
  .col-rank { width: 50px; }
  .col-points { font-size: 1.05rem; }
  .pill { width: 24px; height: 24px; font-size: 0.75rem; }

  /* Footer */
  .footer { margin-top: 18px; font-size: 0.78rem; }
  .footer p { margin: 3px 0; }
}

/* =========================================================
   Loqo keçid kimi
   ========================================================= */
a.logo {
  color: inherit;
  text-decoration: none;
}

/* =========================================================
   Cədvəl: statistika sütunları
   ========================================================= */
.col-stat {
  text-align: center !important;
  width: 56px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.table thead th.col-stat { text-align: center; }
.gd-pos { color: #2f8a4c; font-weight: 700; }
.gd-neg { color: #c2453a; font-weight: 700; }

/* ---------- Nəticələr keçidi (cədvəlin altında) ---------- */
.results-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-top: 1px solid var(--border);
  background: linear-gradient(90deg, var(--accent-soft), var(--surface) 70%);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.2s ease;
}
.results-link:hover { background: var(--accent-soft); }
.results-link-icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 1.3rem;
  flex-shrink: 0;
}
.results-link-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  flex: 1;
}
.results-link-text strong {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand);
}
.results-link-text small {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}
.results-link-arrow {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--brand);
  transition: transform 0.2s ease;
}
.results-link:hover .results-link-arrow { transform: translateX(4px); }

/* =========================================================
   Nəticələr səhifəsi
   ========================================================= */
.results-head {
  margin-bottom: 28px;
}
.back-link {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 8px;
  transition: color 0.2s ease;
}
.back-link:hover { color: var(--brand); }
.results-title {
  margin: 0;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 800;
  line-height: 1;
  color: var(--brand);
}
.results-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 500;
}

/* Oyun günü */
.matchday + .matchday { margin-top: 32px; }
.matchday-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  font-weight: 700;
}
.matchday-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

.match-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Oyun kartı */
.match {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas:
    "home score away"
    "tag  tag   tag";
  align-items: center;
  column-gap: 18px;
  padding: 20px 24px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.match:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.side {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.side.home { grid-area: home; justify-self: end; }
.side.away { grid-area: away; justify-self: start; flex-direction: row-reverse; }

.side-avatar {
  width: 56px; height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--silver-soft);
  border: 3px solid transparent;
  font-weight: 800;
  color: var(--muted);
  transition: transform 0.3s ease;
}
.side-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.match:hover .side-avatar { transform: rotate(-6deg) scale(1.05); }

.side-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side.won .side-name { color: var(--ink); font-weight: 800; }
.side.won .side-avatar {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.is-draw .side-name { color: var(--ink); }

.score {
  grid-area: score;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 18px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.goal {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--muted);
  min-width: 1.2ch;
  text-align: center;
}
.goal.win { color: var(--accent); }
.is-draw .goal { color: var(--ink); }
.score-sep {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--muted);
}

.match-tag {
  grid-area: tag;
  justify-self: center;
  margin-top: 10px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: var(--brand);
}
.is-draw .match-tag { color: var(--muted); }

/* Boş vəziyyət */
.empty {
  text-align: center;
  padding: 56px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px dashed var(--border);
}
.empty-goose {
  font-size: 3.2rem;
  line-height: 1;
  margin-bottom: 12px;
  animation: bob 2.4s ease-in-out infinite;
  display: inline-block;
}
.empty-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--brand);
}
.empty-text {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- Mobil ---------- */
@media (max-width: 640px) {
  .col-wdl { display: none; }
  .col-stat { width: 40px; }
  .table th.col-stat, .table td.col-stat { padding-left: 6px; padding-right: 6px; }

  .results-link { padding: 12px 14px; gap: 12px; }
  .results-link-icon { width: 36px; height: 36px; font-size: 1.05rem; }
  .results-link-text strong { font-size: 1rem; }
  .results-link-text small { font-size: 0.75rem; }

  .results-head { margin-bottom: 18px; }
  .matchday + .matchday { margin-top: 22px; }
  .match-list { gap: 10px; }

  .match {
    column-gap: 10px;
    padding: 14px 12px 12px;
    border-radius: 16px;
  }
  .side { flex-direction: column !important; gap: 6px; justify-self: center !important; }
  .side-avatar { width: 48px; height: 48px; }
  .side-name { font-size: 0.95rem; max-width: 100px; }
  .score { padding: 4px 12px; gap: 6px; }
  .goal { font-size: 1.6rem; }
  .score-sep { font-size: 1.1rem; }
  .match-tag { font-size: 0.62rem; margin-top: 8px; }

  .empty { padding: 36px 16px; }
  .empty-goose { font-size: 2.4rem; }
  .empty-title { font-size: 1.15rem; }
}

/* Nəticələr səhifəsi mobildə yuxarıdan başlasın (siyahı uzana bilər) */
@media (max-width: 640px) {
  .results-page .container { justify-content: flex-start; }
}
