/* ========================================================= */
/* --- 1. RESET I BAZA --- */
/* ========================================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

body { 
    margin: 0; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background-color: #f9fafb; 
    color: #1f2937; 
}

/* ========================================================= */
/* --- 2. GŁÓWNY HEADER (DESKTOP) --- */
/* ========================================================= */
header { 
    background: white; 
    border-bottom: 1px solid #e5e7eb; 
    padding: 1rem 2rem; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 2rem; 
    gap: 15px; /* Minimalny odstęp na dużych ekranach */
}

.logo { 
    font-size: 1.5rem; 
    font-weight: 900; 
    color: #2563eb; 
    display: flex; 
    align-items: center; 
    gap: 5px; 
    text-decoration: none; 
    flex-shrink: 0; /* Zabezpieczenie przed zgnieceniem */
}

.nav-menu { 
    display: flex; 
    gap: 20px; 
    align-items: center; 
}
.nav-link { 
    text-decoration: none; 
    color: #4b5563; 
    font-weight: 500; 
    transition: color 0.2s; 
}
.nav-link:hover { color: #2563eb; }

.btn-cta { 
    background: linear-gradient(135deg, #6366f1, #3b82f6); 
    color: white; 
    padding: 8px 16px; 
    border-radius: 20px; 
    text-decoration: none; 
    font-weight: 600; 
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4); 
    transition: transform 0.2s; 
    white-space: nowrap; 
}

/* ========================================================= */
/* --- 3. PROFIL UŻYTKOWNIKA I ROZWIJAJKA (DESKTOP) --- */
/* ========================================================= */
.user-dropdown-container {
    position: relative;
    flex-shrink: 0; 
    min-width: 0; 
}

button.user-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    border-radius: 8px;
    transition: background 0.2s;
    max-width: 100%;
    text-align: left;
}
button.user-widget:hover { background: #f3f4f6; }

.avatar-mini { 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    border: 2px solid #e5e7eb; 
    flex-shrink: 0; 
}

.user-details { 
    display: flex; 
    flex-direction: column; 
    line-height: 1.2; 
    min-width: 0; /* WAŻNE do ucinania tekstu */
}

.user-nick { 
    font-weight: bold; 
    font-size: 0.9rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Doda trzykropek */
}

.user-badge { 
    font-size: 0.7rem; 
    color: #d97706; 
    background: #fef3c7; 
    padding: 1px 6px; 
    border-radius: 4px; 
    width: fit-content; 
}

.dropdown-arrow {
    color: #9ca3af;
    display: flex;
    transition: transform 0.2s;
    flex-shrink: 0;
}
.user-dropdown-container.open .dropdown-arrow { transform: rotate(180deg); }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    width: 240px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.user-dropdown-container.open .dropdown-menu { 
    opacity: 1; 
    visibility: visible; 
    transform: translateY(0); 
}
.dropdown-item { 
    padding: 12px 16px; 
    text-decoration: none; 
    color: #374151; 
    font-size: 0.95rem; 
    font-weight: 500; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    transition: background 0.15s, color 0.15s; 
}
.dropdown-item:hover { background-color: #f9fafb; color: #2563eb; }
.dropdown-divider { height: 1px; background-color: #e5e7eb; margin: 6px 0; }
.logout-item { color: #dc2626; }
.logout-item:hover { background-color: #fef2f2; color: #b91c1c; }

/* PRZYCISK LOGOWANIA DLA NIEZALOGOWANYCH */
.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    background-color: white;
    color: #4b5563;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.btn-login:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background-color: #eff6ff;
    transform: translateY(-1px);
}
/* ----- NOWY PRZYCISK: Korepetycje ----- */
.btn-hero-tutor {
    display: inline-block;
    color: #475569;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 10px 10px;
    border-radius: 50px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    transition: all 0.3s ease;
}

.btn-hero-tutor:hover {
    background: #e2e8f0;
    color: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* ========================================================= */
/* --- 4. HEADER NA TELEFONY I MAŁE OKNA --- */
/* ========================================================= */
@media (max-width: 900px) {
    header { 
        padding: 10px 15px; 
        flex-wrap: wrap; 
        /* Ochrona przed psuciem układu przy scrolu lub zmniejszaniu okna */
        gap: 10px 0; 
    }

    .logo { 
        order: 1; 
        font-size: 1.3rem; 
        flex: 0 1 auto; /* Pozwalamy na elastyczność */
        min-width: 0;
    }

    .user-dropdown-container { 
        order: 2; 
        /* Magia flexboxa: przepycha kontener maksymalnie do prawej */
        margin-left: auto; 
        display: flex; 
        justify-content: flex-end; 
        max-width: 50%; /* Granica bezpieczeństwa przed pożarciem logo */
        min-width: 0; /* Gwarancja trzykropka */
    }

    button.user-widget {
        padding: 4px; /* Zmniejszamy przycisk by zyskać miejsce */
    }

    .btn-login {
        order: 2;
        margin-left: auto;
        padding: 6px 14px;
        font-size: 0.85rem;
    }

    .nav-menu { 
        order: 3;
        width: 100%; /* Wymusza pęknięcie rzędu -> nawigacja spada na sam dół */
        justify-content: center; 
        padding-top: 10px;
        margin-top: 5px;
        gap: 8px; 
    }
}

/* ========================================================= */
/* --- 5. GŁÓWNY GRID I KARTY --- */
/* ========================================================= */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem 4rem 1rem; }

.topics-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 1.5rem; 
    align-items: start;
}

.topic-card { 
    background: white; 
    border: 1px solid #e5e7eb; 
    border-radius: 12px; 
    padding: 1.5rem; 
    position: relative; 
    display: flex; 
    flex-direction: column; 
    gap: 1rem; 
    transition: transform 0.2s, box-shadow 0.2s; 
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); border-color: #d1d5db; }

.topic-header { display: flex; align-items: center; font-weight: 800; font-size: 1.15rem; color: #111827; padding-right: 60px; }
.topic-icon { margin-right: 10px; font-size: 1.4rem; background: #f3f4f6; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 8px; flex-shrink: 0; }
.matura-points { position: absolute; top: 1rem; right: 1rem; background-color: #fffbeb; color: #b45309; border: 1px solid #fcd34d; font-size: 0.7rem; padding: 3px 6px; border-radius: 6px; font-weight: 700; text-align: center; line-height: 1.1; cursor: help; }

/* Karta maturalna (Złota) */
.topic-card.special-card { border: 2px solid #fcd34d; background: #fffbeb; }
.topic-card.special-card .topic-icon { background: #fef3c7; }
.topic-card.special-card:hover { box-shadow: 0 10px 20px -3px rgba(245, 158, 11, 0.2); border-color: #f59e0b; }
.topic-card.special-card .matura-points { background-color: #fef3c7; color: #92400e; border-color: #fcd34d; }
.topic-card.special-card .quiz-link.highlight { background-color: #ffffff; border-color: #fcd34d; color: #b45309; }
.topic-card.special-card .quiz-link.highlight:hover { background-color: #fff7ed; }

/* ukrywam 2gą rozwijajke */
/* Ukrycie domyślnej strzałki rozwijania tylko dla karty maturalnej */
.special-card::after,
.special-card::before {
    display: none !important;
}

/* Linki i przyciski w kartach */
.quiz-links { display: flex; flex-direction: column; gap: 0.6rem; margin-top: auto; }
.quiz-link { text-decoration: none; color: #374151; font-size: 0.95rem; padding: 12px 14px; border-radius: 8px; display: flex; align-items: center; transition: all 0.2s ease; border: 1px solid #e5e7eb; background-color: #ffffff; box-shadow: 0 1px 2px rgba(0,0,0,0.02); font-weight: 500; }
.quiz-link:hover { background-color: #f8fafc; border-color: #d1d5db; transform: translateY(-2px); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); }
.quiz-link.highlight { background-color: #eff6ff; color: #1d4ed8; font-weight: 600; border-color: #bfdbfe; }
.quiz-link.highlight:hover { background-color: #dbeafe; border-color: #93c5fd; }

.dot { width: 8px; height: 8px; border-radius: 50%; margin-right: 12px; flex-shrink: 0; }
.green { background-color: #10b981; } .blue { background-color: #3b82f6; } .red { background-color: #ef4444; }

.card-difficulty-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; color: #9ca3af; margin-bottom: 8px; font-weight: 600; }
.mini-diff-selector { display: flex; gap: 6px; flex-wrap: wrap; }
.md-btn { border: 1px solid #e5e7eb; background: white; border-radius: 8px; padding: 10px 12px; font-size: 0.8rem; cursor: pointer; transition: all 0.15s; color: #4b5563; flex: 1 0 auto; text-align: center; }
.md-btn.active { font-weight: bold; border-color: transparent; color: white; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.md-btn[data-level="1"].active { background-color: #10b981; } 
.md-btn[data-level="2"].active { background-color: #3b82f6; }
.md-btn[data-level="3"].active { background-color: #f59e0b; }
.md-btn[data-level="4"].active { background-color: #ef4444; }
.md-btn[data-level="5"].active { background-color: #111827; }

/* ========================================================= */
/* --- 6. POZOSTAŁE STYLE (TYTUŁY, POSTĘP, EXAM ROW) --- */
/* ========================================================= */
.page-title { font-size: 2rem; color: #111827; margin-bottom: 0.5rem; text-align: center; }
.page-subtitle { color: #6B7280; font-size: 1.1rem; text-align: center; margin-bottom: 3rem; }

.progress-container { margin-top: 5px; margin-bottom: 5px; }
.progress-labels { display: flex; justify-content: space-between; font-size: 0.8rem; color: #6b7280; margin-bottom: 5px; font-weight: 600; }
.progress-bar-bg { width: 100%; height: 6px; background-color: #f3f4f6; border-radius: 3px; overflow: hidden; }
.progress-bar-fill { height: 100%; background-color: #10b981; border-radius: 3px; }

.exam-row { display: flex; align-items: center; justify-content: space-between; background: white; padding: 0.75rem 1rem; border-radius: 12px; margin-bottom: 0.5rem; border: 1px solid #e5e7eb; }
.exam-label { font-weight: 700; color: #b45309; display: flex; align-items: center; font-size: 0.95rem; }
.exam-actions { display: flex; gap: 0.5rem; }

.btn-mini { text-decoration: none; font-size: 0.75rem; font-weight: 600; padding: 4px 10px; border-radius: 6px; transition: all 0.2s; border: 1px solid #d1d5db; color: #4b5563; background: #f9fafb; }
.btn-mini:hover { background: #f3f4f6; border-color: #9ca3af; }
.btn-mini.primary { background-color: #fef3c7; border-color: #fcd34d; color: #92400e; }
.btn-mini.primary:hover { background-color: #fcd34d; }

/* ========================================================= */
/* --- 7. ONBOARDING WIZARD --- */
/* ========================================================= */
#onboarding-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(17, 24, 39, 0.9); backdrop-filter: blur(5px); z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; animation: fadeIn 0.4s forwards; padding: 10px; }
@keyframes fadeIn { to { opacity: 1; } }
.wizard-card { background: white; width: 100%; max-width: 500px; border-radius: 20px; padding: 2.5rem; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); text-align: center; position: relative; max-height: 95vh; display: flex; flex-direction: column; justify-content: center; }
.wizard-step { display: none; flex-direction: column; align-items: center; width: 100%; animation: slideUp 0.3s ease-out; }
.wizard-step.active-step { display: flex; }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.wizard-icon-lg { font-size: 3rem; margin-bottom: 15px; line-height: 1; }
.wizard-title { font-size: 1.8rem; font-weight: 800; color: #111827; margin-bottom: 0.5rem; line-height: 1.2; }
.wizard-text { font-size: 1.1rem; color: #4b5563; line-height: 1.5; margin-bottom: 1.5rem; }
.wizard-options { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 1.5rem; width: 100%; }
.wiz-btn { padding: 16px 15px; border: 2px solid #e5e7eb; border-radius: 12px; background: white; cursor: pointer; font-size: 1rem; font-weight: 600; color: #374151; transition: all 0.2s; flex: 1 1 45%; }
.wiz-btn:hover { border-color: #6366f1; background: #f5f3ff; }
.wiz-btn.selected { background: #4f46e5; border-color: #4f46e5; color: white; box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3); }
.wizard-info-box { background-color: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; padding: 1rem; border-radius: 12px; text-align: left; margin-bottom: 1.5rem; display: flex; gap: 15px; align-items: start; width: 100%; }
.wizard-actions { width: 100%; display: flex; justify-content: center; }
.btn-next { background: #111827; color: white; border: none; padding: 14px 30px; font-size: 1.1rem; border-radius: 50px; cursor: pointer; font-weight: 600; width: 100%; box-shadow: 0 4px 10px rgba(0,0,0,0.2); transition: transform 0.1s; }
.btn-next:active { transform: scale(0.98); }
.wizard-dots { display: flex; gap: 8px; justify-content: center; margin-top: 1rem; }
.w-dot { width: 8px; height: 8px; background: #e5e7eb; border-radius: 50%; }
.w-dot.active { background: #6366f1; width: 20px; border-radius: 10px; }

/* ========================================================= */
/* --- 8. MENTOR BOGNA --- */
/* ========================================================= */
.mentor-message-container { display: flex; justify-content: center; align-items: flex-end; gap: 15px; margin: 1rem auto 3rem auto; max-width: 600px; padding: 0 1rem; }
.mentor-avatar-wrapper { flex-shrink: 0; width: 80px; height: 80px; border-radius: 50%; overflow: hidden; border: 3px solid #ffffff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }
.mentor-img { width: 100%; height: 100%; object-fit: cover; }
.mentor-bubble { background: #ffffff; border: 2px solid #3b82f6; border-radius: 20px; border-bottom-left-radius: 2px; padding: 1.2rem 2rem; position: relative; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15); max-width: 450px; animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.mentor-greeting { margin: 0 0 5px 0; font-size: 1.4rem; font-weight: 800; color: #111827; line-height: 1.2; }
.mentor-text { margin: 0; color: #4b5563; font-size: 1.05rem; font-weight: 500; }
@keyframes popIn { from { opacity: 0; transform: scale(0.8) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* ========================================================= */
/* --- 9. POPRAWKI RWD DLA RESZTY KOMPONENTÓW --- */
/* ========================================================= */
@media (max-width: 900px) {
    /* Mentor */
    .mentor-message-container { gap: 12px; margin-bottom: 2rem; align-items: center; flex-direction: column; }
    .mentor-avatar-wrapper { width: 70px; height: 70px; border-color: #f3f4f6; }
    .mentor-bubble { border-bottom-left-radius: 20px; border-top-radius: 20px; text-align: center; padding: 1rem 1.5rem; }
    .mentor-bubble::after { content: ''; position: absolute; top: -8px; left: 50%; transform: translateX(-50%) rotate(45deg); width: 14px; height: 14px; background: white; border-top: 2px solid #3b82f6; border-left: 2px solid #3b82f6; }
    .mentor-greeting { font-size: 1.2rem; }
    .mentor-text { font-size: 0.95rem; }

    /* Wizard */
    .wizard-card { padding: 1.2rem; border-radius: 16px; }
    .wizard-icon-lg { font-size: 2rem; margin-bottom: 5px; }
    .wizard-title { font-size: 1.4rem; margin-bottom: 0.3rem; }
    .wizard-text { font-size: 0.9rem; margin-bottom: 1rem; line-height: 1.3; }
    .wizard-options { gap: 6px; margin-bottom: 1rem; }
    .wiz-btn { padding: 12px 5px; font-size: 0.85rem; border-width: 1px; }
    .wizard-info-box { padding: 0.8rem; margin-bottom: 1rem; font-size: 0.85rem; }
    .btn-next { padding: 12px 20px; font-size: 1rem; }
    
    /* Accordion (Karty Mobile) */
    .topic-card { cursor: pointer; padding-bottom: 2.5rem; }
    .difficulty-wrapper, .quiz-links { display: none; }
    .progress-container { margin-bottom: 0; }
    .topic-card.expanded .difficulty-wrapper { display: block; margin-top: 1rem; animation: slideDown 0.3s ease; }
    .topic-card.expanded .quiz-links { display: flex; margin-top: 1rem; animation: slideDown 0.3s ease; }
    .topic-card::after { content: '▼'; position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); font-size: 1.2rem; color: #9ca3af; transition: transform 0.3s ease; }
    .topic-card.expanded::after { transform: translateX(-50%) rotate(180deg); }
    @keyframes slideDown { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
}

/* ========================================================= */
/* --- 10. BANER COOKIES --- */
/* ========================================================= */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px); /* Szerokość na mobilkach */
    max-width: 800px; /* Maksymalna szerokość na desktopie */
    
    /* ZMIANY TUTAJ: Kremowe tło i złota obwódka */
    background: rgba(255, 251, 235, 0.95); /* Kremowy odcień (jak w karcie Matura) z lekką przezroczystością */
    backdrop-filter: blur(10px); /* Efekt szkła */
    border: 2px solid #fcd34d; /* Złoto-żółta obwódka */
    
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(245, 158, 11, 0.15); /* Zmieniony cień na lekko cieplejszy */
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    z-index: 9999;
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
}

/* Klasa ukrywająca baner (odpalana w JS/PHP) */
.cookie-banner.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 20px); /* Zsuwa się lekko w dół znikając */
}

.cookie-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.cookie-icon {
    font-size: 1.5rem;
    line-height: 1;
    margin-top: 2px;
}

.cookie-text {
    margin: 0;
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.5;
}

.cookie-link {
    color: #3b82f6;
    text-decoration: underline;
    text-decoration-color: rgba(59, 130, 246, 0.3);
    text-underline-offset: 2px;
    font-weight: 600;
    transition: text-decoration-color 0.2s;
}

.cookie-link:hover {
    text-decoration-color: #3b82f6;
}

.cookie-btn {
    flex-shrink: 0;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.cookie-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.4);
}

/* Wersja dla telefonów */
@media (max-width: 600px) {
    .cookie-banner {
        flex-direction: column;
        align-items: stretch; /* Rozciąga przycisk na całą szerokość */
        gap: 1rem;
        bottom: 10px;
        width: calc(100% - 20px);
        padding: 1rem;
    }
    
    .cookie-text {
        font-size: 0.85rem;
    }
    
    .cookie-btn {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
}

/* ========================================================= */
/* --- 11. Blokujemy bez premium --- */
/* ========================================================= */

.topic-card.locked {
    position: relative !important; 
    overflow: hidden !important; 
    user-select: none;
}

/* ZMIANA: Zamiast ::after używamy ::before, żeby nie gryzło się ze strzałką rozwijania na telefonie */
.topic-card.locked::before {
    content: "⭐ Wymaga Premium";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center; 
    padding: 10px; 
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e293b;
    cursor: pointer;
    z-index: 10;
    border-radius: inherit;
    transition: background 0.2s, transform 0.2s;
}

.topic-card.locked:hover::before {
    background: rgba(255, 255, 255, 0.6);
    color: #2563eb;
    transform: scale(1.02);
}

.topic-card.locked .quiz-links, 
.topic-card.locked .difficulty-wrapper,
.topic-card.locked .exam-actions {
    pointer-events: none; 
    opacity: 0.6;
}

/* --- ZMIANA DLA TELEFONÓW (Gasi rozwijanie karty i ukrywa strzałkę dla zablokowanych) --- */
@media (max-width: 900px) {
    .topic-card.locked::before {
        font-size: 1.05rem; 
        content: "⭐ Odblokuj Premium"; 
    }
    
    /* Ukrywamy strzałkę "▼", bo zablokowana karta nie powinna się rozwijać */
    .topic-card.locked::after {
        display: none !important; 
    }
}

/* ========================================================= */
/* --- 12. UKRYWANIE I ROZWIJANIE ARKUSZY --- */
/* Domyślnie ukrywa wszystkie elementy exam-row od 4 wzwyż */
/* ========================================================= */

.exam-list .exam-row:nth-child(n+4) {
    display: none;
}

/* Po dodaniu tej klasy przez JS, przywracamy im display: flex */
.exam-list.expanded-exams .exam-row:nth-child(n+4) {
    display: flex;
}

/* Wygląd przycisku rozwijania */
.btn-expand-exams {
    background: none;
    border: none;
    color: #b45309;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: center;
    width: 100%;
    padding: 10px 0 0 0;
    transition: color 0.2s;
}
.btn-expand-exams:hover {
    color: #92400e;
    text-decoration: underline;
}

/* Domyślnie ukrywamy arkusze od 4. w dół (możesz zmienić liczbę "4" na inną) */
.exam-list .exam-row:nth-child(n+4) {
    display: none;
}

/* Kiedy lista ma klasę "show-all", pokazujemy ukryte arkusze */
.exam-list.show-all .exam-row:nth-child(n+4) {
    display: flex; /* Zmień na 'block', jeśli Twoje rzędy nie używają flexboxa */
}


/* ========================================================= */
/* --- 13. STYLE DLA NOWEGO OKIENKA "PLAN NA DZIŚ" --- */
/* ========================================================= */
.daily-plan-card {
        background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
        border: 2px solid #3b82f6; /* Niebieski akcent pasujący do mentora */
        border-radius: 20px;
        padding: 24px;
        text-align: center;
        margin: 10px auto 40px auto;
        max-width: 700px;
        box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
        position: relative;
        overflow: hidden;
    }

    .daily-plan-card::before {
        content: '';
        position: absolute;
        top: 0; left: 0; right: 0; height: 4px;
        background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    }

    .daily-plan-card h3 {
        color: #1e293b;
        font-size: 1.5rem;
        margin-top: 0;
        margin-bottom: 8px;
        font-weight: 800;
    }

    .daily-plan-card p {
        color: #475569;
        font-size: 1rem;
        margin-bottom: 24px;
        line-height: 1.5;
    }

    .btn-daily-plan {
        display: inline-block;
        background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
        color: white;
        font-weight: 800;
        text-decoration: none;
        padding: 14px 32px;
        border-radius: 50px;
        font-size: 1.1rem;
        transition: transform 0.2s, box-shadow 0.2s;
        box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    }

    .btn-daily-plan:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
        color: white;
    }

    @media (max-width: 768px) {
        .daily-plan-card {
            margin: 10px 20px 30px 20px; /* Marginesy boczne dla telefonów */
            padding: 20px 15px;
        }
        .daily-plan-card h3 {
            font-size: 1.3rem;
        }
        .btn-daily-plan {
            width: 100%; /* Na telefonie przycisk na całą szerokość */
            box-sizing: border-box;
        }
    }


/* PRZYCISKI OCEN */
    .grade-btn {
        border: none;
        padding: 8px 14px;
        border-radius: 6px;
        font-weight: 700;
        font-size: 0.9rem;
        cursor: pointer;
        color: white;
        transition: transform 0.1s, opacity 0.2s;
    }
    .grade-btn:hover { opacity: 0.85; transform: scale(1.05); }

    .g-1 { background-color: #ef4444; } /* Czerwony */
    .g-2 { background-color: #f97316; } /* Pomarańczowy */
    .g-3 { background-color: #f59e0b; } /* Żółty ciemny */
    .g-4 { background-color: #84cc16; } /* Limonka */
    .g-5 { background-color: #22c55e; } /* Zielony jasny */
    .g-6 { background-color: #10b981; } /* Szmaragdowy */