@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Nunito:wght@400;600;700&display=swap');

/* ── PROMENNE ─────────────────────────────────────────── */
:root {
    --bg:           #0a0e1a;
    --surface:      #111827;
    --surface-2:    #1f2937;
    --border:       #2d3748;
    --accent:       #22d3ee;
    --accent-hover: #06b6d4;
    --accent-2:     #a78bfa;
    --text:         #f1f5f9;
    --text-muted:   #94a3b8;
    --success:      #10b981;
    --danger:       #ef4444;
    --warning:      #f59e0b;
}

/* ── RESET ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── CHECKBOX ─────────────────────────────────────────── */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid var(--border);
    border-radius: 3px;
    background: #000;
    cursor: pointer;
    vertical-align: middle;
    position: relative;
    flex-shrink: 0;
    transition: border-color .15s, background .15s;
}
input[type="checkbox"]:hover {
    border-color: var(--accent);
}
input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}
input[type="checkbox"].cb-novinka:checked {
    background: var(--accent-2);
    border-color: var(--accent-2);
}
input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 0;
    width: 5px;
    height: 9px;
    border: 2px solid #0a0e1a;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Nunito', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
img { max-width: 100%; display: block; }

/* ── HLAVICKA / LOGO ──────────────────────────────────── */
.site-header {
    text-align: center;
    padding: 2rem 1rem 1.75rem;
    background: linear-gradient(180deg, #0f1729 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(34,211,238,.08) 0%, transparent 70%);
    pointer-events: none;
}

.logo-title {
    font-family: 'Bangers', cursive;
    font-size: clamp(2.2rem, 9vw, 4rem);
    letter-spacing: 0.06em;
    color: var(--accent);
    text-shadow: 0 0 40px rgba(34,211,238,.35), 0 2px 0 rgba(0,0,0,.5);
    line-height: 1.05;
    position: relative;
}

.logo-sub {
    font-size: clamp(.85rem, 3vw, 1.05rem);
    color: var(--text-muted);
    letter-spacing: .18em;
    text-transform: uppercase;
    margin-top: .4rem;
    position: relative;
}

/* ── TAB NAVIGACE ─────────────────────────────────────── */
.tab-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.4);
    overflow: hidden;
}

.tab-nav-inner {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 .5rem;
    gap: .15rem;
    max-width: 1000px;
    margin: 0 auto;
}
.tab-nav-inner::-webkit-scrollbar { display: none; }

.tab-nav::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 3rem; height: 100%;
    background: linear-gradient(to right, transparent, var(--surface));
    pointer-events: none;
    z-index: 1;
}

.tab-link {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: .9rem 1.1rem;
    font-family: 'Nunito', sans-serif;
    font-size: .9rem;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: color .18s, border-color .18s;
    flex-shrink: 0;
}
.tab-link:hover           { color: var(--text); border-bottom-color: var(--border); }
.tab-link.tab-active      { color: var(--accent); border-bottom-color: var(--accent); }
.tab-link.tab-disabled    { opacity: .3; cursor: default; font-style: italic; pointer-events: none; }

/* ── OBSAH ────────────────────────────────────────────── */
.content {
    flex: 1;
    padding: 1.5rem 1rem;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

/* ── PATICKA ──────────────────────────────────────────── */
.site-footer {
    text-align: center;
    padding: 1rem;
    font-size: .8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    background: var(--surface);
}
.admin-link {
    display: inline-block;
    margin-top: .4rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: .75rem;
    opacity: .35;
    transition: opacity .2s;
}
.admin-link:hover { opacity: 1; }

/* ── KARTY ────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: .75rem;
}

/* ── TLACITKA ─────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .7rem 1.4rem;
    border-radius: 9px;
    font-family: 'Nunito', sans-serif;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s;
    text-decoration: none;
    border: none;
    line-height: 1;
}
.btn-primary   { background: var(--accent); color: #0a0e1a; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .88; }
.btn-sm        { padding: .4rem .9rem; font-size: .82rem; }

/* ── MODAL ────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.88);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s, visibility .22s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-inner {
    position: relative;
    max-width: min(90vw, 600px);
    max-height: 90vh;
}
.modal-inner img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,.7);
}
.modal-close {
    position: absolute;
    top: -2.8rem;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    opacity: .7;
    transition: opacity .18s;
}
.modal-close:hover { opacity: 1; }

/* ── PLAKATY ──────────────────────────────────────────── */
.festival-nadpis {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 7vw, 3.2rem);
    font-weight: 900;
    font-style: italic;
    color: var(--text);
    text-align: center;
    letter-spacing: .01em;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 20px rgba(34,211,238,.15);
}

.plakaty-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .9rem;
    margin-bottom: 1.25rem;
}
@media (min-width: 600px) {
    .plakaty-grid { grid-template-columns: repeat(4, 1fr); }
}

.plakat-thumb {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform .2s, border-color .2s, box-shadow .2s;
    aspect-ratio: 2/3;
    display: flex;
    align-items: center;
    justify-content: center;
}
.plakat-thumb:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(34,211,238,.18);
}
.plakat-thumb img { width: 100%; height: 100%; object-fit: cover; }
.plakat-placeholder { color: var(--text-muted); font-size: .8rem; text-align: center; padding: 1rem; }

/* ── INDIVKY ──────────────────────────────────────────── */
.indivky-obsah {
    white-space: pre-wrap;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
}
.indivky-empty {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 3rem 1rem;
    font-size: 1rem;
}

/* ── PRAVIDLA HER ─────────────────────────────────────── */
.pravidla-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}
.hry-menu {
    width: 195px;
    flex-shrink: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: .6rem;
    position: sticky;
    top: 4.5rem;
}
.hry-menu-title {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-muted);
    padding: .4rem .6rem .6rem;
    font-weight: 700;
}
.hry-menu-item {
    display: block;
    padding: .6rem .8rem;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: .88rem;
    transition: all .18s;
    border-left: 3px solid transparent;
    margin-bottom: .15rem;
}
.hry-menu-item:hover { background: var(--surface-2); color: var(--text); }
.hry-menu-item.active { background: var(--surface-2); color: var(--accent); border-left-color: var(--accent); }

.hra-obsah { flex: 1; min-width: 0; }
.hra-obsah h2 { font-family: 'Bangers', cursive; font-size: 2rem; color: var(--accent); letter-spacing: .05em; margin-bottom: 1rem; }
.hra-obsah h3 { font-size: 1.1rem; color: var(--accent-2); margin: 1.25rem 0 .5rem; }
.hra-obsah p  { line-height: 1.75; margin-bottom: .75rem; color: var(--text); }
.hra-obsah ul, .hra-obsah ol { padding-left: 1.5rem; margin-bottom: .75rem; }
.hra-obsah li { line-height: 1.7; margin-bottom: .3rem; }
.hra-obsah img { border-radius: 10px; margin: 1rem 0; border: 1px solid var(--border); }

.pravidla-empty { color: var(--text-muted); font-style: italic; padding: 2rem 0; }

@media (max-width: 599px) {
    .pravidla-layout { flex-direction: column; }
    .hry-menu { width: 100%; position: static; }
    .hry-menu-inner { display: flex; flex-wrap: wrap; gap: .4rem; }
    .hry-menu-item {
        border-left: none;
        border-bottom: 2px solid transparent;
        background: var(--surface-2);
        padding: .45rem .75rem;
        font-size: .82rem;
    }
    .hry-menu-item.active { border-bottom-color: var(--accent); }
}

/* ── ADMIN – LAYOUT ───────────────────────────────────── */
.admin-wrap {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: 'Nunito', sans-serif;
    display: flex;
    flex-direction: column;
}
.admin-header {
    background: var(--surface);
    border-bottom: 2px solid var(--accent);
    padding: .9rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.admin-logo {
    font-family: 'Bangers', cursive;
    font-size: 1.5rem;
    color: var(--accent);
    letter-spacing: .05em;
    text-decoration: none;
}
.admin-nav { display: flex; gap: .5rem; flex-wrap: wrap; }
.admin-nav a {
    padding: .4rem .85rem;
    border-radius: 7px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 700;
    transition: all .18s;
}
.admin-nav a:hover, .admin-nav a.active { background: var(--surface-2); color: var(--text); }

.admin-content {
    flex: 1;
    max-width: 860px;
    margin: 0 auto;
    padding: 1.75rem 1rem;
    width: 100%;
}
.admin-section-title {
    font-family: 'Bangers', cursive;
    font-size: 1.8rem;
    color: var(--text);
    letter-spacing: .04em;
    margin-bottom: 1.25rem;
}

/* ── FORMULAR ─────────────────────────────────────────── */
.form-group { margin-bottom: 1.2rem; }
.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: .4rem;
    color: var(--text);
    font-size: .9rem;
}
.form-control {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: .7rem 1rem;
    color: var(--text);
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    transition: border-color .18s;
}
.form-control:focus { outline: none; border-color: var(--accent); }
textarea.form-control { resize: vertical; min-height: 220px; }

/* ── ALERTY ───────────────────────────────────────────── */
.alert {
    padding: .75rem 1rem;
    border-radius: 9px;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: .9rem;
}
.alert-success { background: rgba(16,185,129,.12); border: 1px solid var(--success); color: var(--success); }
.alert-error   { background: rgba(239,68,68,.12);  border: 1px solid var(--danger);  color: var(--danger); }
.alert-info    { background: rgba(34,211,238,.1);  border: 1px solid var(--accent);  color: var(--accent); }

/* ── PRIHLASENI ───────────────────────────────────────── */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 1rem;
}
.login-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 2.25rem 2rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.login-logo {
    font-family: 'Bangers', cursive;
    font-size: 1.9rem;
    color: var(--accent);
    text-align: center;
    margin-bottom: .2rem;
    letter-spacing: .05em;
}
.login-sub {
    text-align: center;
    color: var(--text-muted);
    font-size: .85rem;
    margin-bottom: 1.75rem;
}

/* ── TABULKY (admin) ──────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th {
    text-align: left;
    padding: .55rem .8rem;
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    font-weight: 700;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
}
.table td {
    padding: .6rem .8rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }

/* ── STITKY ───────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: .2rem .65rem;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 700;
}
.badge-success { background: rgba(16,185,129,.15); color: var(--success); }
.badge-muted   { background: rgba(148,163,184,.15); color: var(--text-muted); }
.badge-accent  { background: rgba(34,211,238,.15);  color: var(--accent); }
.badge-warning { background: rgba(245,158,11,.15);  color: var(--warning); }

/* ── MUZIKALOVE KARTY (web) ───────────────────────────── */
.karty-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .85rem;
}
@media (max-width: 599px) {
    .karty-grid { grid-template-columns: 1fr; }
}

.karta-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    transition: border-color .2s, box-shadow .2s;
}
.karta-item:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(34,211,238,.1);
}

.karta-img-wrap {
    width: 110px;
    flex-shrink: 0;
    cursor: zoom-in;
    overflow: hidden;
    background: var(--surface-2);
}
.karta-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s;
}
.karta-img-wrap:hover img { transform: scale(1.06); }

.karta-text {
    padding: .7rem .9rem;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.karta-nazev {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    line-height: 1.3;
}
.karta-popis {
    font-size: .92rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.karty-prazdne {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 3rem 1rem;
}

.karty-sekce-nadpis {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    font-weight: 700;
    font-style: italic;
    color: var(--text);
    letter-spacing: .01em;
    margin-bottom: .9rem;
}


/* ── HARMONOGRAM ─────────────────────────────────────── */
.harm-blok { display: flex; flex-direction: column; }

.harm-row {
    display: flex;
    gap: .75rem;
    padding: .5rem 0;
    border-bottom: 1px solid var(--border);
    align-items: baseline;
}
.harm-row:last-of-type { border-bottom: none; }

.harm-cas {
    flex-shrink: 0;
    width: 9rem;
    font-weight: 700;
    color: var(--accent);
    font-size: .95rem;
    font-variant-numeric: tabular-nums;
}
.harm-popis {
    flex: 1;
    color: var(--text);
    font-size: .95rem;
    line-height: 1.5;
}
.harm-nadpis {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-style: italic;
    font-size: 1rem;
    color: var(--text-muted);
    padding: .9rem 0 .3rem;
}
.harm-spacer { height: .5rem; }

@media (max-width: 400px) {
    .harm-row { flex-direction: column; gap: .1rem; }
    .harm-cas { width: auto; }
}

/* ── HUDBA KE STAZENI ────────────────────────────────── */
.download-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.download-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color .2s, box-shadow .2s;
}
.download-item:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(34,211,238,.08);
}
.download-icon {
    color: var(--accent);
    flex-shrink: 0;
    display: flex;
}
.download-info {
    flex: 1;
    min-width: 0;
}
.download-nazev {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
}
.download-velikost {
    font-size: .85rem;
    color: var(--text-muted);
    margin-top: .15rem;
}

/* ── PEXESO ───────────────────────────────────────────── */
.page-pexeso .content {
    padding: 0;
    max-width: 100%;
}
.page-pexeso .site-footer {
    display: none;
}
.pexeso-wrap {
    width: 100%;
    height: calc(100vh - 185px); /* viewport - header - tab nav */
    min-height: 560px;
}
.pexeso-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: var(--surface);
}
.pexeso-fallback {
    display: none;
    text-align: center;
    color: var(--text-muted);
    padding: 1rem;
    font-size: .9rem;
}

/* ── DESKTOP ROZSIRENI ────────────────────────────────── */
@media (min-width: 600px) {
    .content { padding: 2rem 1.5rem; }
    .admin-content { padding: 2rem 1.5rem; }
}

/* ── MOBILNI NAVIGACE (2 rady) ────────────────────────── */
@media (max-width: 699px) {
    .tab-nav {
        overflow: visible;
    }
    .tab-nav::after { display: none; }

    .tab-nav-inner {
        flex-wrap: wrap;
        overflow-x: visible;
        padding: 0;
        max-width: 100%;
        margin: 0;
        gap: 0;
    }

    .tab-link {
        flex: 0 0 25%;
        font-size: .72rem;
        padding: .55rem .15rem;
        text-align: center;
        justify-content: center;
        white-space: normal;
        line-height: 1.25;
        border-bottom: 2px solid transparent;
    }
}
