:root {
    --bg-main: #0b0f19;
    --bg-card: rgba(30, 41, 59, 0.4);
    --bg-card-hover: rgba(30, 41, 59, 0.8);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-accent: #e2e8f0;
    --accent-blue: #3b82f6;
    --accent-indigo: #6366f1;
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(59, 130, 246, 0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   2. GLOBÁLNÍ NASTAVENÍ A RESET
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body { 
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main); 
    color: var(--text-main); 
    /* Moderní ambientní nasvícení na pozadí */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(99, 102, 241, 0.08) 0%, transparent 50%); 
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

/* Společný kontejner pro hlavní obsah */
.main, main {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.main.rules-container {
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 60px; /* Větší mezery mezi sekcemi */
}

/* ==========================================================================
   3. ODDĚLOVAČE A DROBNÉ PRVKY
   ========================================================================== */
.section-divider {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.1), transparent);
    margin: 0 auto;
    width: 100%;
    max-width: 800px;
}

/* ==========================================================================
   4. HLAVIČKA PRAVIDEL (Zachován obrázek)
   ========================================================================== */
.pravidla-header {
    /* Obrázek zachován - přidán pouze lepší plynulý přechod do barvy pozadí */
    background-image: linear-gradient(to bottom, rgba(11, 15, 25, 0.5) 0%, rgba(11, 15, 25, 1) 100%), url('/assets/img/novinky_pozadi.jpg'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax efekt */
    padding: 180px 20px 80px; 
    color: #ffffff; 
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.pravidla-header h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    /* Prémiový text s lehkým odleskem */
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    animation: fadeInDown 0.8s ease-out;
}

/* ==========================================================================
   5. SEKCE A NÁZVY (Kategorie)
   ========================================================================== */
.rules-section {
    animation: fadeIn 1s ease-out both;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 15px;
}

/* Chytré ikony: Využívá inline barvu z PHP k vytvoření záře a pozadí */
.section-title i {
    background: color-mix(in srgb, currentColor 15%, transparent);
    box-shadow: 0 0 20px color-mix(in srgb, currentColor 30%, transparent);
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 20px;
}

/* ==========================================================================
   6. GRID A KARTY S PRAVIDLY
   ========================================================================== */
.rules-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .rules-grid.grid-2 { grid-template-columns: repeat(2, 1fr); }
    .rules-grid.grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .rules-grid.grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Styl Samotné karty */
.card.rule-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Horní svítící linka karty na hover */
.card.rule-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-indigo));
    opacity: 0;
    transition: var(--transition);
}

.card.rule-card:hover { 
    transform: translateY(-4px) scale(1.01); 
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5),
                0 0 20px -5px rgba(59, 130, 246, 0.15); 
    border-color: var(--border-hover); 
    background: var(--bg-card-hover);
}

.card.rule-card:hover::before {
    opacity: 1;
}

/* Nadpis v kartě */
.rule-card h3 {
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* Seznam a odstavce s pravidly */
.rule-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rule-card ul li, .rule-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Přebarvení speciálního textu nebo důrazu */
.rule-card p, .rule-card li {
    transition: color 0.2s;
}
.card.rule-card:hover p, .card.rule-card:hover li {
    color: var(--text-accent);
}

/* Štítky (Span tagy s labely) - Nyní jako moderní "badges" */
.rule-card span {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-right: 8px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: inline-block;
    vertical-align: middle;
    transform: translateY(-1px);
}

/* ==========================================================================
   7. PATIČKA (Footer)
   ========================================================================== */
footer {
    background-color: transparent;
    padding: 40px 20px;
    margin-top: auto;
    text-align: center;
}

.copyright {
    color: #475569;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ==========================================================================
   8. ANIMACE
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Staggering efekt pro sekce - zajistí postupné načítání při skrolování */
.rules-section:nth-child(1) { animation-delay: 0.1s; }
.rules-section:nth-child(2) { animation-delay: 0.2s; }
.rules-section:nth-child(3) { animation-delay: 0.3s; }
.rules-section:nth-child(4) { animation-delay: 0.4s; }
.rules-section:nth-child(5) { animation-delay: 0.5s; }