:root {
    /* --- HLAVNÍ BARVY (LIGHT) --- */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-dark: #2d3748;
    --accent-color: #6b46c1; /* Fialová pro akcenty */
    --answer-bg: #48bb78;     /* Zelená pro odpověď */
    --answer-text: #ffffff;
    
    /* --- ADMIN COLORS --- */
    --admin-bg: #f8f9fa;
    --admin-border: #e2e8f0;
    
    /* --- LAYOUT --- */
    --sidebar-width: 280px;
}

/* =========================================
   1. LAYOUT & GLOBAL STYLES
   ========================================= */

body {
    background: var(--primary-gradient);
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    margin: 0;
    overflow-x: hidden; 
}

/* --- PLAY MODE (Hra na projektoru) --- */
body.play-mode {
    overflow-y: auto !important;
    padding-bottom: 100px;
}

/* --- ADMIN LAYOUT --- */
body.admin-layout {
    display: flex;
    height: 100vh;      
    height: 100dvh;     
    overflow: hidden;   
}

.admin-link-light {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s, transform 0.2s;
}
.admin-link-light:hover {
    color: #ffffff !important;
    text-decoration: underline;
    opacity: 1 !important;
}

/* =========================================
   2. SIDEBAR
   ========================================= */

.sidebar {
    width: var(--sidebar-width);
    background: rgba(15, 23, 42, 0.95) !important; 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255,255,255,0.05);
    box-shadow: 5px 0 25px rgba(0,0,0,0.2);
    height: 100vh;
    height: 100dvh; 
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 1045;
    overflow: hidden;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0; 
    background: transparent;
}

.sidebar-body {
    flex-grow: 1;        
    overflow-y: auto;    
    padding: 15px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.sidebar-body::-webkit-scrollbar { width: 4px; }
.sidebar-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }
.sidebar-body::-webkit-scrollbar-track { background: transparent; }

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2); 
    flex-shrink: 0;
    padding-bottom: calc(15px + env(safe-area-inset-bottom));
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.6) !important;
    font-weight: 500;
    padding: 10px 20px;
    margin: 2px 15px;
    border-radius: 10px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.sidebar .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    color: white !important;
    padding-left: 25px; 
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--accent-color), #805ad5);
    color: white !important;
    box-shadow: 0 4px 15px rgba(107, 70, 193, 0.4);
    font-weight: 600;
}

.sidebar-heading {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.4) !important;
    padding-left: 20px;
    margin-top: 20px;
    margin-bottom: 8px;
    font-weight: 800;
}

.sidebar-quiz-link {
    display: flex;
    align-items: center;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    padding: 8px 20px;
    font-size: 0.9rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.sidebar-quiz-link:hover {
    color: white;
    background: rgba(255,255,255,0.05);
    border-left-color: var(--accent-color);
}

.user-profile-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.user-avatar-small {
    width: 35px;
    height: 35px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.user-info-text {
    flex-grow: 1;
    overflow: hidden;
}
.user-name {
    display: block;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-role {
    display: block;
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
}
.footer-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}
.icon-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: rgba(255,255,255,0.7);
    transition: all 0.2s;
    background: transparent;
    border: none;
}
.icon-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fca5a5;
}

.width-20 { width: 24px; text-align: center; }

.mobile-navbar {
    z-index: 1050;
    background: rgba(15, 23, 42, 0.95) !important;
}

@media (max-width: 991.98px) {
    body.admin-layout {
        height: 100dvh;
        overflow: hidden;
    }
    
    .sidebar {
        position: fixed;
        top: 0; 
        left: 0; 
        bottom: 0;
        height: 100dvh; 
        transform: translateX(-100%);
        width: 280px;
        transition: transform 0.3s ease-in-out;
    }
    
    .sidebar.show {
        transform: translateX(0);
        box-shadow: 5px 0 50px rgba(0,0,0,0.5);
    }
}

/* =========================================
   3. AUTH CARDS
   ========================================= */
.auth-wrapper {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    overflow: hidden;
    transition: transform 0.3s;
}
.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
}
.auth-icon-box {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    background: linear-gradient(135deg, #fff, #f3f4f6);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.auth-input-group .input-group-text {
    background: white;
    border: 1px solid #e2e8f0;
    border-right: none;
    color: var(--accent-color);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}
.auth-input-group .form-control {
    border: 1px solid #e2e8f0;
    border-left: none;
    padding: 12px;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    font-size: 0.95rem;
}
.auth-input-group .form-control:focus {
    box-shadow: none;
    border-color: var(--accent-color);
}
.auth-input-group .input-group-text:has(+ .form-control:focus) {
    border-color: var(--accent-color);
}

/* =========================================
   4. HERNÍ PRVKY
   ========================================= */
.question-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.sub-question {
    display: none;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 70px 40px 40px 40px; 
    margin-bottom: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    font-size: 2.2rem;
    font-weight: 600;
    text-align: left;
    position: relative;
    border-left: 10px solid var(--accent-color);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
}
.sub-question.visible {
    opacity: 1;
    transform: translateY(0);
}
.q-number {
    position: absolute;
    top: 15px;
    left: 25px;
    font-size: 1.5rem;
    color: var(--accent-color);
    font-weight: 900;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid rgba(107, 70, 193, 0.2);
    padding-bottom: 5px;
}
.q-text { line-height: 1.3; margin-top: 0; }
.question-image {
    display: block;
    max-width: 100%;
    max-height: 500px;
    margin: 25px auto;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border: 5px solid white;
}
.custom-audio-player {
    background: #edf2f7;
    border-radius: 50px;
    padding: 10px 25px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}
.play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: var(--accent-color);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.play-btn:hover { transform: scale(1.1); background: #553c9a; }
.audio-status {
    font-size: 1.2rem;
    color: #718096;
    font-weight: 500;
    min-width: 150px;
    text-align: left;
}
.replay-hint {
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--accent-color);
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.answer {
    display: none;
    margin-top: 25px;
    padding: 20px;
    background-color: var(--answer-bg);
    color: var(--answer-text);
    border-radius: 15px;
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 5px 15px rgba(72, 187, 120, 0.4);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
#next-button {
    display: none;
    margin-top: 50px;
    padding: 15px 50px;
    font-size: 1.8rem;
    font-weight: bold;
    background: white;
    color: var(--accent-color);
    border: none;
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
#next-button:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.3); }
.quiz-select-btn {
    display: block;
    width: 100%;
    background-color: white;
    color: var(--accent-color);
    border: none;
    font-weight: 800;
    padding: 25px 30px;
    padding-right: 80px; 
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    text-align: left;
}
.quiz-select-btn:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    background-color: #f8f9fa;
    color: #553c9a;
}

/* =========================================
   5. ADMIN COMPONENTS
   ========================================= */
.admin-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin: 0;
}
.admin-card, .game-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    border: none;
    margin-bottom: 25px;
    overflow: hidden;
    color: var(--text-dark);
    transition: all 0.3s ease;
}
.admin-header {
    background: white;
    padding: 15px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-body { padding: 25px; }
.admin-input {
    background: #f8f9fa;
    border: 2px solid var(--admin-border);
    border-radius: 8px;
    padding: 8px 12px;
    width: 100%;
    margin-bottom: 5px;
    transition: border-color 0.2s;
    font-size: 0.95rem;
}
.admin-input:focus { border-color: var(--accent-color); outline: none; background: white; }
.admin-table th {
    font-weight: 600;
    color: #718096;
    border-bottom: 2px solid var(--admin-border);
    padding: 12px;
    background: #fcfcfc;
}
.admin-table td {
    padding: 10px 12px;
    vertical-align: middle;
    border-bottom: 1px solid var(--admin-border);
}
.text-shadow { text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.hover-scale { transition: transform 0.2s; }
.hover-scale:hover { transform: scale(1.02); }

/* =========================================
   6. DARK MODE
   ========================================= */
[data-theme="dark"] {
    --primary-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); 
    --card-bg: rgba(30, 41, 59, 0.95); 
    --text-dark: #f1f5f9; 
    --accent-color: #a78bfa; 
    --admin-border: #334155;
    --admin-bg: #1e293b;
}
[data-theme="dark"] body { color: var(--text-dark); }
[data-theme="dark"] .text-muted { color: #94a3b8 !important; }
[data-theme="dark"] .admin-card, 
[data-theme="dark"] .game-card {
    background-color: var(--card-bg);
    color: var(--text-dark);
    border: 1px solid var(--admin-border);
}
[data-theme="dark"] .admin-header {
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom-color: var(--admin-border);
    color: var(--text-dark);
}
[data-theme="dark"] .admin-input,
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: #0f172a;
    border-color: #475569;
    color: white;
}
[data-theme="dark"] .admin-input:focus,
[data-theme="dark"] .form-control:focus {
    border-color: var(--accent-color);
    background-color: #020617;
}
[data-theme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-dark);
    background-color: transparent !important;
    color: var(--text-dark) !important;
}
[data-theme="dark"] .admin-table th {
    background-color: rgba(0, 0, 0, 0.3);
    color: #cbd5e1;
    border-bottom-color: var(--admin-border);
}
[data-theme="dark"] .admin-table td {
    border-bottom-color: var(--admin-border);
    color: #e2e8f0;
}
[data-theme="dark"] .table-hover > tbody > tr:hover > * {
    color: var(--text-dark) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
}
[data-theme="dark"] .auth-card {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}
[data-theme="dark"] .auth-icon-box {
    background: linear-gradient(135deg, #334155, #1e293b);
    color: white;
}
[data-theme="dark"] .auth-input-group .input-group-text {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
    color: #a78bfa;
}
[data-theme="dark"] .auth-input-group .form-control {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}
[data-theme="dark"] .btn-light {
    background-color: #334155;
    color: #f1f5f9;
    border-color: #475569;
}
[data-theme="dark"] .btn-light:hover {
    background-color: #475569;
    color: #ffffff;
}
[data-theme="dark"] .modal-content {
    background-color: var(--card-bg);
    color: var(--text-dark);
    border: 1px solid var(--admin-border);
}
[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer { border-color: var(--admin-border); }
[data-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

.theme-switch-wrapper {
    position: relative; 
    top:0; right:0; 
    transform: scale(0.8);
    display: flex;
    align-items: center;
}
.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}
.theme-switch input { display: none; }
.slider {
    background-color: rgba(255, 255, 255, 0.2);
    bottom: 0; cursor: pointer; left: 0; position: absolute; right: 0; top: 0;
    transition: .4s;
    border-radius: 34px;
    border: 2px solid rgba(255,255,255,0.5);
}
.slider:before {
    background-color: #fff;
    bottom: 4px; content: ""; height: 22px; left: 4px; position: absolute;
    transition: .4s; width: 22px; border-radius: 50%; z-index: 2;
}
.slider .icon-sun { position: absolute; top: 50%; transform: translateY(-50%); font-size: 14px; color: #f6e05e; left: 8px; opacity: 0; transition: opacity 0.3s; }
.slider .icon-moon { position: absolute; top: 50%; transform: translateY(-50%); font-size: 14px; color: #f1f5f9; right: 8px; opacity: 1; transition: opacity 0.3s; }

input:checked + .slider { background-color: #0f172a; border-color: #a78bfa; }
input:checked + .slider:before { transform: translateX(26px); background-color: #a78bfa; }
input:checked + .slider .icon-sun { opacity: 1; }
input:checked + .slider .icon-moon { opacity: 0; }

/* =========================================
   7. INDEX & LIBRARY (GLASS)
   ========================================= */
.search-glass-container {
    background: rgba(255, 255, 255, 0.8); 
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 50px;
    padding: 5px;
    display: flex;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
.search-glass-container:focus-within {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
}
.search-glass-input {
    background: transparent;
    border: none;
    color: #333; 
    padding-left: 20px;
    font-size: 1.1rem;
    font-weight: 500;
}
.search-glass-input::placeholder { color: #666; }
.search-glass-input:focus { background: transparent; box-shadow: none; color: #333; }
.btn-glass-action {
    background: var(--accent-color); 
    color: white;
    border-radius: 50px;
    padding: 10px 30px;
    font-weight: 800;
    border: none;
    transition: all 0.3s ease;
}
.btn-glass-action:hover {
    background: #553c9a;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.library-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); 
}
.library-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border-color: white;
}
.library-card-body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.library-title {
    color: #1a202c; 
    font-weight: 800;
    font-size: 1.4rem;
    margin-bottom: 10px;
    line-height: 1.3;
}
.library-card .text-white { color: #4a5568 !important; }
.library-card .opacity-75, 
.library-card .opacity-90 {
    opacity: 1 !important;
    color: #64748b; 
}
.btn-play-glass {
    background: linear-gradient(135deg, var(--accent-color), #805ad5);
    color: white;
    font-weight: 700;
    border: none;
    border-radius: 15px;
    padding: 12px;
    width: 100%;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(107, 70, 193, 0.3);
}
.btn-play-glass:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 15px rgba(107, 70, 193, 0.4);
    color: white;
}
.btn-glass-icon {
    background: rgba(255,255,255,0.5); 
    color: var(--accent-color);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 15px;
    width: 48px; 
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}
.btn-glass-icon:hover {
    background: white;
    color: #e53e3e;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.glass-badge {
    background: rgba(255, 255, 255, 0.6); 
    color: #475569;     
    border: 1px solid rgba(255, 255, 255, 0.5);
    font-weight: 600;
}
.author-avatar {
    width: 32px; height: 32px; 
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: 0.8rem;
}
.pagination-glass .page-link {
    background: rgba(255, 255, 255, 0.6);
    border: none;
    color: var(--accent-color);
    margin: 0 5px;
    border-radius: 50% !important;
    width: 45px; height: 45px;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.pagination-glass .page-link:hover {
    background: white;
    transform: scale(1.1);
    color: #553c9a;
}
.pagination-glass .page-item.disabled .page-link {
    background: rgba(255,255,255,0.3);
    color: rgba(0,0,0,0.3);
    box-shadow: none;
}
[data-theme="dark"] .library-card {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .library-card:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: var(--accent-color);
}
[data-theme="dark"] .library-title { color: #f1f5f9; }
[data-theme="dark"] .library-card .text-white { color: #cbd5e1 !important; }
[data-theme="dark"] .search-glass-container {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255,255,255,0.2);
}
[data-theme="dark"] .search-glass-input { color: white; }
[data-theme="dark"] .glass-badge {
    background: rgba(255,255,255,0.1);
    color: #e2e8f0;
    border-color: rgba(255,255,255,0.1);
}
[data-theme="dark"] .btn-glass-icon {
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .btn-glass-icon:hover {
    background: var(--accent-color);
    color: white;
}
[data-theme="dark"] body { 
    background: linear-gradient(135deg, #020617 0%, #0f172a 100%);
    color: #f1f5f9; 
}
[data-theme="dark"] .search-glass-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
}
[data-theme="dark"] .search-glass-input { color: white; }
[data-theme="dark"] .search-glass-input::placeholder { color: rgba(255,255,255,0.4); }
[data-theme="dark"] .btn-glass-action {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}
[data-theme="dark"] .btn-glass-action:hover {
    background: #7c3aed;
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.6);
}
[data-theme="dark"] .library-card {
    background: rgba(30, 41, 59, 0.6); 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
[data-theme="dark"] .library-card:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
[data-theme="dark"] .library-title { 
    color: #f8fafc; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
[data-theme="dark"] .library-card .text-white { color: #94a3b8 !important; }
[data-theme="dark"] .library-card .text-dark { color: #f1f5f9 !important; }
[data-theme="dark"] .library-card .text-muted { color: #64748b !important; }
[data-theme="dark"] .glass-badge {
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .badge.bg-white {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}
[data-theme="dark"] .btn-play-glass {
    background: linear-gradient(135deg, #6d28d9, #4c1d95);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}
[data-theme="dark"] .btn-play-glass:hover {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.5);
}
[data-theme="dark"] .btn-glass-icon {
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .btn-glass-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: white;
}
[data-theme="dark"] .pagination-glass .page-link {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255,255,255,0.1);
    color: #cbd5e1;
}
[data-theme="dark"] .pagination-glass .page-link:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}
[data-theme="dark"] .admin-card, 
[data-theme="dark"] .game-card {
    background-color: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .admin-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0,0,0,0.2);
}
[data-theme="dark"] .admin-table th,
[data-theme="dark"] .admin-table td {
    border-bottom-color: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}

/* =========================================
   9. HOTFIX: OPRAVA "DUCHŮ" (GHOST CLICKS)
   ========================================= */

/* TADY BYLA CHYBA! 
   Odebral jsem "visibility: hidden", aby fungoval fade-in efekt.
   Zůstalo jen pointer-events: none, což stačí na to, aby se nedalo klikat.
*/
[style*="opacity: 0"], 
[style*="opacity:0"] {
    pointer-events: none !important;
}

.game-toolbar, .fixed-bottom-controls, .toolbar-trigger { 
    z-index: 999999 !important; 
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}