/* Design tokeny převzaté z mcragility2026.cz, ať tipovačka vypadá jako součást webu. */
:root {
  --primary: #e63946;
  --primary-hover: #cc2d39;
  --primary-light: #ff6b6b;
  --electric: #00c8e0;
  --electric-hover: #00a8bd;
  --electric-light: #7eeaff;
  --grad-primary: linear-gradient(135deg, #e63946 0, #ff6b6b 100%);
  --grad-dark: linear-gradient(135deg, #0b0e14 0, #1a1f2e 100%);

  --bg-dark: #0b0e14;
  --bg-dark-elevated: #161a24;
  --bg-light: #f8f9fb;
  --bg-surface: #eef0f4;
  --bg-white: #fff;

  --text: #1a1d26;
  --text-secondary: #5c6170;
  --text-muted: #9198a8;
  --text-on-dark: #e4e8ef;
  --text-on-dark-muted: #7c8598;

  --border: #d8dce5;
  --border-dark: #252a38;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;

  --cat-xs: #a855f7;
  --cat-s: #3b82f6;
  --cat-m: #f59e0b;
  --cat-i: #10b981;
  --cat-l: #ef4444;

  --font-display: "Saira Condensed", Impact, sans-serif;
  --font-body: "Saira", system-ui, sans-serif;

  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(11, 14, 20, 0.06);
  --shadow-md: 0 4px 16px rgba(11, 14, 20, 0.1);
  --shadow-lg: 0 12px 40px rgba(11, 14, 20, 0.14);
  --shadow-primary: 0 4px 20px rgba(230, 57, 70, 0.3);

  --container: 800px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg-light);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0;
  line-height: 1.05;
}

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

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 1rem; }

/* Hlavička */
.top {
  background: var(--grad-dark);
  color: var(--text-on-dark);
  padding: 1.75rem 0 2rem;
  border-bottom: 3px solid var(--primary);
}
.brand {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  margin-bottom: 0.6rem;
}
.brand b { color: var(--primary-light); }
.top h1 { font-size: clamp(2.1rem, 8vw, 3.4rem); color: #fff; }
.top h1 em { font-style: normal; color: var(--primary); }
.top p { color: var(--text-on-dark-muted); margin: 0.6rem 0 0; max-width: 46ch; }

/* Odpočet a stav */
.status {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; align-items: baseline;
  margin-top: 1.1rem; font-size: 0.9rem;
}
.pill {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-on-dark); border-radius: var(--radius-full);
  padding: 0.3rem 0.85rem; font-size: 0.82rem;
}
.pill.live { border-color: rgba(0, 200, 224, 0.5); color: var(--electric-light); }
.pill.closed { border-color: rgba(230, 57, 70, 0.5); color: var(--primary-light); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dot.beat { animation: beat 1.6s var(--ease-out) infinite; }
@keyframes beat { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* Přepínač dnů */
.days { display: flex; gap: 0.5rem; margin: 1.4rem 0 0; }
.days button {
  flex: 1; font-family: var(--font-display); text-transform: uppercase;
  font-size: 1rem; letter-spacing: 0.04em; padding: 0.7rem 0.5rem;
  border: 1px solid var(--border); background: var(--bg-white); color: var(--text-secondary);
  border-radius: var(--radius-md); cursor: pointer; transition: all 0.2s var(--ease-out);
}
.days button small { display: block; font-family: var(--font-body); text-transform: none;
  font-size: 0.72rem; letter-spacing: 0; color: var(--text-muted); }
.days button[aria-selected="true"] {
  background: var(--bg-dark); border-color: var(--bg-dark); color: #fff;
}
.days button[aria-selected="true"] small { color: var(--electric-light); }

/* Karty kategorií */
main { padding: 1.75rem 0 4rem; }
.card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  margin-bottom: 0.85rem;
  /* Bez overflow:hidden, jinak by karta ořízla rozbalenou nabídku. */
  position: relative; z-index: 1;
}
/* Karta s otevřenou nabídkou musí přebít karty pod sebou. */
.card.open { z-index: 60; }
.card > header {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.85rem 1rem; border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.badge {
  font-family: var(--font-display); font-size: 1.1rem; line-height: 1;
  color: #fff; background: var(--cat); padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm); min-width: 2.6rem; text-align: center;
}
.card > header .meta { font-size: 0.82rem; color: var(--text-secondary); }
.card > header .meta b { color: var(--text); font-family: var(--font-display); font-size: 1rem; }
.card .body { padding: 0.9rem 1rem 1.1rem; }

/* Combobox */
.combo { position: relative; }
.combo input {
  width: 100%; font: inherit; padding: 0.7rem 0.85rem;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--bg-white); color: var(--text);
}
.combo input:focus {
  outline: none; border-color: var(--electric);
  box-shadow: 0 0 0 3px rgba(0, 200, 224, 0.18);
}
.combo.picked input { border-color: var(--success); background: rgba(16, 185, 129, 0.05); }
.combo ul {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px);
  margin: 0; padding: 0.25rem; list-style: none; max-height: 15rem; overflow-y: auto;
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
}
.combo ul:empty, .combo ul[hidden] { display: none; }
.combo li {
  padding: 0.55rem 0.65rem; border-radius: var(--radius-sm); cursor: pointer; font-size: 0.93rem;
}
.combo li small { display: block; color: var(--text-muted); font-size: 0.78rem; }
.combo li[aria-selected="true"], .combo li:hover { background: var(--bg-surface); }
.combo li mark { background: rgba(0, 200, 224, 0.25); color: inherit; border-radius: 2px; }
.hint { font-size: 0.8rem; color: var(--text-muted); margin: 0.45rem 0 0; }

/* Formulář */
fieldset { border: 0; margin: 0; padding: 0; }
label.field { display: block; margin-bottom: 0.9rem; }
label.field span { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; }
input[type="text"], input[type="email"], select {
  width: 100%; font: inherit; padding: 0.7rem 0.85rem;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-white);
}
input:focus, select:focus {
  outline: none; border-color: var(--electric);
  box-shadow: 0 0 0 3px rgba(0, 200, 224, 0.18);
}
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.88rem; margin-top: 0.5rem; }
.check input { margin-top: 0.25rem; }
.hp { position: absolute; left: -9999px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.05em;
  font-size: 1.15rem; padding: 0.85rem 1.6rem; width: 100%;
  border: 0; border-radius: var(--radius-md); cursor: pointer;
  background: var(--grad-primary); color: #fff; box-shadow: var(--shadow-primary);
  transition: transform 0.15s var(--ease-out), filter 0.15s var(--ease-out);
}
.btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.05); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn.ghost {
  background: none; color: var(--text); border: 1px solid var(--border);
  box-shadow: none; font-size: 1rem;
}

.note {
  padding: 0.85rem 1rem; border-radius: var(--radius-md); font-size: 0.9rem;
  border: 1px solid; margin-bottom: 1rem;
}
.note.err { background: rgba(239, 68, 68, 0.07); border-color: rgba(239, 68, 68, 0.35); color: #a01c26; }
.note.ok { background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.35); color: #05704f; }
.note.warn { background: rgba(245, 158, 11, 0.09); border-color: rgba(245, 158, 11, 0.4); color: #8a5a04; }

/* Pravidla */
.rules { background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.1rem 1.25rem; margin-top: 1.5rem; }
.rules h2 { font-size: 1.25rem; margin-bottom: 0.6rem; }
.rules ol { margin: 0; padding-left: 1.15rem; font-size: 0.9rem; color: var(--text-secondary); }
.rules li { margin-bottom: 0.4rem; }
.rules b { color: var(--text); }

/* Tabule s kurzy */
.bar { position: relative; background: var(--bg-surface); border-radius: var(--radius-sm);
  height: 2.15rem; overflow: hidden; margin-bottom: 0.35rem; }
.bar i {
  position: absolute; inset: 0 auto 0 0; background: var(--cat); opacity: 0.22;
  transition: width 0.6s var(--ease-out);
}
.bar > span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 0 0.7rem; font-size: 0.87rem; gap: 0.75rem;
}
.bar > span em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar > span b { font-family: var(--font-display); font-size: 1.05rem; white-space: nowrap; }
.bar.lead i { opacity: 0.45; }
.odds { color: var(--text-muted); font-size: 0.78rem; margin-left: 0.35rem; }

.winner {
  margin-top: 0.6rem; padding: 0.6rem 0.8rem; border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.35);
  font-size: 0.9rem;
}
.winner b { font-family: var(--font-display); font-size: 1.05rem; }

.foot { text-align: center; padding: 2rem 1rem 3rem; color: var(--text-muted); font-size: 0.83rem; }
.foot a { color: var(--text-secondary); }

.skel { color: var(--text-muted); padding: 2rem 0; text-align: center; }

@media (max-width: 520px) {
  .days button { font-size: 0.9rem; }
  .card > header { padding: 0.7rem 0.8rem; }
  .card .body { padding: 0.8rem; }
}
