/* ==========================================================================
   MMO11 — DOSTLUK TURNUVASI PAGE (hub view #hubViewFriendlyCup) — on the event page base (eventPage.css)
   Hero (night stadium, gold trophy, round stepper, Kurallar button) · left: lobby / bracket · right: prize ladder.
   Text colours are set explicitly on every surface (dark text on white cards, light text on the dark hero).
   ========================================================================== */
#friendlyCupPage {
  --fc-gold: #f6c343;
  --fc-gold-2: #ffdf7e;
  --fc-gold-dark: #a86b12;
  --fc-night: #0b1a2e;
  --fc-pitch: #0f5132;
  --fc-silver: #cbd5e1;
  --fc-bronze: #d08a4f;
}

/* ---------------------------------------------------------------- hero */
.fc-hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 16px 22px 14px;
  color: #f8fafc;
  background:
    radial-gradient(120% 140% at 15% 0%, rgba(246, 195, 67, 0.28) 0%, rgba(246, 195, 67, 0) 45%),
    radial-gradient(90% 120% at 100% 0%, rgba(56, 189, 248, 0.18) 0%, rgba(56, 189, 248, 0) 50%),
    linear-gradient(135deg, #0b1a2e 0%, #0f2d3f 55%, #0f5132 100%);
  border: 1px solid rgba(246, 195, 67, 0.35);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fc-hero::after {   /* pitch lines */
  content: "";
  position: absolute; inset: auto -10% -60% 40%;
  height: 160%;
  border: 2px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
}
.fc-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; z-index: 1; }
.fc-back { flex: 0 0 auto; }
.fc-hero-main { display: flex; align-items: center; gap: 18px; position: relative; z-index: 1; }
.fc-trophy {
  flex: 0 0 auto; width: 92px; height: 92px; border-radius: 24px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, rgba(255, 223, 126, 0.35), rgba(255, 223, 126, 0) 70%), rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 223, 126, 0.35);
}
.fc-trophy svg { width: 66px; height: 66px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45)); }
.fc-hero-text { flex: 1; min-width: 0; }
.fc-kicker { display: block; font-size: 13px; font-weight: 800; letter-spacing: 0.14em; color: var(--fc-gold-2); }
.fc-hero-title { margin: 2px 0 2px; font-size: 34px; line-height: 1.05; font-weight: 900; color: #ffffff; text-shadow: 0 3px 12px rgba(0, 0, 0, 0.4); }
.fc-hero-lead { margin: 0; font-size: 16px; color: #cbd5e1; }
.fc-hero-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.fc-hero-pill {
  padding: 7px 14px; border-radius: 999px; font-size: 15px; font-weight: 700; white-space: nowrap;
  color: #f8fafc; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16);
}
.fc-hero-pill b { color: var(--fc-gold-2); font-size: 17px; }
.fc-rules-btn { cursor: pointer; font-family: inherit; color: #0b1a2e; background: linear-gradient(180deg, #ffe08a, #f6c343); border-color: #e0a21e; font-weight: 800; }
.fc-rules-btn.on { color: #f8fafc; background: rgba(255, 255, 255, 0.14); border-color: var(--fc-gold); }
.fc-hero-pill.live { color: #052e16; background: linear-gradient(90deg, #4ade80, #22c55e); border-color: #16a34a; }

/* the round stepper */
.fc-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; position: relative; z-index: 1; }
.fc-steps li {
  flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 7px 10px; border-radius: 12px; font-size: 14px; font-weight: 700;
  color: #94a3b8; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08);
}
.fc-step-dot {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 900; color: #0b1a2e; background: #475569;
}
.fc-step-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-steps li.done { color: #bbf7d0; }
.fc-steps li.done .fc-step-dot { background: #22c55e; color: #052e16; }
.fc-steps li.now { color: #0b1a2e; background: linear-gradient(90deg, var(--fc-gold-2), var(--fc-gold)); border-color: var(--fc-gold); box-shadow: 0 4px 14px rgba(246, 195, 67, 0.35); }
.fc-steps li.now .fc-step-dot { background: #0b1a2e; color: var(--fc-gold-2); }

/* ---------------------------------------------------------------- layout + cards */
.fc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 14px; align-items: start; }
.fc-main, .fc-aside { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fc-card {
  background: #ffffff; color: #1f2937; border-radius: 18px; padding: 16px 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25); border: 1px solid #e8eef5;
}
.fc-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.fc-card-head h3 { margin: 0; font-size: 20px; font-weight: 900; color: #0f172a; }
.fc-sub { font-size: 14px; color: #64748b; font-weight: 600; }
.fc-count { font-size: 16px; color: #475569; }
.fc-count b { font-size: 22px; color: #0f172a; }

/* buttons */
.fc-btn {
  border: 0; cursor: pointer; font-family: inherit; font-weight: 800; font-size: 19px;
  padding: 13px 30px; border-radius: 14px; transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.fc-btn:active { transform: scale(0.97); }
.fc-btn:disabled { cursor: default; background: #cbd5e1 !important; color: #475569 !important; box-shadow: none !important; }
.fc-btn.gold { color: #3b2503; background: linear-gradient(180deg, #ffe08a 0%, #f6c343 55%, #e0a21e 100%); box-shadow: 0 8px 20px rgba(224, 162, 30, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
.fc-btn.green { color: #ffffff; background: linear-gradient(180deg, #34d399, #16a34a); box-shadow: 0 6px 14px rgba(22, 163, 74, 0.35); }
.fc-btn.ghost { color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; }
.fc-btn.sm { font-size: 14px; padding: 5px 14px; border-radius: 10px; }

/* ---------------------------------------------------------------- lobby */
.fc-meter { height: 10px; border-radius: 999px; background: #e2e8f0; overflow: hidden; margin-bottom: 14px; }
.fc-meter i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #22c55e, #84cc16); transition: width 0.4s ease; }
.fc-seats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fc-seat {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc, #eef4fb); border: 1px solid #dbe5f0; color: #0f172a;
}
.fc-seat-crest {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 900; font-size: 15px; color: #ffffff; background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
  box-shadow: 0 4px 10px rgba(29, 78, 216, 0.3);
}
.fc-seat-name { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-seat.mine { background: linear-gradient(180deg, #fff8e6, #ffefc2); border-color: #f6c343; }
.fc-seat.mine .fc-seat-crest { background: linear-gradient(135deg, #e0a21e, #f6c343); color: #3b2503; }
.fc-seat.empty { background: #ffffff; border: 2px dashed #cbd5e1; color: #94a3b8; }
.fc-seat.empty .fc-seat-crest { background: #f1f5f9; color: #94a3b8; box-shadow: none; }
.fc-fill { margin: 12px 0 0; padding: 8px 12px; border-radius: 10px; background: #fff7e6; color: #8a4b00; font-size: 15px; font-weight: 600; }
.fc-lobby-foot { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fc-lobby-foot p { margin: 0; font-size: 15px; color: #475569; max-width: 520px; }

/* ---------------------------------------------------------------- result banner */
.fc-result { display: flex; align-items: center; gap: 16px; }
.fc-result-rank {
  flex: 0 0 auto; min-width: 96px; padding: 12px 14px; border-radius: 14px; text-align: center;
  font-size: 20px; font-weight: 900; color: #0f172a; background: linear-gradient(180deg, #f1f5f9, #e2e8f0);
}
.fc-result-rank.live { color: #052e16; background: linear-gradient(180deg, #bbf7d0, #4ade80); }
.fc-result.champ .fc-result-rank { color: #3b2503; background: linear-gradient(180deg, #ffe08a, #f6c343); }
.fc-result-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fc-result-text b { font-size: 19px; color: #0f172a; }
.fc-result-text span { font-size: 15px; color: #475569; }

/* ---------------------------------------------------------------- bracket
   Dark lines on the white card: each pair of matches is joined by a bracket line that runs into the next round. */
.fc-bracket { --fc-line: #0f172a; --fc-gap: 26px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--fc-gap); }
.fc-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fc-col-title { font-weight: 900; font-size: 14px; letter-spacing: 0.08em; color: #0f172a; text-align: center; text-transform: uppercase; }
.fc-col-list { flex: 1; display: flex; flex-direction: column; }
.fc-pair { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: space-around; }
.fc-col:not(.fc-col-3) .fc-pair::after {   /* the vertical bracket line between the pair's two matches */
  content: ""; position: absolute; right: calc(var(--fc-gap) / -2 - 1px); top: 25%; bottom: 25%; width: 2px; background: var(--fc-line);
}
.fc-match {
  position: relative; margin: 6px 0; background: #ffffff; border: 1.5px solid var(--fc-line); border-radius: 12px; padding: 4px;
  display: flex; flex-direction: column; gap: 2px; box-shadow: 0 2px 0 rgba(15, 23, 42, 0.12);
}
.fc-col:not(.fc-col-3) .fc-match::after {   /* out of the match to the bracket line */
  content: ""; position: absolute; right: calc(var(--fc-gap) / -2 - 1.5px); top: 50%; width: calc(var(--fc-gap) / 2); height: 2px; background: var(--fc-line);
}
.fc-col:not(.fc-col-1) .fc-match::before {   /* from the bracket line into the next round */
  content: ""; position: absolute; left: calc(var(--fc-gap) / -2 - 1.5px); top: 50%; width: calc(var(--fc-gap) / 2); height: 2px; background: var(--fc-line);
}
.fc-col-3 .fc-match { border: 2px solid var(--fc-gold-dark); background: linear-gradient(180deg, #fffbeb, #fff3cd); }
.fc-match.is-live { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25); }
.fc-match.is-mine { box-shadow: 0 0 0 3px rgba(246, 195, 67, 0.7); }
.fc-match.empty { border-style: dashed; border-color: #64748b; }
.fc-match.empty .fc-team { color: #64748b; }
.fc-team { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 8px; color: #0f172a; font-size: 15px; }
.fc-team-crest {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  font-size: 11px; font-weight: 900; color: #ffffff; background: #64748b;
}
.fc-team .fc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.fc-team .fc-score { flex: 0 0 auto; min-width: 22px; text-align: right; font-weight: 900; font-size: 16px; }
.fc-team .fc-score small { margin-left: 3px; font-size: 12px; color: #64748b; font-weight: 700; }
.fc-team.win { background: #ecfdf5; }
.fc-team.win .fc-team-crest { background: #16a34a; }
.fc-team.win .fc-name { font-weight: 800; }
.fc-team.lose { color: #94a3b8; }
.fc-team.mine .fc-name { color: #b45309; }
.fc-team.mine .fc-team-crest { background: linear-gradient(135deg, #e0a21e, #f6c343); color: #3b2503; }
.fc-match-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 2px 6px 3px; }
.fc-live-dot { font-size: 12px; font-weight: 900; color: #15803d; letter-spacing: 0.08em; }
.fc-live-dot::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: #22c55e; animation: fcPulse 1.2s infinite; }
.fc-tag { font-size: 12px; font-weight: 800; color: #64748b; }
@keyframes fcPulse { 50% { opacity: 0.25; } }

/* ---------------------------------------------------------------- prize ladder */
.fc-prizes ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fc-prize { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: #f8fafc; border: 1px solid #e2e8f0; }
.fc-medal {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 900; font-size: 15px; color: #1f2937; background: linear-gradient(180deg, #e2e8f0, #cbd5e1);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12);
}
.fc-prize.rank-1 { background: linear-gradient(180deg, #fffbeb, #fff1c7); border-color: #f6c343; }
.fc-prize.rank-1 .fc-medal { color: #3b2503; background: linear-gradient(180deg, #ffe08a, #e0a21e); }
.fc-prize.rank-2 .fc-medal { background: linear-gradient(180deg, #f1f5f9, #94a3b8); }
.fc-prize.rank-3 .fc-medal { color: #ffffff; background: linear-gradient(180deg, #e9a66a, #b8703a); }
.fc-prize-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.fc-prize-body b { font-size: 16px; color: #0f172a; }
.fc-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.fc-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 5px; border-radius: 999px;
  font-size: 14px; font-weight: 800; color: #0f172a; background: #ffffff; border: 1px solid #e2e8f0;
}
.fc-chip img { width: 20px; height: 20px; object-fit: contain; }
.fc-chip.sm { font-size: 13px; }
.fc-chip-cash { color: #166534; border-color: #bbf7d0; background: #f0fdf4; }
.fc-chip-token { color: #92400e; border-color: #fde68a; background: #fffbeb; }

/* the four points of a prize: four icons + the amount */
.fc-points { display: inline-flex; align-items: center; gap: 3px; align-self: flex-start; padding: 3px 10px 3px 6px; border-radius: 999px; background: #f5f3ff; border: 1px solid #ddd6fe; }
.fc-points img { width: 20px; height: 20px; object-fit: contain; }
.fc-points b { margin-left: 4px; font-size: 14px; font-weight: 900; color: #5b21b6; }
.fc-points small { font-size: 12px; font-weight: 700; color: #7c3aed; }
.fc-prize-body .fc-chips { gap: 5px; }

/* ---------------------------------------------------------------- seats: online dot + lobby buttons */
.fc-seat-crest { position: relative; }
.fc-online {
  position: absolute; right: -4px; bottom: -4px; width: 13px; height: 13px; border-radius: 50%;
  background: #22c55e; border: 2px solid #ffffff; box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.5);
}
.fc-lobby-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------------------------------------------------------------- rules (opened by the hero's Kurallar button) */
.fc-rules .fc-card-head .fc-btn { margin-left: auto; }
.fc-rule-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fc-rule { display: flex; gap: 9px; align-items: flex-start; padding: 9px 10px; border-radius: 12px; background: #f8fafc; border: 1px solid #e2e8f0; }
.fc-rule-ico { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: #e0f2fe; }
.fc-rule b { display: block; font-size: 14px; color: #0f172a; }
.fc-rule small { display: block; font-size: 13px; color: #64748b; line-height: 1.25; }

/* ---------------------------------------------------------------- narrow windows + phones
   Narrow windows use container queries on the game window (@container game). A phone is laid out ~1920 wide at half
   scale: friendlyCup.js zooms the page (.fc-zoomed) back to about the tablet's size; it gets a shorter hero. */
#friendlyCupPage.fc-zoomed { max-width: none; }
#friendlyCupPage.fc-zoomed .fc-hero { padding: 10px 14px; gap: 8px; border-radius: 16px; }
#friendlyCupPage.fc-zoomed .fc-hero-main { gap: 12px; }
#friendlyCupPage.fc-zoomed .fc-trophy { width: 54px; height: 54px; border-radius: 16px; }
#friendlyCupPage.fc-zoomed .fc-trophy svg { width: 40px; height: 40px; }
#friendlyCupPage.fc-zoomed .fc-kicker { font-size: 11px; }
#friendlyCupPage.fc-zoomed .fc-hero-title { font-size: 24px; }
#friendlyCupPage.fc-zoomed .fc-hero-lead { font-size: 14px; }
#friendlyCupPage.fc-zoomed .fc-hero-pill { padding: 5px 11px; font-size: 14px; }
#friendlyCupPage.fc-zoomed .fc-steps li { padding: 5px 8px; font-size: 13px; }
#friendlyCupPage.fc-zoomed .fc-step-dot { width: 20px; height: 20px; font-size: 12px; }
#friendlyCupPage.fc-zoomed .fc-card { padding: 12px 14px; border-radius: 14px; }
#friendlyCupPage.fc-zoomed .fc-card-head { margin-bottom: 8px; }
#friendlyCupPage.fc-zoomed .fc-card-head h3 { font-size: 18px; }
#friendlyCupPage.fc-zoomed .fc-seats { gap: 6px; }
#friendlyCupPage.fc-zoomed .fc-seat { padding: 7px 8px; gap: 7px; }
#friendlyCupPage.fc-zoomed .fc-seat-crest { width: 30px; height: 30px; font-size: 13px; border-radius: 9px; }
#friendlyCupPage.fc-zoomed .fc-seat-name { font-size: 14px; }
#friendlyCupPage.fc-zoomed .fc-btn { font-size: 16px; padding: 10px 20px; }
#friendlyCupPage.fc-zoomed .fc-bracket { --fc-gap: 18px; }
#friendlyCupPage.fc-zoomed .fc-team { font-size: 14px; padding: 3px 5px; }
#friendlyCupPage.fc-zoomed .fc-prize { padding: 8px 10px; gap: 8px; }
#friendlyCupPage.fc-zoomed .fc-medal { width: 36px; height: 36px; font-size: 13px; }
@container game (max-width: 1100px) {
  .fc-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 10px; }
  .fc-rule-grid { grid-template-columns: 1fr 1fr; }
}
@container game (max-width: 820px) {
  .fc-layout { grid-template-columns: 1fr; }
  .fc-hero-lead { display: none; }
  .fc-steps .fc-step-name { display: none; }
  .fc-steps li { justify-content: center; }
  .fc-seats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fc-lobby-foot { flex-direction: column; align-items: stretch; }
  .fc-lobby-actions { justify-content: stretch; }
  .fc-lobby-actions .fc-btn { flex: 1; }
}
@container game (max-width: 560px) {   /* very narrow: the bracket scrolls sideways instead of losing its lines */
  .fc-bracket-card { overflow-x: auto; }
  .fc-bracket { min-width: 520px; }
}
