/* Milionář: základní vzhled. Barvy MUNI (modrá, zlatá), vlastní tvary, tmavá scéna. */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Roboto:wght@400;500;700&display=swap');

:root {
  --blue: #0000DC;
  --blue-dark: #001050;
  --blue-deep: #00042A;
  --blue-soft: #1a1aff;
  --gold: #C8A97E;
  --gold-light: #E3C9A0;
  --gold-dim: rgba(200, 169, 126, 0.35);
  --ink: #0A0A14;
  --white: #FFFFFF;
  --muted: rgba(255, 255, 255, 0.72);
  --faint: rgba(255, 255, 255, 0.12);
  --panel: rgba(0, 16, 80, 0.62);
  --panel-solid: #061a5e;
  --ok: #2E7D32;
  --ok-light: #4CAF50;
  --err: #C62828;
  --err-light: #EF5350;
  --warn: #F9A825;
  --radius: 14px;
  --radius-sm: 8px;
  --font-head: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow: 0 10px 30px rgba(0, 0, 40, 0.35);
  --max: 1100px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--white);
  background: linear-gradient(160deg, var(--blue-deep) 0%, var(--blue-dark) 55%, var(--ink) 100%);
  background-attachment: fixed;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.light {
  color: var(--ink);
  background: #f3f4f8;
}

a { color: var(--gold-light); }
body.light a { color: var(--blue); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; letter-spacing: 0.5px; margin: 0 0 0.4em; line-height: 1.15; }
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(22px, 2.8vw, 30px); }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Hlavička a patička */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 20px; max-width: var(--max); width: 100%; margin: 0 auto;
}
.logo { display: inline-flex; align-items: baseline; gap: 6px; text-decoration: none; color: inherit; }
.logo .word { font-family: var(--font-head); font-weight: 700; font-size: 26px; letter-spacing: 3px; text-transform: uppercase; }
.logo .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); display: inline-block; transform: translateY(-2px); box-shadow: 0 0 12px var(--gold); }
.logo .tag { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); margin-left: 6px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.site-nav a { text-decoration: none; font-weight: 500; color: var(--muted); padding: 6px 4px; border-bottom: 2px solid transparent; }
.site-nav a[aria-current="page"], .site-nav a:hover { color: var(--white); border-bottom-color: var(--gold); }
body.light .site-nav a { color: #444; }
body.light .site-nav a[aria-current="page"], body.light .site-nav a:hover { color: var(--blue); border-bottom-color: var(--blue); }

main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 16px 20px 40px; }
main.narrow { max-width: 760px; }

.site-footer {
  border-top: 1px solid var(--faint); padding: 18px 20px 28px; font-size: 13px; color: var(--muted);
  max-width: var(--max); width: 100%; margin: 0 auto;
}
body.light .site-footer { color: #555; border-top-color: #ddd; }
.site-footer p { margin: 0 0 6px; }

/* Panely a karty */
.panel {
  background: var(--panel); border: 1px solid var(--gold-dim); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); backdrop-filter: blur(4px);
}
body.light .panel { background: var(--white); border-color: #dfe2ea; box-shadow: 0 4px 18px rgba(0, 0, 60, 0.08); }
.panel + .panel { margin-top: 18px; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: var(--radius); background: rgba(255,255,255,0.05); border: 1px solid var(--faint); }
body.light .card { background: #fafbfe; border-color: #e3e6ef; }
.card h3 { margin: 0; }
.card .meta { font-size: 13px; color: var(--muted); }
body.light .card .meta { color: #666; }
.card .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }

/* Tlačítka */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius-sm); border: 2px solid transparent;
  font-weight: 600; cursor: pointer; text-decoration: none; color: var(--white);
  background: linear-gradient(180deg, var(--blue-soft) 0%, var(--blue) 100%);
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
  min-height: 44px;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 220, 0.35); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.gold { background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: var(--blue-deep); }
.btn.ghost { background: transparent; border-color: var(--gold); color: var(--gold-light); }
.btn.ghost:hover { background: rgba(200, 169, 126, 0.12); box-shadow: none; }
.btn.danger { background: linear-gradient(180deg, var(--err-light), var(--err)); }
.btn.small { padding: 7px 12px; min-height: 36px; font-size: 14px; }
.btn.big { padding: 16px 28px; font-size: 18px; }
body.light .btn.ghost { color: var(--blue); border-color: var(--blue); }
body.light .btn.ghost:hover { background: rgba(0, 0, 220, 0.06); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Formuláře */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .field .label { font-weight: 500; font-size: 14px; }
.field .hint { font-size: 12px; color: var(--muted); }
body.light .field .hint { color: #666; }
input[type="text"], input[type="number"], input[type="search"], select, textarea {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08); color: var(--white); min-height: 44px;
}
textarea { min-height: 90px; resize: vertical; }
body.light input[type="text"], body.light input[type="number"], body.light input[type="search"], body.light select, body.light textarea {
  background: var(--white); color: var(--ink); border-color: #c9cddb;
}
input::placeholder, textarea::placeholder { color: rgba(255,255,255,0.45); }
body.light input::placeholder, body.light textarea::placeholder { color: #999; }
.check { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); }
.inline-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }

/* Drobnosti */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--gold); color: var(--blue-deep); }
.badge.soft { background: rgba(255,255,255,0.12); color: var(--white); }
body.light .badge.soft { background: #e7e9f2; color: #333; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 2px; font-size: 20px; background: rgba(0,0,0,0.25); padding: 6px 12px; border-radius: 6px; user-select: all; }
body.light .code { background: #eef0f6; }
.note { border-left: 4px solid var(--gold); padding: 10px 14px; background: rgba(200,169,126,0.1); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.note.err { border-left-color: var(--err-light); background: rgba(198,40,40,0.15); }
.note.ok { border-left-color: var(--ok-light); background: rgba(46,125,50,0.15); }
.muted { color: var(--muted); }
body.light .muted { color: #666; }
.empty { padding: 24px; text-align: center; color: var(--muted); border: 1px dashed var(--faint); border-radius: var(--radius); }
body.light .empty { color: #666; border-color: #ccc; }
ul.clean { list-style: none; padding: 0; margin: 0; }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--faint); }
body.light table.list th, body.light table.list td { border-bottom-color: #e5e7ee; }
table.list th { font-family: var(--font-head); font-weight: 500; letter-spacing: 1px; text-transform: uppercase; font-size: 13px; color: var(--gold); }
body.light table.list th { color: var(--blue); }
table.list td.num { text-align: right; font-variant-numeric: tabular-nums; }
kbd { font-family: ui-monospace, Menlo, monospace; font-size: 12px; padding: 2px 6px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.3); background: rgba(0,0,0,0.25); }
body.light kbd { border-color: #bbb; background: #eee; }

/* Toast a dialog */
.toast-host { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; pointer-events: none; }
.toast { background: var(--panel-solid); color: var(--white); border: 1px solid var(--gold-dim); padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow); font-size: 14px; animation: rise 0.25s ease; }
.toast.err { border-color: var(--err-light); }
.toast.ok { border-color: var(--ok-light); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

dialog.modal {
  border: 1px solid var(--gold-dim); border-radius: var(--radius); background: var(--panel-solid); color: var(--white);
  padding: 24px; max-width: min(560px, 92vw); box-shadow: var(--shadow);
}
dialog.modal::backdrop { background: rgba(0, 0, 20, 0.7); }
dialog.modal h2 { margin-top: 0; }
body.light dialog.modal { background: var(--white); color: var(--ink); border-color: #dfe2ea; }

/* Hero na domovské stránce */
.hero { text-align: center; padding: 30px 10px 26px; }
.hero .logo { justify-content: center; }
.hero .logo .word { font-size: clamp(44px, 9vw, 92px); letter-spacing: 8px; text-shadow: 0 0 30px rgba(200,169,126,0.35); }
.hero .logo .dot { width: 16px; height: 16px; }
.hero p.lead { font-size: clamp(16px, 2.2vw, 20px); color: var(--muted); max-width: 640px; margin: 8px auto 22px; }
.hero .btn-row { justify-content: center; }
.code-form { display: flex; gap: 8px; max-width: 420px; margin: 0 auto; }
.code-form input { text-transform: lowercase; letter-spacing: 2px; }

@media (max-width: 640px) {
  .site-header { flex-direction: column; align-items: flex-start; }
  main { padding: 12px 16px 32px; }
  .panel { padding: 16px; }
  .code-form { flex-direction: column; }
}
@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
}
