/* ==========================================================================
   STYLE CSS: EGZAMIN.MEN – AUTORSKI SYSTEM EGZAMINACYJNY INF.03
   Autor i twórca: Paweł Paśko (PPASKO)
   Baza projektu: Zespół Szkół Agro-Technicznych w Ropczycach
   Kolorystyka: Stonowana, Przyjazna dla Oczu, Ścisła Logika Dydaktyczna
   Obsługa: Motyw Ciemny Grafit (Dark Slate) & Ciepły Papier (Soft Light)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. ZMIENNE MOTYWU – STONOWANA, PRZYJAZNA PALETA
   -------------------------------------------------------------------------- */

:root {
    /* Tła bazowe - spokojny, ciemny łupek (brak agresywnej czerni) */
    --bg-base: #0d1424;
    --bg-surface: #131d33;
    --bg-card: #18253f;
    --bg-card-hover: #1f3050;
    --bg-input: #090e1a;
    --bg-nav: rgba(19, 29, 51, 0.95);
    
    /* Ramki o niskim, naturalnym kontraście */
    --border-subtle: rgba(148, 163, 184, 0.14);
    --border-hover: rgba(148, 163, 184, 0.3);
    --border-focus: #10b981;
    
    /* Barwy Tożsamości: Bordowy Sygnet & Miodowy Złoty Kłos */
    --color-brand-wine: #9b2226;
    --color-brand-wine-soft: rgba(155, 34, 38, 0.16);
    
    --accent-gold: #f59e0b;
    --accent-gold-dark: #d97706;
    --accent-gold-soft: rgba(245, 158, 11, 0.14);
    
    --accent-emerald: #10b981;        /* Szmaragdowa zieleń sukcesu / zaliczenia */
    --accent-emerald-soft: rgba(16, 185, 129, 0.14);
    --accent-emerald-text: #34d399;
    
    --accent-sky: #0284c7;            /* Przyjazny błękit kodu i zapytań SQL */
    --accent-sky-soft: rgba(2, 132, 199, 0.14);
    --accent-sky-text: #38bdf8;
    
    --accent-indigo: #6366f1;         /* Fiolet PHP */
    --accent-indigo-soft: rgba(99, 102, 241, 0.14);
    --accent-indigo-text: #818cf8;
    
    --accent-rose: #e11d48;           /* Czerwień ostrzeżeń CKE */
    --accent-rose-soft: rgba(225, 29, 72, 0.12);
    --accent-rose-text: #fb7185;
    
    /* Typografia */
    --text-primary: #f1f5f9;          /* Miękka biel (Slate 100) */
    --text-secondary: #94a3b8;        /* Slate 400 */
    --text-muted: #64748b;            /* Slate 500 */
    
    /* Cienie */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.38);
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* MOTYW JASNY: CIEPŁY PAPIER (DO SALI LEKCYJNEJ I NA RZUTNIK) */
[data-theme="light"] {
    --bg-base: #f8fafc;
    --bg-surface: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-input: #f8fafc;
    --bg-nav: rgba(255, 255, 255, 0.95);
    
    --border-subtle: rgba(15, 23, 42, 0.1);
    --border-hover: rgba(15, 23, 42, 0.22);
    --border-focus: #059669;
    
    --color-brand-wine: #80181b;
    --color-brand-wine-soft: rgba(128, 24, 27, 0.1);
    
    --accent-gold: #b45309;
    --accent-gold-dark: #92400e;
    --accent-gold-soft: rgba(180, 83, 9, 0.12);
    
    --accent-emerald: #059669;
    --accent-emerald-soft: rgba(5, 150, 105, 0.12);
    --accent-emerald-text: #047857;
    
    --accent-sky: #0284c7;
    --accent-sky-soft: rgba(2, 132, 199, 0.1);
    --accent-sky-text: #0369a1;
    
    --accent-indigo: #4f46e5;
    --accent-indigo-soft: rgba(79, 70, 229, 0.1);
    --accent-indigo-text: #4338ca;
    
    --accent-rose: #be123c;
    --accent-rose-soft: rgba(190, 18, 60, 0.1);
    --accent-rose-text: #be123c;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 10px 24px rgba(15, 23, 42, 0.12);
}

/* --------------------------------------------------------------------------
   2. RESET & PODSTAWY
   -------------------------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --------------------------------------------------------------------------
   3. GŁÓWNY NAGŁÓWEK NAWIGACJI (BRANDING EGZAMIN.MEN & PPASKO)
   -------------------------------------------------------------------------- */
.site-navbar {
    background: var(--bg-nav);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.25s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    max-width: 1180px;
    margin: 0 auto;
    gap: 16px;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

/* ==========================================================================
   NOWE INTERAKTYWNE LOGO PORTALU: <e.m> -> <egzamin.men>
   Parafraza znacznika <em> (HTML: emfaza / szczególna waga)
   ========================================================================== */
.nav-brand-slot {
    display: inline-flex;
    align-items: center;
    position: relative;
    padding-left: 6.05ch; /* Bufor lewostronny: kompensuje 'gzamin' i unieruchamia kropkę w miejscu */
    width: 280px;         /* Stała, zablokowana szerokość slotu - menu obok nigdy się nie poruszy! */
    min-width: 280px;
    max-width: 280px;
    flex-shrink: 0;
    z-index: 5;           /* Niższy z-index: logo wjeżdża pod menu jeśli zabraknie miejsca */
}

.footer-brand-slot {
    display: inline-flex;
    align-items: center;
    position: relative;
    padding-left: 0;
    flex-shrink: 0;
}

.logo-em-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 2.15rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    padding: 6px 16px;
    border-radius: 12px;
    background: #090e1a;
    border: 1.5px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 10px rgba(239, 68, 68, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(0);
    position: relative;
    z-index: 5; /* W razie rozszerzenia logo wjeżdża pod nieruchome menu */
}

.logo-em-brand:hover,
.logo-em-brand:focus-visible,
.logo-em-brand.touch-active {
    border-color: #ef4444;
    background: #0f172a;
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.35), 0 0 20px rgba(239, 68, 68, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    /* Przesunięcie całej ramki dokładnie o szerokość 'gzamin' w lewo -> kropka . pozostaje idealnie nieruchoma */
    transform: translateX(-6.02ch) translateY(-1px);
}

/* Czerwone nawiasy < oraz > */
.logo-em-bracket {
    color: #ef4444 !important;
    font-weight: 900;
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), text-shadow 0.35s ease;
    text-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}

.logo-em-brand:hover .logo-em-bracket-left,
.logo-em-brand.touch-active .logo-em-bracket-left {
    transform: translateX(-4px);
    text-shadow: 0 0 18px rgba(239, 68, 68, 0.95);
}

.logo-em-brand:hover .logo-em-bracket-right,
.logo-em-brand.touch-active .logo-em-bracket-right {
    transform: translateX(4px);
    text-shadow: 0 0 18px rgba(239, 68, 68, 0.95);
}

/* Ciało logotypu */
.logo-em-body {
    display: inline-flex;
    align-items: baseline;
    overflow: hidden;
    padding: 0 1px;
}

/* Biały tekst liter e oraz m */
.logo-em-letter {
    color: #ffffff !important;
    font-weight: 800;
    display: inline-block;
}

/* Mocno czerwona kropka - w 100% stacjonarna kotwica całego znaku */
.logo-em-dot {
    color: #ef4444 !important;
    font-weight: 900;
    margin: 0 1px;
    display: inline-block;
    transition: transform 0.35s ease, text-shadow 0.35s ease;
    text-shadow: 0 0 12px rgba(239, 68, 68, 0.7);
}

.logo-em-brand:hover .logo-em-dot,
.logo-em-brand.touch-active .logo-em-dot {
    transform: scale(1.25);
    text-shadow: 0 0 20px rgba(239, 68, 68, 1);
}

/* Rozsuwane części: "gzamin" (w lewo) oraz "en" (w prawo) - białe litery */
.logo-em-expand {
    display: inline-block;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: bottom;
    color: #ffffff !important;
    font-weight: 800;
    transition: max-width 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.3s ease;
}

.logo-em-brand:hover .logo-em-expand-left,
.logo-em-brand.touch-active .logo-em-expand-left {
    max-width: 6.2ch;
    opacity: 1;
}

.logo-em-brand:hover .logo-em-expand-right,
.logo-em-brand.touch-active .logo-em-expand-right {
    max-width: 2.2ch;
    opacity: 1;
}

/* W TRYBIE JASNYM: ciemnoniebieski kolor liter e oraz m, czerwone nawiasy i kropka */
[data-theme="light"] .logo-em-brand {
    background: #e2e8f0;
    border-color: rgba(239, 68, 68, 0.45);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08), 0 0 10px rgba(239, 68, 68, 0.12);
}

[data-theme="light"] .logo-em-brand:hover,
[data-theme="light"] .logo-em-brand:focus-visible,
[data-theme="light"] .logo-em-brand.touch-active {
    background: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.25), 0 0 16px rgba(239, 68, 68, 0.2);
}

[data-theme="light"] .logo-em-letter,
[data-theme="light"] .logo-em-expand {
    color: #0f2b5c !important; /* elegancki ciemnoniebieski */
}

[data-theme="light"] .logo-em-bracket {
    color: #ef4444 !important; /* soczysty czerwony */
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

[data-theme="light"] .logo-em-dot {
    color: #ef4444 !important; /* soczysty czerwony */
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

/* Wersja stopki */
.footer-logo-em {
    font-size: 1.8rem;
    padding: 5px 12px;
}

@media (max-width: 768px) {
    .nav-brand-slot,
    .footer-brand-slot {
        padding-left: 0;
        min-width: auto;
    }
    .logo-em-brand {
        font-size: 1.6rem;
        padding: 4px 10px;
    }
    .logo-em-brand:hover,
    .logo-em-brand:focus-visible,
    .logo-em-brand.touch-active {
        transform: translateY(-1px);
    }
}

/* KOMPATYBILNOŚĆ Z POPRZEDNIM WIDOKIEM LOGO SVG */
.portal-header-logo-svg {
    height: 54px;
    width: auto;
    display: block;
    transition: transform 0.2s ease;
}

.portal-header-logo-svg:hover {
    transform: scale(1.02);
}

.author-pill {
    background: var(--color-brand-wine-soft);
    border: 1px solid rgba(155, 34, 38, 0.4);
    color: #fca5a5;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 5px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

[data-theme="light"] .author-pill {
    color: var(--color-brand-wine);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin-left: auto; /* Teksty nawigacji sformatowane do prawej strony: pozostają idealnie nieruchome przy rozsuwaniu logo */
    position: relative;
    z-index: 25; /* Menu ZAWSZE na wierzchu - logo wjeżdża pod menu */
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 7px 11px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    position: relative;
    z-index: 25; /* Przyciski nawigacji na wierzchu */
}

.countdown-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 5px 11px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-gold);
    font-family: var(--font-mono);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.theme-toggle-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

/* --------------------------------------------------------------------------
   4. HERO BANNER: AUTORSKA WIZYTÓWKA EGZAMIN.MEN & PPASKO
   -------------------------------------------------------------------------- */
.hero-banner {
    padding: 35px 0 24px;
}

.author-hero-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 26px;
    position: relative;
    overflow: hidden;
}

.author-hero-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(to bottom, var(--accent-gold), var(--color-brand-wine));
}

.author-hero-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 780px;
}

.hero-domain-title {
    font-size: clamp(2.2rem, 4.4vw, 3.2rem);
    font-weight: 900;
    letter-spacing: -0.5px;
    line-height: 1.15;
    color: #ffffff !important;
    font-family: 'JetBrains Mono', 'Fira Code', 'Inter', monospace;
    display: inline-flex;
    align-items: baseline;
    margin: 6px 0;
}

.hero-domain-title .domain-name,
.hero-domain-title .domain-tld {
    color: #ffffff !important;
    font-weight: 900;
}

.hero-domain-title .domain-dot {
    color: #ef4444 !important;
    font-weight: 900;
    margin: 0 1px;
    text-shadow: 0 0 18px rgba(239, 68, 68, 0.8), 0 0 8px rgba(239, 68, 68, 0.6);
    display: inline-block;
}

.hero-author-signature {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.hero-author-signature strong {
    color: var(--text-primary);
    font-weight: 700;
}

.hero-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.author-hero-badge-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    min-width: 200px;
}

.school-crest-img {
    height: 58px;
    width: auto;
    object-fit: contain;
}

.crest-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1.3;
}



/* --------------------------------------------------------------------------
   6. TABLICA OGŁOSZEŃ PRACOWNI PPASKO (ŻELAZNA LOGIKA NAUCZANIA)
   -------------------------------------------------------------------------- */
.board-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 35px;
    box-shadow: var(--shadow-sm);
}

.board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.board-title {
    font-size: 1.15rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.board-author-tag {
    font-size: 0.74rem;
    background: var(--accent-gold-soft);
    color: var(--accent-gold);
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 700;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.board-controls-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.board-counter-badge {
    font-size: 0.74rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    background: var(--bg-card);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
}

.board-control-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 4px 11px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.board-control-btn:hover {
    border-color: #ef4444;
    background: var(--bg-surface-hover);
    transform: translateY(-1px);
}

.board-filters-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.board-filter-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.board-filter-pill:hover {
    color: var(--text-primary);
    border-color: rgba(239, 68, 68, 0.5);
}

.board-filter-pill.active {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.35);
}

.board-timer-track {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    margin-bottom: 16px;
    overflow: hidden;
    position: relative;
}

.board-timer-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ef4444, #f59e0b);
    transition: width 0.1s linear;
}

.board-section.is-hovered .board-timer-fill {
    background: #10b981;
}

.board-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-items: stretch;
    height: 520px;
    min-height: 520px;
    max-height: 520px;
    box-sizing: border-box;
    overflow: hidden;
    transition: opacity 0.16s ease-in-out;
}

.board-grid.fade-transition {
    opacity: 0.15;
}

@media (max-width: 1024px) {
    .board-grid {
        grid-template-columns: repeat(2, 1fr);
        height: 560px;
        min-height: 560px;
        max-height: 560px;
    }
}

@media (max-width: 720px) {
    .board-grid {
        grid-template-columns: 1fr;
        height: auto;
        min-height: auto;
        max-height: none;
        overflow: visible;
    }
}

.board-card-rule {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    max-height: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.board-card-rule::-webkit-scrollbar {
    width: 4px;
}

.board-card-rule::-webkit-scrollbar-track {
    background: transparent;
}

.board-card-rule::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.board-card-rule::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold);
}

.board-card-rule:hover {
    border-color: rgba(239, 68, 68, 0.45);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.rule-top-content {
    display: flex;
    flex-direction: column;
}

.rule-bottom-content {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
}

.rule-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

.rule-action-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.73rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.rule-action-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--accent-gold);
}

.rule-test-btn:hover {
    border-color: var(--accent-sky);
    color: var(--accent-sky-text);
}

.rule-file-btn {
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.rule-file-btn:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #6ee7b7;
}

.rule-header {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rule-header .step-badge {
    background: var(--color-brand-wine-soft);
    color: #fca5a5;
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 800;
    font-family: var(--font-mono);
    letter-spacing: 0.4px;
}

.step-badge-html {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

.step-badge-css {
    background: rgba(14, 165, 233, 0.15) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(14, 165, 233, 0.3) !important;
}

.step-badge-js {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

.step-badge-php {
    background: rgba(168, 85, 247, 0.15) !important;
    color: #c084fc !important;
    border: 1px solid rgba(168, 85, 247, 0.3) !important;
}

.step-badge-mysql {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

.didactic-steps-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.83rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.didactic-steps-list li {
    padding-left: 18px;
    position: relative;
}

.didactic-steps-list li::before {
    content: '•';
    position: absolute;
    left: 4px;
    color: var(--accent-gold);
    font-weight: bold;
}

.didactic-steps-list li strong {
    color: var(--text-primary);
}

.didactic-steps-list code {
    background: var(--bg-input);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    color: var(--accent-sky-text);
    font-size: 0.79rem;
}

.rule-trap-alert {
    margin-top: 10px;
    padding: 8px 10px;
    background: var(--accent-rose-soft);
    border-left: 3px solid var(--accent-rose);
    border-radius: 0 6px 6px 0;
    font-size: 0.77rem;
    color: var(--text-primary);
}

.rule-trap-alert strong {
    color: var(--accent-rose-text);
}

/* Wyszukiwarka w belce Bazy Wiedzy */
.board-search-bar {
    display: flex;
    align-items: center;
    background: #ffffff !important;
    border: 2px solid #cbd5e1;
    border-radius: 28px;
    padding: 9px 18px;
    gap: 12px;
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transition: all 0.2s ease;
}

.board-search-bar:focus-within {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25), 0 6px 18px rgba(0, 0, 0, 0.18) !important;
    background: #ffffff !important;
}

.board-search-icon {
    font-size: 1.1rem;
    color: #475569;
    opacity: 1;
    user-select: none;
}

.board-search-input {
    background: transparent !important;
    border: none !important;
    color: #0f172a !important;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    width: 100%;
    outline: none;
}

.board-search-input::placeholder {
    color: #64748b !important;
    font-weight: 400;
}

.board-search-clear-btn {
    background: #f1f5f9;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.95rem;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.board-search-clear-btn:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* MODAL: PEŁNY SPIS 175 ATOMÓW WIEDZY */
.catalog-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.catalog-modal-window {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    width: 100%;
    max-width: 920px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.catalog-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-card);
}

.catalog-modal-title {
    font-size: 1.05rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.catalog-modal-close {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 1.1rem;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.catalog-modal-close:hover {
    color: #ef4444;
    border-color: #ef4444;
    background: var(--bg-surface);
}

.catalog-modal-body {
    padding: 18px 22px;
    overflow-y: auto;
    flex: 1;
}

.catalog-modal-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.catalog-filter-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.catalog-filter-pill:hover {
    color: var(--text-primary);
    border-color: rgba(239, 68, 68, 0.5);
}

.catalog-filter-pill.active {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

.catalog-cards-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.catalog-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.catalog-item-row:hover {
    border-color: #ef4444;
    transform: translateX(4px);
    background: var(--bg-surface-hover);
}

.catalog-item-idx {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-muted);
    min-width: 32px;
}

.catalog-item-info {
    flex: 1;
    min-width: 0;
}

.catalog-item-info strong {
    display: block;
    font-size: 0.88rem;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.catalog-item-info p {
    margin: 0;
    font-size: 0.74rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.catalog-view-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 0.74rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.catalog-item-row:hover .catalog-view-btn {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

/* --------------------------------------------------------------------------
   7. KATALOG MODUŁÓW PRAKTYCZNYCH
   -------------------------------------------------------------------------- */
.section-title-wrap {
    margin-bottom: 22px;
}

.section-title-wrap h2 {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--text-primary);
}

.section-title-wrap p {
    font-size: 0.86rem;
    color: var(--text-muted);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

@media (max-width: 1024px) {
    .modules-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 720px) {
    .modules-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   3 RZĘDY PO 3 KAFELKI: HTML/CSS, JAVASCRIPT, PHP/MYSQL
   KOLUMNA 1 (LEWA): ZIELONA RAMKA - PODSTAWY
   KOLUMNA 2 (ŚRODEK): ŻÓŁTA/POMARAŃCZOWA RAMKA - EGZAMINACYJNY CKE
   KOLUMNA 3 (PRAWA): CZERWONA RAMKA - EKSPERT
   ========================================================================== */
.modules-domain-section {
    margin-bottom: 40px;
}

.modules-domain-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-subtle);
    flex-wrap: wrap;
    gap: 10px;
}

.modules-domain-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modules-domain-subtag {
    font-size: 0.76rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.modules-3col-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .modules-3col-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 720px) {
    .modules-3col-row {
        grid-template-columns: 1fr;
    }
}

/* POZIOM 1: PODSTAWY (LEKKA ZIELONA RAMKA) */
.card-level-podstawy {
    border: 1.5px solid rgba(16, 185, 129, 0.45) !important;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.04) 0%, var(--bg-card) 100%) !important;
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.05);
}

.card-level-podstawy:hover {
    border-color: #10b981 !important;
    box-shadow: 0 6px 26px rgba(16, 185, 129, 0.22);
    transform: translateY(-2px);
}

.badge-level-podstawy {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
}

/* POZIOM 2: EGZAMINACYJNY / GRUNTOWNY (ŻÓŁTY / POMARAŃCZ) */
.card-level-egzamin {
    border: 1.5px solid rgba(245, 158, 11, 0.45) !important;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.04) 0%, var(--bg-card) 100%) !important;
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.05);
}

.card-level-egzamin:hover {
    border-color: #f59e0b !important;
    box-shadow: 0 6px 26px rgba(245, 158, 11, 0.22);
    transform: translateY(-2px);
}

.badge-level-egzamin {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
}

/* POZIOM 3: EKSPERT (CZERWONA RAMKA) */
.card-level-ekspert {
    border: 1.5px solid rgba(239, 68, 68, 0.5) !important;
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.04) 0%, var(--bg-card) 100%) !important;
    box-shadow: 0 4px 18px rgba(239, 68, 68, 0.05);
}

.card-level-ekspert:hover {
    border-color: #ef4444 !important;
    box-shadow: 0 6px 26px rgba(239, 68, 68, 0.25);
    transform: translateY(-2px);
}

.badge-level-ekspert {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
}

.module-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.module-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.module-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.73rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 5px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.badge-js { background: var(--accent-gold-soft); color: var(--accent-gold); }
.badge-php { background: var(--accent-indigo-soft); color: var(--accent-indigo-text); }
.badge-css { background: var(--accent-emerald-soft); color: var(--accent-emerald-text); }
.badge-sql { background: var(--accent-sky-soft); color: var(--accent-sky-text); }

.module-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.module-card p {
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 16px;
}

.module-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.tech-tag {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    background: var(--bg-surface);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
    padding: 2px 7px;
    border-radius: 4px;
}

.module-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}

/* --------------------------------------------------------------------------
   8. PRZYCISKI
   -------------------------------------------------------------------------- */
.btn-action-primary {
    background: var(--color-brand-wine);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.84rem;
    padding: 10px 16px;
    border-radius: 7px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-action-primary:hover {
    background: #b72b30;
    transform: translateY(-1px);
    color: #ffffff;
}

.btn-action-secondary {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.84rem;
    padding: 9px 14px;
    border-radius: 7px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.btn-action-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

/* --------------------------------------------------------------------------
   9. TESTER KODU & QUIZ
   -------------------------------------------------------------------------- */
.interactive-tools-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
    margin-bottom: 40px;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.tool-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.tester-textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 10px 12px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--accent-sky-text);
    resize: vertical;
    min-height: 85px;
    outline: none;
    margin-bottom: 10px;
}

.tester-textarea:focus {
    border-color: var(--border-focus);
}

.tester-console {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 8px 10px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-secondary);
    min-height: 30px;
    margin-bottom: 12px;
    word-break: break-all;
}

.quiz-options-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.quiz-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 9px 12px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
}

.quiz-btn:hover:not(:disabled) {
    background: var(--accent-gold-soft);
    border-color: var(--accent-gold);
    color: var(--text-primary);
}

.quiz-btn.correct {
    background: var(--accent-emerald-soft) !important;
    border-color: var(--accent-emerald) !important;
    color: var(--accent-emerald-text) !important;
    font-weight: 700;
}

.quiz-btn.wrong {
    background: var(--accent-rose-soft) !important;
    border-color: var(--accent-rose) !important;
    color: var(--accent-rose-text) !important;
    font-weight: 700;
}

.quiz-feedback-box {
    margin-top: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    min-height: 20px;
}

/* --------------------------------------------------------------------------
   10. SZLACHECKIE PIGUŁKI WIEDZY (TEORIA Z LOGIKĄ UCZNIA)
   -------------------------------------------------------------------------- */
.theory-wrap {
    padding: 20px 0 45px;
    border-top: 1px solid var(--border-subtle);
}

.theory-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.theory-tab-chip {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 7px 15px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.theory-tab-chip:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.theory-tab-chip.active {
    background: var(--color-brand-wine-soft);
    border-color: var(--color-brand-wine);
    color: #fca5a5;
}

[data-theme="light"] .theory-tab-chip.active {
    color: var(--color-brand-wine);
}

.theory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 18px;
}

.theory-pill-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.theory-pill-card h4 {
    font-size: 1.12rem;
    font-weight: 700;
    margin: 8px 0 10px;
    color: var(--text-primary);
}

.code-box-small {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 10px 12px;
    font-family: var(--font-mono);
    font-size: 0.79rem;
    color: var(--accent-sky-text);
    position: relative;
    margin: 10px 0 12px;
    overflow-x: auto;
}

.copy-mini-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 4px;
    cursor: pointer;
}

.copy-mini-btn:hover {
    color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   11. STOPKA: WYRAŹNE COPYRIGHT PPASKO & DOMENA EGZAMIN.MEN
   -------------------------------------------------------------------------- */
.site-footer {
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    padding: 32px 0 28px 0;
    transition: background-color 0.25s ease;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 320px;
}

.footer-logo-static {
    display: inline-flex;
    align-items: center;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1;
    user-select: none;
    padding: 6px 14px;
    border-radius: 8px;
    background: #090e1a;
    border: 1.5px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    color: #ffffff;
    letter-spacing: -0.5px;
    transition: none;
}

[data-theme="light"] .footer-logo-static {
    background: #e2e8f0;
    border-color: rgba(239, 68, 68, 0.5);
    color: #0f2b5c;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .footer-logo-static .logo-em-letter {
    color: #0f2b5c !important;
}

[data-theme="light"] .footer-logo-static .logo-em-bracket,
[data-theme="light"] .footer-logo-static .logo-em-dot {
    color: #ef4444 !important;
}

.footer-school-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    opacity: 0.9;
    flex-shrink: 0;
}

.footer-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.footer-copyright {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
}

.footer-subinfo {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.footer-motto {
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 0.8rem;
    margin-top: 2px;
}

.footer-school-info {
    color: var(--text-muted);
    font-size: 0.74rem;
    line-height: 1.4;
}

.footer-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.footer-domain-badge {
    font-size: 0.86rem;
    color: var(--text-primary);
}

.footer-status-pill {
    color: var(--accent-emerald-text);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    margin-top: 2px;
}

/* TOAST */
.site-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bg-surface);
    border: 1px solid var(--accent-gold);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    transform: translateY(60px);
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 1000;
}

.site-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* --------------------------------------------------------------------------
   12. RESPONSYWNOŚĆ
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
    .nav-links { display: none; }
    .nav-actions { margin-left: auto; }
    .interactive-tools-grid { grid-template-columns: 1fr; }
    .author-hero-card { flex-direction: column; text-align: left; }
    .author-hero-badge-box { width: 100%; }
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-left { flex-direction: column; }
    .footer-right { text-align: center; }
}

/* ==========================================================================
   ROZSZERZENIA TECHNICZNE: ANTY-AI CRAFTSMANSHIP (SALA 220)
   1. Interaktywny Circuit Canvas w tle
   2. Paski kontrolne w nawigacji
   3. Zunifikowane Stanowisko Deweloperskie: Tester & Konsola CLI
   4. Holograficzne podświetlenie krawędzi Bento
   ========================================================================== */

/* 1. CIRCUIT CANVAS (TŁO HARDWARE) */
.circuit-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.22;
}

/* 2. DEV PIGUŁKI KONTROLNE W NAWIGACJI */
.nav-control-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 6px 11px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    user-select: none;
}

.nav-control-pill:hover,
.nav-control-pill.active {
    background: #1e293b;
    border-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.terminal-nav-pill code {
    color: #38bdf8;
    font-family: var(--font-mono);
    font-weight: 800;
}

/* 3. ZUNIFIKOWANE STANOWISKO DEWELOPERSKIE (TESTER & CLI) */
.dev-workstation-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border-subtle);
    border-radius: 14px;
    padding: 20px;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.workstation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.workstation-tabs {
    display: flex;
    gap: 8px;
}

.ws-tab-btn {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ws-tab-btn:hover {
    color: #ffffff;
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(30, 41, 59, 0.9);
}

.ws-tab-btn.active {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.4);
}

.workstation-badge {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--accent-gold);
    font-family: var(--font-mono);
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 4px 10px;
    border-radius: 6px;
}

.ws-tab-pane {
    display: none;
}

.ws-tab-pane.active {
    display: block;
}

.tester-snippets-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.snippet-chip,
.cli-chip {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(51, 65, 85, 0.8);
    color: #cbd5e1;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-mono);
    transition: all 0.15s ease;
}

.snippet-chip:hover,
.cli-chip:hover {
    border-color: #f59e0b;
    color: #ffffff;
    background: rgba(51, 65, 85, 0.9);
    transform: translateY(-1px);
}

.cli-quick-chips {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tester-actions-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* WBUDOWANY TERMINAL W KARTĘ */
.embedded-terminal-window {
    background: #090e1a;
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.6);
}

.embedded-terminal-body {
    height: 230px;
    padding: 12px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    line-height: 1.5;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.term-ascii-mini {
    color: #ef4444;
    font-size: 0.48rem;
    line-height: 1.15;
    margin: 0;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
    user-select: none;
}

.term-line.info-line { color: #38bdf8; }
.term-line.cmd-line { color: #ffffff; font-weight: 700; }
.term-line.success-line { color: #34d399; }
.term-line.warn-line { color: #f59e0b; }
.term-line.error-line { color: #f87171; }

.embedded-terminal-input-bar {
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(51, 65, 85, 0.6);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.term-prompt {
    color: #34d399;
    font-weight: 800;
    font-size: 0.78rem;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
}

.term-input {
    flex: 1;
    background: none;
    border: none;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    outline: none;
}

.term-send-btn {
    background: #ef4444;
    color: #ffffff;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: background 0.2s ease;
}

.term-send-btn:hover {
    background: #dc2626;
}

/* 4. HOLOGRAFICZNE PODŚWIETLENIE KRAWĘDZI BENTO */
.author-hero-card,
.tool-card,
.dev-workstation-card {
    position: relative;
    overflow: hidden;
}

.board-card-rule {
    position: relative;
    overflow-y: auto !important;
    overflow-x: hidden;
}

.board-card-rule::before,
.author-hero-card::before,
.tool-card::before,
.dev-workstation-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: radial-gradient(350px circle at var(--mouse-x, -500px) var(--mouse-y, -500px), rgba(239, 68, 68, 0.35), transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: opacity 0.3s ease;
    opacity: 0;
    z-index: 2;
}

.board-card-rule:hover::before,
.author-hero-card:hover::before,
.tool-card:hover::before,
.dev-workstation-card:hover::before {
    opacity: 1;
}

.theme-icon-only-btn {
    padding: 6px 10px;
    min-width: 38px;
    justify-content: center;
}

/* ==============================================================================
 * 14. STANOWISKO WIELOJĘZYCZNE (SQL, JS, HTML/CSS, PHP) & LEKSYKON DOKUMENTACJI
 * ============================================================================== */
.engine-selector-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.engine-selector-label {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 4px;
}

.engine-btn {
    background: rgba(30, 41, 59, 0.6);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.2s ease;
}

[data-theme="light"] .engine-btn {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}

.engine-btn:hover {
    background: rgba(51, 65, 85, 0.8);
    color: var(--text-main);
    border-color: rgba(148, 163, 184, 0.4);
}

.engine-btn.active {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

.engine-pane {
    display: none;
    flex-direction: column;
    gap: 10px;
}

.engine-pane.active {
    display: flex;
}

/* PASEK STANU BAZY DANYCH SQL */
.sql-db-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.76rem;
    flex-wrap: wrap;
    gap: 8px;
}

[data-theme="light"] .sql-db-bar {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.sql-db-info {
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.sql-db-tables code {
    color: var(--accent-emerald-text);
}

.sql-db-actions {
    display: flex;
    gap: 6px;
}

.sql-mini-btn {
    background: rgba(51, 65, 85, 0.5);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sql-mini-btn:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

/* WIDOK TABELI WYNIKÓW SQL */
.sql-console {
    max-height: 260px;
    overflow-x: auto;
    overflow-y: auto;
}

.sql-result-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    margin-top: 6px;
}

.sql-result-table th {
    background: rgba(30, 41, 59, 0.95);
    color: #38bdf8;
    padding: 6px 10px;
    text-align: left;
    border: 1px solid rgba(51, 65, 85, 0.6);
    position: sticky;
    top: 0;
    font-weight: 800;
}

[data-theme="light"] .sql-result-table th {
    background: #e2e8f0;
    color: #0369a1;
    border-color: #cbd5e1;
}

.sql-result-table td {
    padding: 6px 10px;
    border: 1px solid rgba(51, 65, 85, 0.4);
    color: var(--text-secondary);
}

[data-theme="light"] .sql-result-table td {
    border-color: #e2e8f0;
    color: #1e293b;
}

.sql-result-table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .sql-result-table tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

.sql-status-msg {
    padding: 8px 12px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
}

.sql-status-success {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.sql-status-error {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* PODGLĄD NA ŻYWO HTML/CSS */
.html-preview-box {
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    background: #ffffff;
    overflow: hidden;
    margin-top: 4px;
}

.html-preview-header {
    background: #0f172a;
    color: #94a3b8;
    padding: 6px 12px;
    font-size: 0.72rem;
    font-family: var(--font-mono);
    border-bottom: 1px solid #1e293b;
}

.html-preview-render-area {
    padding: 14px;
    min-height: 120px;
    color: #0f172a;
}

/* KARTY DOKUMENTACJI W TERMINALU */
.term-doc-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1.5px solid rgba(239, 68, 68, 0.4);
    border-radius: 6px;
    padding: 12px;
    margin: 6px 0;
    font-family: var(--font-mono);
}

.doc-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(51, 65, 85, 0.6);
    padding-bottom: 6px;
    margin-bottom: 8px;
}

.doc-card-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #ffffff;
}

.doc-lang-pill {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.doc-lang-mysql { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.doc-lang-php { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }
.doc-lang-js { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.doc-lang-html { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
.doc-lang-css { background: rgba(14, 165, 233, 0.2); color: #38bdf8; border: 1px solid rgba(14, 165, 233, 0.4); }

.doc-card-section {
    margin-bottom: 6px;
    font-size: 0.78rem;
    line-height: 1.45;
}

.doc-sec-label {
    color: #94a3b8;
    font-size: 0.68rem;
    text-transform: uppercase;
    font-weight: 700;
}

.doc-syntax-box {
    background: #020617;
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 4px;
    padding: 5px 8px;
    color: #38bdf8;
    font-size: 0.76rem;
    margin: 3px 0;
}

.doc-example-box {
    background: #020617;
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 4px;
    padding: 6px 8px;
    color: #a7f3d0;
    font-size: 0.76rem;
    margin: 3px 0;
    white-space: pre-wrap;
}

.doc-cke-trap {
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid #f59e0b;
    padding: 4px 8px;
    color: #fbbf24;
    font-size: 0.74rem;
    margin-top: 6px;
}

.term-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 6px;
    margin: 8px 0;
}

.term-list-item {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.term-list-item:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}


/* ==============================================================
   5. STREFA GIER EDUKACYJNYCH INF.03 (NOWOŚĆ)
   ============================================================== */
.games-showcase-section {
    margin-top: 50px;
    margin-bottom: 50px;
}

.games-section-header {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 36px auto;
}

.games-badge-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #f59e0b;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.games-section-header h2 {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.games-section-header p {
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s, box-shadow 0.25s;
    position: relative;
    overflow: hidden;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.game-card.game-agro:hover { border-color: #10b981; }
.game-card.game-sql:hover { border-color: #ef4444; }
.game-card.game-dom:hover { border-color: #38bdf8; }
.game-card.game-selector:hover { border-color: #f59e0b; }

.game-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.game-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    border: 1px solid var(--border-subtle);
}

.game-tag-badge {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-css { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.tag-sql { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.tag-js { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.tag-selector { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.game-card-body h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.game-card-body p {
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.game-features-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.game-features-list span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.btn-play-game {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-play-game:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.game-agro .btn-play-game:hover {
    background: #10b981;
    border-color: #10b981;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.game-dom .btn-play-game:hover {
    background: #0284c7;
    border-color: #0284c7;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.game-selector .btn-play-game:hover {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #000;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

@media (max-width: 1200px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
}
