/* ZÁKLADNÝ RESET A ŠTÝLY */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

@keyframes pulseGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    background-color: #040712;
    background-image: 
        radial-gradient(circle at 10% 15%, rgba(37, 99, 235, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 90% 85%, rgba(147, 51, 234, 0.35) 0%, transparent 50%),
        linear-gradient(rgba(4, 7, 18, 0.85), rgba(4, 7, 18, 0.95)), 
        url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?q=80&w=1920&auto=format&fit=crop');
    background-size: 200% 200%;
    background-attachment: fixed;
    animation: pulseGlow 40s linear infinite;
    color: #c0c5ce;
    font-size: 14px;
}

/* SKRYTIE ENDORA REKLÁM HORE A DOLE */
body > div:not(.site-wrapper), div[style*="z-index: 2147483647"], img[src*="endora"], div[style*="background: #fff"] {
    display: none !important;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* POSUVNÍK */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0d1117; }
::-webkit-scrollbar-thumb { background: #1f2937; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3b82f6; }

/* WRAPPER WEBU - JEDNOTNÁ ŠÍRKA */
.site-wrapper {
    max-width: 1360px;
    margin: 20px auto;
    min-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: rgba(13, 17, 23, 0.96);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.25);
    overflow: hidden;
}

/* HLAVIČKA */
.main-header {
    background: #0d1117;
    border-bottom: 2px solid #1f2937;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 1px;
}

.logo i {
    color: #3b82f6;
    font-size: 24px;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
}

.highlight { color: #3b82f6; }

/* NAVIGAČNÉ MENU */
.main-nav ul {
    display: flex;
    gap: 5px;
}

.main-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    color: #9ca3af;
    font-weight: 600;
    font-size: 13px;
    border-radius: 6px;
    transition: 0.2s;
}

.main-nav a:hover, .main-nav a.active {
    color: #3b82f6;
    background: #1f2937;
}

/* AUTH / PROFIL VPRAVO */
.auth-box {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-login, .btn-register {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

.btn-login {
    background: #1f2937;
    color: #ffffff;
    border: 1px solid #374151;
}
.btn-login:hover { background: #374151; }

.btn-register {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.4);
}
.btn-register:hover { background: #1d4ed8; }

/* HLAVNÝ OBSAH */
.content-container {
    padding: 30px;
    flex-grow: 1;
    width: 100%;
}

/* SAMOSTATNÉ KARTY A BLOKY (DARK MÓD) */
.hero-slider, 
.content-box {
    background: #0d1117;
    border: 1px solid #1f2937;
    border-radius: 10px;
    padding: 22px;
    margin-bottom: 30px;
}

/* Vynulovanie spodného marginu pre položky v zozname shoutboxu */
#shoutsContainer .content-box,
#homeShoutboxList .content-box,
.shout-item-box {
    margin-bottom: 0 !important;
}

html:not([data-theme="light"]) input#homeShoutInput,
html:not([data-theme="light"]) input[type="text"],
html:not([data-theme="light"]) textarea,
html:not([data-theme="light"]) select,
html:not([data-theme="light"]) button[title="Vybrať emoji"] {
    background: #10151d !important;
    border: 1px solid #374151 !important;
    color: #fff !important;
}

/* GLOBÁLNE ODSTRÁNENIE FOKUSU/OBRYSU PO KLIKNUTÍ */
a:focus, a:active, button:focus, button:active, .content-box:focus, .content-box:active {
    outline: none !important;
    box-shadow: none !important;
}

/* RIADKY FÓRA (UNIVERZÁLNE PRE DARK A LIGHT MÓD) */
.forum-item-row {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 12px 15px !important;
    border-radius: 8px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    transition: all 0.2s ease !important;
    outline: none !important;
}

.forum-item-row:hover {
    border-color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.04) !important;
}

.forum-item-row:hover a {
    color: #3b82f6 !important;
}

.forum-item-row:focus, .forum-item-row:active {
    outline: none !important;
    box-shadow: none !important;
}

/* Hover pre mená v shoutboxe v DARK móde */
html:not([data-theme="light"]) #shoutsContainer a.shout-username:hover,
html:not([data-theme="light"]) #homeShoutboxList a:hover,
html:not([data-theme="light"]) .content-container div[style*="display: flex; justify-content: center; gap: 6px;"] a:hover {
    color: #3b82f6 !important;
}

html:not([data-theme="light"]) .content-container div[style*="display: flex; justify-content: center; gap: 6px;"] a:hover {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #fff !important;
}

/* Čistá zelená bodka bez obrysu */
span[style*="background: #2ecc71"], span[style*="background:#2ecc71"] {
    border: none !important;
    box-shadow: 0 0 6px #2ecc71 !important;
}

/* Odstránenie obrysu z notifikačného a PM badge v hlavičke */
header.main-header span[style*="border: 2px solid"],
header.main-header span[style*="border:2px solid"] {
    border: none !important;
}

/* FOOTER */
.main-footer {
    background: #0d1117;
    border-top: 1px solid #1f2937;
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-size: 12px;
}


/* ==========================================
   LIGHT MÓD (Vyvážený, kontrastnejší a sýtejší vzhľad)
   ========================================== */
@keyframes lightPulseGlow {
    0% { background-position: 0% 50%, 100% 50%, 0% 0%; }
    50% { background-position: 100% 50%, 0% 50%, 50% 50%; }
    100% { background-position: 0% 50%, 100% 50%, 0% 0%; }
}

html[data-theme="light"] body {
    background-color: #94a3b8 !important;
    background-image: 
        radial-gradient(circle at 15% 20%, rgba(37, 99, 235, 0.22) 0%, transparent 55%),
        radial-gradient(circle at 85% 85%, rgba(147, 51, 234, 0.18) 0%, transparent 55%),
        linear-gradient(135deg, #cbd5e1 0%, #94a3b8 50%, #64748b 100%) !important;
    background-size: 200% 200%, 200% 200%, 100% 100%;
    background-attachment: fixed;
    animation: lightPulseGlow 35s ease infinite;
    color: #1e293b !important;
}

html[data-theme="light"] .site-wrapper {
    background: #e2e8f0 !important;
    border-color: #94a3b8 !important;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25) !important;
}

html[data-theme="light"] .main-header,
html[data-theme="light"] .main-footer {
    background: #cbd5e1 !important;
    border-color: #94a3b8 !important;
    color: #1e293b !important;
}

/* Tmavý kontrastný nápis ECLIPSE v logu pre Light mód */
html[data-theme="light"] .logo {
    color: #0f172a !important;
}

html[data-theme="light"] .main-nav a {
    color: #475569;
}

html[data-theme="light"] .main-nav a:hover, 
html[data-theme="light"] .main-nav a.active {
    color: #2563eb;
    background: #94a3b8;
}

html[data-theme="light"] .hero-slider h2 {
    color: #ffffff !important;
}
html[data-theme="light"] .hero-slider p {
    color: #e5e7eb !important;
}

html[data-theme="light"] .content-box {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] div[style*="background: #161b22"],
html[data-theme="light"] div[style*="background: #0d1117"],
html[data-theme="light"] div[style*="background: #10151d"],
html[data-theme="light"] div[style*="background: #1f2937"],
html[data-theme="light"] div[style*="background: rgba(255,255,255,0.02)"] {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
}

/* Riadok fóra v Light móde */
html[data-theme="light"] .forum-item-row {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .forum-item-row:hover {
    border-color: #2563eb !important;
    background: rgba(37, 99, 235, 0.04) !important;
}

html[data-theme="light"] .forum-item-row:hover a {
    color: #2563eb !important;
}

/* Oprava pre panel so smajlíkmi v Light móde */
html[data-theme="light"] #emojiPicker {
    background: #ffffff !important;
    border: 1px solid #94a3b8 !important;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.2) !important;
}

/* Hover pre textové odkazy a meno v shoutboxe v Light móde */
html[data-theme="light"] .content-box a.shout-username:hover,
html[data-theme="light"] a[href*="profile.php"].shout-username:hover,
html[data-theme="light"] a[href*="view_topic.php"]:hover,
html[data-theme="light"] a[href*="shoutbox.php"]:hover,
html[data-theme="light"] #homeShoutboxList a:hover {
    color: #2563eb !important;
    background: transparent !important;
}

/* Aktívne stránkovacie tlačidlo v Light móde */
html[data-theme="light"] .content-container div[style*="display: flex; justify-content: center; gap: 6px;"] a:hover {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

html[data-theme="light"] .content-container div[style*="display: flex; justify-content: center; gap: 6px;"] a[style*="background: #2563eb"],
html[data-theme="light"] .content-container div[style*="display: flex; justify-content: center; gap: 6px;"] a[style*="background:#2563eb"] {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

html[data-theme="light"] input, 
html[data-theme="light"] select, 
html[data-theme="light"] textarea,
html[data-theme="light"] button[title="Vybrať emoji"] {
    background: #ffffff !important;
    border: 1px solid #94a3b8 !important;
    color: #1e293b !important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
    color: #64748b !important;
}

html[data-theme="light"] h1, 
html[data-theme="light"] h2, 
html[data-theme="light"] h3, 
html[data-theme="light"] h4,
html[data-theme="light"] strong,
html[data-theme="light"] span,
html[data-theme="light"] p {
    color: inherit;
}

html[data-theme="light"] .content-container a {
    color: #0f172a !important;
}
html[data-theme="light"] .content-container a:hover {
    color: #2563eb !important;
}

html[data-theme="light"] .content-box p {
    color: #334155 !important;
}

html[data-theme="light"] .auth-box a[id="headerEnvelopeBtn"],
html[data-theme="light"] .auth-box button#bellBtn,
html[data-theme="light"] .auth-box button#profileDropdownBtn {
    background: #cbd5e1 !important;
    border: 1px solid #94a3b8 !important;
    color: #1e293b !important;
}
html[data-theme="light"] .auth-box a[id="headerEnvelopeBtn"]:hover,
html[data-theme="light"] .auth-box button#bellBtn:hover,
html[data-theme="light"] .auth-box button#profileDropdownBtn:hover {
    background: #94a3b8 !important;
    color: #2563eb !important;
}

/* Oprava vyskakovacieho okna notifikácií v Light móde */
html[data-theme="light"] #notifDropdown,
html[data-theme="light"] #profileDropdownMenu {
    background: #ffffff !important;
    border: 1px solid #94a3b8 !important;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.2) !important;
}
html[data-theme="light"] #notifDropdown > div:first-child,
html[data-theme="light"] #profileDropdownMenu > div:first-child {
    background: #cbd5e1 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
    font-weight: bold !important;
}
html[data-theme="light"] #notifDropdown > div:first-child span,
html[data-theme="light"] #notifDropdown > div:first-child {
    color: #0f172a !important;
}
html[data-theme="light"] #notifDropdown div[style*="border-bottom"],
html[data-theme="light"] #profileDropdownMenu div[style*="border-top"],
html[data-theme="light"] #profileDropdownMenu div[style*="border-bottom"] {
    border-color: #cbd5e1 !important;
}
html[data-theme="light"] #notifDropdown a,
html[data-theme="light"] #profileDropdownMenu a {
    color: #1e293b !important;
}
html[data-theme="light"] #notifDropdown a:hover,
html[data-theme="light"] #profileDropdownMenu a:hover {
    background: #f1f5f9 !important;
    color: #2563eb !important;
}

html[data-theme="light"] #notifDropdown span[style*="color: #e6edf3"],
html[data-theme="light"] #notifDropdown span[style*="color:#e6edf3"] {
    color: #1e293b !important;
}
html[data-theme="light"] #notifDropdown div[style*="background: #1c2128"],
html[data-theme="light"] #notifDropdown div[style*="background:#1c2128"] {
    background: #f1f5f9 !important;
}

html[data-theme="light"] .main-header div[style*="width: 100px; height: 5px"] {
    background: #cbd5e1 !important;
    border: 1px solid #94a3b8 !important;
}

html[data-theme="light"] #homeEmojiPickerPanel {
    background: #ffffff !important;
    border: 1px solid #94a3b8 !important;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.2) !important;
}

/* Hover efekt pre karty v rebríčkoch (stats.php) a používateľov (users.php) */
.content-container a:focus, .content-container a:active,
.content-container .content-box:focus, .content-container .content-box:active {
    outline: none !important;
    box-shadow: none !important;
}

.content-container a .content-box:hover {
    border-color: #3b82f6 !important;
    transform: translateY(-2px);
    transition: all 0.2s ease;
}
.content-container a:hover .username-text {
    color: #3b82f6 !important;
}

html[data-theme="light"] .content-container a .content-box:hover {
    background: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
}
html[data-theme="light"] .content-container a:hover .username-text {
    color: #2563eb !important;
}


/* MOBILNÁ RESPONSIVITA */
@media screen and (max-width: 768px) {
    .site-wrapper {
        margin: 0;
        border-radius: 0;
        border: none;
    }
    .main-header .header-container {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    .content-container {
        padding: 15px;
    }
}