/**
 * Tipovačka Pro - Premium Cyber Theme & Multi-Layout System
 */

:root {
    --bg-base: #060b13;
    --bg-surface: #0f172a;
    --bg-card: #1e293b;
    --border-color: #334155;
    
    --accent-cyan: #00f0ff;
    --accent-neon: #00ffaa;
    --accent-purple: #8b5cf6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --glow-cyan: rgba(0, 240, 255, 0.25);
    --glow-neon: rgba(0, 255, 170, 0.2);
    
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--bg-base);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

/* --- PREPÍNAČ LAYOUTOV --- */
.layout-switcher {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: var(--radius-sm);
    gap: 4px;
    margin-right: 15px;
}

.layout-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
}

.layout-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.layout-btn.active {
    background: var(--accent-purple);
    color: #fff;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}

/* --- NAVIGÁCIA --- */
.top-nav {
    position: sticky;
    top: 0;
    height: 76px;
    background: rgba(6, 11, 19, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    z-index: 999;
    padding: 0 24px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-brand strong {
    font-size: 18px;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #fff, var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    text-decoration: none;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.06);
}

.user-zone {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-badge {
    font-weight: 600;
    font-size: 14px;
    color: #fff;
}

.main-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
    transition: var(--transition);
}

/* --- KARTY ZÁPASOV --- */
.match-card {
    background: var(--bg-surface);
    border: 1px solid rgba(51, 65, 85, 0.6);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.match-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 4px 20px var(--glow-cyan);
    transform: translateY(-2px);
}

.match-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.match-header {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.match-team {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.flag-badge {
    font-size: 22px;
    line-height: 1;
    display: inline-block;
}

.flag-badge-img {
    width: 32px;
    height: 20px;
    object-fit: cover;
    border-radius: 2px;
    display: inline-block;
}

.vs-divider {
    color: var(--accent-cyan);
    font-weight: 400;
    font-size: 13px;
}

.match-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.match-bet {
    display: flex;
    align-items: center;
    gap: 16px;
}

.match-result-badge {
    background: rgba(255, 255, 255, 0.04);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-muted);
}

.match-result-badge strong {
    color: var(--accent-neon);
}

.bet-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bet-input {
    width: 46px;
    height: 38px;
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    color: var(--accent-cyan);
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    border-radius: var(--radius-sm);
    outline: none;
    transition: var(--transition);
}

.bet-input:focus {
    border-color: var(--accent-cyan);
}

/* --- VŠEOBECNÉ KOMPONENTY --- */
.card {
    background: linear-gradient(145deg, var(--bg-surface), rgba(15, 23, 42, 0.8));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
}

.competition-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.switcher-select {
    background: var(--bg-surface);
    color: #fff;
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

/* Grid Štatistík */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.7));
    border-radius: var(--radius-lg);
    padding: 22px;
    border: 1px solid rgba(255,255,255,0.03);
    position: relative;
    display: flex;
    flex-direction: column;
}

.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--accent-purple);
}
.stat-card:nth-child(2)::before { background: var(--accent-cyan); }
.stat-card:nth-child(3)::before { background: var(--accent-neon); }
.stat-card:nth-child(4)::before { background: #e11d48; }

.stat-card span { font-size: 12px; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }
.stat-card strong { font-size: 32px; color: #fff; font-weight: 800; }

.btn {
    background: linear-gradient(135deg, var(--accent-neon), #00cc88);
    color: #060b13; font-weight: 700; padding: 10px 20px; border: none; border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0, 255, 170, 0.4); }
.btn-secondary { background: transparent; color: var(--text-main); border: 1px solid var(--border-color); }
.btn-danger { background: rgba(239, 68, 68, 0.1); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.btn-danger:hover { background: #ef4444; color: #fff; box-shadow: none; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

.form-control {
    width: 100%; padding: 12px; background: var(--bg-base); border: 1px solid var(--border-color); color: #fff; border-radius: var(--radius-sm); outline: none;
}
.alert { padding: 16px; border-radius: var(--radius-md); margin-bottom: 24px; font-size: 14px; }
.alert-danger { background: rgba(239, 68, 68, 0.15); border: 1px solid #ef4444; color: #fca5a5; }
.alert-success { background: rgba(0, 255, 170, 0.15); border: 1px solid var(--accent-neon); color: #6ee7b7; }

/* ==========================================================================
   🔥 STRUKTURÁLNE ZMENY PRE JEDNOTLIVÉ DIZAJNY (HTML/ROOT REŠTRUKTURALIZÁCIA)
   ========================================================================== */

/* LAYOUT 1: Dashboard (Predvolený riadkový stav) */
.layout-dashboard .main-content { max-width: 1200px; }

/* LAYOUT 2: Split Screen Stream (Fixné stats vľavo, obsah vpravo) */
.layout-split .main-content {
    max-width: 1400px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
}
.layout-split .dashboard-grid { grid-template-columns: 1fr; position: sticky; top: 108px; }
.layout-split .competition-bar { grid-column: span 2; }

/* LAYOUT 3: Modulárny Grid Kartičiek (Boxy namiesto riadkov) */
.layout-cards .matches-list-container {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px;
}
.layout-cards .match-card { flex-direction: column; align-items: stretch; gap: 16px; text-align: center; padding: 24px; }
.layout-cards .match-header { justify-content: center; flex-direction: column; }
.layout-cards .match-bet { flex-direction: column; width: 100%; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 14px; }
.layout-cards .bet-inputs { justify-content: center; width: 100%; }

/* LAYOUT 4: Cyber-Minimal Ticker (Ultra zhuštený flat dizajn) */
.layout-minimal .main-content { max-width: 1000px; }
.layout-minimal .card { background: transparent; border: none; padding: 0; }
.layout-minimal .dashboard-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; background: var(--bg-surface); padding: 12px; border-radius: var(--radius-sm); border-bottom: 2px solid var(--accent-cyan); }
.layout-minimal .stat-card { background: transparent; padding: 8px; flex-direction: row; justify-content: space-between; align-items: center; }
.layout-minimal .stat-card::before { display: none; }
.layout-minimal .stat-card strong { font-size: 20px; }
.layout-minimal .match-card { background: transparent; border: none; border-bottom: 1px solid rgba(255,255,255,0.05); border-radius: 0; padding: 12px 0; margin-bottom: 0; }
.layout-minimal .match-card:hover { box-shadow: none; background: rgba(255,255,255,0.02); transform: none; }

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 1024px) {
    .layout-split .main-content { grid-template-columns: 1fr; }
    .layout-split .dashboard-grid { grid-template-columns: repeat(2, 1fr); position: static; }
    .layout-split .competition-bar { grid-column: span 1; }
}
@media (max-width: 768px) {
    .nav-container { flex-direction: column; height: auto; padding: 14px 0; gap: 12px; }
    .top-nav { height: auto; position: static; }
    .dashboard-grid, .layout-minimal .dashboard-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
    .match-card { flex-direction: column !important; align-items: flex-start !important; gap: 16px; }
    .match-bet { width: 100%; justify-content: space-between; }
    .layout-cards .matches-list-container { grid-template-columns: 1fr; }
}

/* --- VLAJKY - EDITÁCIA A UPLOAD --- */
.flag-upload-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
    line-height: 0;
}

.flag-edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 10px;
    display: none;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    font-weight: bold;
    transition: var(--transition);
}

.flag-upload-container:hover .flag-edit-overlay {
    display: flex;
}

.flag-input-hidden {
    display: none !important;
}

.team-flag-edit {
    border: 2px dashed var(--border-color);
    padding: 2px;
    border-radius: 50%;
}

/* Admin Panel - Sekcie */
.admin-section {
    margin-top: 24px;
}

.admin-subsection {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(51, 65, 85, 0.4);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}

.admin-subsection h4 {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Grid pre upload vlajok */
.flag-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.flag-upload-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(51, 65, 85, 0.3);
    padding: 12px;
    border-radius: var(--radius-sm);
    text-align: center;
}

.flag-upload-item label {
    color: #fff;
    display: block;
    margin-bottom: 8px;
    word-break: break-word;
}

/* Admin events list */
.admin-event-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(51, 65, 85, 0.3);
    gap: 12px;
}

.admin-title {
    font-weight: 600;
    color: #fff;
    min-width: 200px;
}

.admin-inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.input-mini {
    width: 60px !important;
    padding: 6px !important;
    font-size: 12px !important;
}
/* Pridaj toto na koniec súboru style.css */
.match-card {
    max-width: 800px;        /* Zápas nikdy nebude širší než 800px */
    margin-left: auto;       /* Vycentruje kartu */
    margin-right: auto;      /* Vycentruje kartu */
    width: 100%;             /* Na mobiloch sa prispôsobí */
}
.matches-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px; /* Zabezpečí rovnaké medzery medzi všetkými zápasmi */
}

.match-card {
    background: var(--bg-card);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}
/* --- CENTROVANIE VÝSLEDKU A BODOV --- */
.match-card.finished {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.result-center-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 600px;
    gap: 20px;
}

.team-side {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}
.team-side.team-a { justify-content: flex-end; text-align: right; }
.team-side.team-b { justify-content: flex-start; text-align: left; }

.score-middle {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: rgba(255, 255, 255, 0.08);
    padding: 6px 18px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    min-width: 90px;
    text-align: center;
}

.match-points-info {
    margin-top: 12px;
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.points-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: bold;
}
.points-badge.success {
    background: rgba(0, 255, 200, 0.15);
    color: #00ffcc;
}
.points-badge.zero {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

/* --- NOVÉ REŽIMY A ŠTÝLY --- */

/* 1. SVETLÝ REŽIM (Light Mode) */
.layout-light {
    --bg-primary: #f4f6f9;
    --bg-card: #ffffff;
    --text-main: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --accent-neon: #0d6efd;
    --glow-neon: rgba(13, 110, 253, 0.15);
}
.layout-light .score-middle {
    background: #e9ecef;
}
.layout-light .points-badge.success {
    background: rgba(25, 135, 84, 0.15);
    color: #198754;
}

/* 2. TMAVÝ REŽIM (Pure Dark bez neónov) */
.layout-dark {
    --bg-primary: #0f1015;
    --bg-card: #181a22;
    --text-main: #f1f3f5;
    --text-muted: #969faf;
    --border-color: #2a2e3d;
    --accent-neon: #4c6ef5;
    --glow-neon: rgba(76, 110, 245, 0.2);
}

/* 3. BONUS: CYBERPUNK REŽIM (Retro-futuristický štýl) */
.layout-cyberpunk {
    --bg-primary: #0b0314;
    --bg-card: #16072b;
    --text-main: #00ffcc;
    --text-muted: #ff007f;
    --border-color: #ff007f;
    --accent-neon: #39ff14;
    --glow-neon: rgba(57, 255, 20, 0.4);
    font-family: 'Courier New', monospace;
}
.layout-cyberpunk .match-card {
    border: 2px solid var(--border-color);
    box-shadow: 0 0 8px rgba(255, 0, 127, 0.3);
}
.layout-cyberpunk .score-middle {
    color: #fffb00;
    border-color: #00ffcc;
    text-shadow: 0 0 5px #fffb00;
}
