@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Rajdhani:wght@600;700&display=swap");

:root {
  --background: #060505;
  --foreground: #f5f1ee;
  --muted: #b8aeae;
  --brand: #e0242c;
  --brand-dark: #920000;
  --surface: #100c0c;
  --border: #2a1f1f;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.6;
}

a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--border);
  background: rgba(6, 5, 5, .92);
  backdrop-filter: blur(12px);
}

.nav,
.section-inner,
.footer-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.nav {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
}

.brand img { width: auto; height: 42px; }

.nav-links { display: flex; gap: 28px; color: var(--muted); font-size: .95rem; }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--foreground); }

.hero,
.pattern { background: radial-gradient(circle at 15% 10%, rgba(146, 0, 0, .2), transparent 43%), radial-gradient(circle at 85% 30%, rgba(224, 36, 44, .12), transparent 38%); }

.hero { border-bottom: 1px solid var(--border); text-align: center; }

.hero-inner { display: grid; min-height: 620px; place-items: center; padding: 100px 0 110px; }
.hero-content { max-width: 720px; }
.hero-logo { width: min(100%, 510px); height: auto; filter: drop-shadow(0 0 35px rgba(224, 36, 44, .3)); }

.eyebrow { margin: 0; color: var(--brand); font-size: .75rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
h1, h2, .brand, .footer-inner strong { font-family: "Rajdhani", "Arial Narrow", Arial, sans-serif; }
h1, h2 { margin: 0; line-height: 1.1; }
h1 { font-size: clamp(2.5rem, 7vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
.hero p:not(.eyebrow) { max-width: 560px; margin: 24px auto 0; color: var(--muted); font-size: 1.15rem; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.social-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.social-link { display: inline-flex; align-items: center; justify-content: center; min-width: 112px; border-color: transparent; color: #fff; }
.social-discord { background: #5865f2; }
.social-discord:hover { border-color: #7983f5; background: #4752c4; }
.social-twitch { background: #6441a5; }
.social-twitch:hover { border-color: #9b79d0; background: #4b2f7d; }
.social-instagram { background: #b83b76; }
.social-instagram:hover { border-color: #e36b9e; background: #922e5d; }
.social-youtube { background: #c9232d; }
.social-youtube:hover { border-color: #f0646b; background: #a51d25; }
.social-x { background: #242424; }
.social-x:hover { border-color: #777; background: #111; }
.social-tiktok { background: #183d42; }
.social-tiktok:hover { border-color: #57d3d2; background: #102d31; }
.button { display: inline-block; border: 1px solid var(--brand); border-radius: 5px; padding: 11px 20px; font: inherit; font-size: .95rem; font-weight: 700; text-decoration: none; }
.button-primary { background: var(--brand-dark); }
.button-primary:hover { background: var(--brand); }
.discord-button { font-size: 1rem; padding-right: 24px; padding-left: 24px; }
.button-secondary { border-color: var(--border); }
.button-secondary:hover { border-color: var(--brand); }

.section { padding: 96px 0; border-bottom: 1px solid var(--border); }
.twitch-frame { position: relative; width: 100%; max-width: 900px; margin: 42px auto 0; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--border); border-radius: 7px; background: #000; }
.twitch-frame iframe { width: 100%; height: 100%; border: 0; }
.center { max-width: 760px; margin-right: auto; margin-left: auto; text-align: center; }
.center h2 { margin-top: 12px; }
.copy { margin: 22px auto 0; color: var(--muted); font-size: 1.05rem; }
.event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 42px; }
.sponsor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-top: 42px; }
.event, .sponsor { border: 1px solid var(--border); border-radius: 7px; background: var(--surface); padding: 24px; }
.event { display: flex; min-height: 170px; align-items: center; gap: 24px; text-align: left; transition: border-color .2s, transform .2s; }
.event:hover { border-color: var(--brand); transform: translateY(-3px); }
.event-date { display: grid; width: 84px; min-width: 84px; height: 88px; place-content: center; border: 1px solid rgba(224, 36, 44, .45); border-radius: 6px; background: rgba(146, 0, 0, .2); text-align: center; }
.event-date strong { display: block; color: var(--foreground); font-family: "Rajdhani", "Arial Narrow", Arial, sans-serif; font-size: 2rem; line-height: .9; }
.event-date span { display: block; margin-top: 7px; color: var(--brand); font-size: .7rem; font-weight: 700; letter-spacing: .05em; }
.event-details { min-width: 0; flex: 1; padding: 4px 0; }
.event-details small { display: block; color: var(--brand); font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.event-details h3 { margin: 10px 0 0; font-family: "Rajdhani", "Arial Narrow", Arial, sans-serif; font-size: 1.35rem; line-height: 1.1; }
.event-details p { margin: 10px 0 0; color: var(--muted); font-size: .85rem; }
.empty { color: var(--muted); text-align: center; }
.sponsor { display: grid; min-height: 100px; place-items: center; border-style: dashed; color: var(--muted); font-size: .85rem; }

.preview-banner { background: #f0b35a; color: #1a1006; padding: 8px 20px; font-size: .9rem; text-align: center; }
.preview-banner a { margin-left: 6px; font-weight: 700; }
.team-logo { display: inline-grid; flex: none; width: 24px; height: 24px; place-items: center; border-radius: 4px; object-fit: contain; vertical-align: middle; }
.team-logo-empty { border: 1px solid var(--border); background: rgba(146, 0, 0, .2); color: var(--brand); font-family: "Rajdhani", "Arial Narrow", Arial, sans-serif; font-size: .8rem; font-weight: 700; }
.team-cell { display: flex; min-width: 0; align-items: center; gap: 10px; }
.stage-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 32px; }
.stage-tabs button { display: grid; min-width: 140px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--muted); cursor: pointer; padding: 8px 16px; font: inherit; font-weight: 600; }
.stage-tabs button small { color: var(--brand); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.stage-tabs button:hover { border-color: #5a3a3a; color: var(--foreground); }
.stage-tabs button[aria-selected="true"] { border-color: var(--brand); background: rgba(146, 0, 0, .25); color: var(--foreground); }
.stage-summary { margin: 28px 0 0; color: var(--muted); text-align: center; }
.stage-summary strong { color: var(--foreground); }
.stage-teams { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 20px; margin-top: 16px; }
.stage-result { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; margin: 24px 0 0; color: var(--muted); }
.stage-result .team-cell { color: var(--foreground); font-weight: 600; }
.elim-bracket { display: flex; gap: 28px; margin-top: 32px; overflow-x: auto; padding-bottom: 12px; }
.elim-round { display: flex; flex: 1 0 220px; flex-direction: column; }
.elim-round h3 { margin: 0 0 12px; font-family: "Rajdhani", "Arial Narrow", Arial, sans-serif; font-size: 1.35rem; }
.elim-matches { display: flex; flex: 1; flex-direction: column; justify-content: space-around; gap: 14px; }
.elim-matches .swiss-match { margin: 0; background: var(--surface); }
.swiss-match .tbd { color: var(--muted); font-style: italic; }
.swiss-rounds { display: flex; gap: 16px; margin-top: 42px; overflow-x: auto; padding-bottom: 12px; }
.swiss-round { flex: 1 0 220px; }
.swiss-round h3 { margin: 0 0 12px; font-family: "Rajdhani", "Arial Narrow", Arial, sans-serif; font-size: 1.35rem; }
.swiss-pool { margin-bottom: 16px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); padding: 12px; }
.swiss-pool-label { display: block; margin-bottom: 8px; color: var(--brand); font-size: .75rem; font-weight: 700; letter-spacing: .1em; }
.swiss-match { margin-top: 8px; overflow: hidden; border: 1px solid var(--border); border-radius: 5px; font-size: .88rem; }
.swiss-match div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; }
.swiss-match div + div { border-top: 1px solid var(--border); }
.swiss-match span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swiss-match .win { background: rgba(117, 201, 139, .1); font-weight: 600; }
.swiss-match .loss, .swiss-match .bye { color: var(--muted); }
.swiss-standings { width: 100%; max-width: 760px; margin: 32px auto 0; border-collapse: collapse; font-size: .92rem; }
.swiss-standings th, .swiss-standings td { border-bottom: 1px solid var(--border); padding: 10px 8px; text-align: left; }
.swiss-standings th { color: var(--muted); font-weight: 500; }
.swiss-status { font-size: .8rem; font-weight: 700; }
.status-advanced .swiss-status { color: #75c98b; }
.status-eliminated .swiss-status { color: #ff7a7f; }
.status-eliminated td { color: var(--muted); }

footer { background: var(--surface); }
.footer-inner { display: grid; grid-template-columns: minmax(220px, 1.2fr) minmax(220px, 1fr) minmax(180px, .8fr); align-items: start; gap: 40px; padding: 48px 0 24px; }
.footer-inner p { max-width: 340px; margin: 8px 0 0; color: var(--muted); font-size: .9rem; }
.footer-contact { display: flex; max-width: 260px; flex-direction: column; gap: 6px; color: var(--muted); font-size: .85rem; }
.footer-contact a { color: var(--foreground); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.footer-contact a:hover { color: var(--brand); }
.footer-links { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px 20px; color: var(--muted); font-size: .9rem; }
.footer-links a { white-space: nowrap; }
.footer-links a:hover { color: var(--foreground); }
.copyright { border-top: 1px solid var(--border); color: var(--muted); font-size: .75rem; }
.copyright .section-inner { padding: 16px 0; }

@media (max-width: 720px) {
  .nav, .section-inner, .footer-inner { width: min(100% - 28px, 560px); }
  .nav { min-height: 60px; }
  .nav-links { display: none; }
  .hero-inner { min-height: 560px; padding: 72px 0 80px; }
  .section { padding: 72px 0; }
  .event-grid { grid-template-columns: 1fr; }
  .event, .sponsor { padding: 18px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}
/* Game days: matches scheduled from the tournament */
.event.has-matches { align-items: flex-start; }
.event.has-many { grid-column: 1 / -1; }
.day-matches { margin-top: 14px; }
.day-time { margin: 14px 0 6px; color: var(--brand); font-size: .72rem; font-weight: 700; letter-spacing: .08em; }
.day-time:first-child { margin-top: 0; }
.day-match-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.day-matches.is-many .day-match-list { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.day-match { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 5px; background: rgba(0, 0, 0, .28); padding: 7px 10px; font-size: .85rem; }
.day-team { display: flex; min-width: 0; align-items: center; gap: 7px; }
.day-team:first-child { flex-direction: row-reverse; text-align: right; }
.day-team span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-team .team-logo { width: 20px; height: 20px; font-size: .65rem; }
.day-team.tbd { color: var(--muted); font-style: italic; }
.day-match small { color: var(--muted); font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.day-match b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.day-match.played .day-team:not(.win) { color: var(--muted); }
.day-team.win { font-weight: 600; }
.swiss-match .match-when { display: block; border-top: 1px solid var(--border); padding: 4px 10px; color: var(--muted); font-size: .75rem; }

/* "Právě vysíláme" pill (live.php) */
.live-pill { position: fixed; top: 82px; left: 50%; z-index: 3; display: flex; align-items: center; border: 1px solid rgba(224, 36, 44, .45); border-radius: 999px; background: rgba(16, 12, 12, .92); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); font-size: .85rem; transform: translateX(-50%); backdrop-filter: blur(10px); animation: live-in .4s ease-out both; transition: opacity .25s, transform .25s; }
.live-pill[hidden] { display: none; }
.live-pill.is-away { opacity: 0; pointer-events: none; transform: translate(-50%, -8px); }
.live-pill a { display: flex; align-items: center; gap: 9px; padding: 7px 4px 7px 14px; text-decoration: none; white-space: nowrap; }
.live-pill strong { font-weight: 700; }
.live-cta { color: var(--muted); }
.live-pill a:hover .live-cta { color: var(--foreground); text-decoration: underline; }
.live-pill button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px 12px 4px 8px; font: inherit; font-size: 1.05rem; line-height: 1; }
.live-pill button:hover { color: var(--foreground); }
.live-dot { position: relative; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--brand); }
.live-dot::after { position: absolute; inset: 0; border-radius: 50%; background: var(--brand); content: ""; animation: live-pulse 1.8s ease-out infinite; }
@keyframes live-pulse { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(2.6); } }
@keyframes live-in { from { opacity: 0; transform: translate(-50%, -10px); } }
@media (max-width: 720px) { .live-pill { top: 76px; font-size: .8rem; } .live-cta { display: none; } }
@media (prefers-reduced-motion: reduce) { .live-pill, .live-dot::after { animation: none; } }
