* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: #f4f6fb;
}

/* ================= HEADER ================= */

.practice-header {
    background: linear-gradient(90deg, #1f66d1, #1a4fb5);
    color: white;
    text-align: center;
    padding: 30px 20px 90px;
}

.practice-header h1 {
    margin: 0;
    font-size: 36px;
    font-weight: 700;
}

.practice-header h6 {
    margin-top: 10px;
    font-size: 16px;
    opacity: 0.9;
    font-weight: 400;
}

/* ================= WRAPPER ================= */

.quiz-wrapper {
    max-width: 1200px;
    margin: -50px auto 60px;
    padding: 0 20px;
}

/* ================= BREADCRUMB + STAGE HEADING ================= */

.browse-topbar {
    background: white;
    border-radius: 14px;
    padding: 18px 24px;
    margin-bottom: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.browse-breadcrumb {
    font-size: 14px;
    color: #667;
    margin-bottom: 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 4px;
}

.browse-breadcrumb .crumb {
    cursor: pointer;
    color: #1f66d1;
    font-weight: 500;
}

.browse-breadcrumb .crumb:hover {
    text-decoration: underline;
}

.browse-breadcrumb .crumb.active {
    color: #333;
    cursor: default;
    font-weight: 600;
}

.browse-breadcrumb .crumb.active:hover {
    text-decoration: none;
}

.browse-breadcrumb .crumb-sep {
    color: #bbb;
    font-size: 11px;
    margin: 0 4px;
}

.stage-heading {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1a2b4c;
}

/* ================= GRID ================= */

.quiz-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.empty-msg {
    grid-column: 1 / -1;
    text-align: center;
    color: #777;
    font-size: 16px;
    padding: 40px 0;
}

/* ================= BROWSE CARDS (Course / Paper / Chapter) ================= */

.browse-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.browse-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.browse-thumb-wrap {
    width: 100%;
    height: 170px;
    overflow: hidden;
    background: #e8f0ff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.browse-thumb {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.browse-card-body {
    padding: 18px 20px 22px;
}

.browse-card-body h3 {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 600;
    color: #1f66d1;
}

.browse-subtitle {
    font-size: 13px;
    color: #666;
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.browse-btn {
    width: 100%;
    border: none;
    background: #eaf1ff;
    color: #1f66d1;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    pointer-events: none;
}

.browse-card:hover .browse-btn {
    background: #1f66d1;
    color: white;
}

/* ================= QUIZ CARD (final level) ================= */

.quiz-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-top: 4px solid #1f66d1;
}

.quiz-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.quiz-card h3 {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 600;
    color: #1f66d1;
}

.quiz-card p {
    margin: 6px 0;
    font-size: 14px;
    color: #444;
}

.quiz-card .course-badge {
    display: inline-block;
    background: #1f66d1;
    color: #ffffff;
    font-size: 16px;
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
    font-weight: 600;
}

.quiz-card button {
    margin-top: 20px;
    padding: 12px;
    border: none;
    border-radius: 6px;
    background: #1f66d1;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-card button:hover {
    background: #1449a5;
    transform: scale(1.03);
}

/* ================= RESPONSIVE ================= */

/* ================= RESPONSIVE ================= */

@media (max-width: 991px) {
    .quiz-wrapper {
        margin-top: -40px;
    }
}

@media (max-width: 768px) {
    .practice-header {
        padding: 25px 16px 80px;
    }

    .practice-header h1 {
        font-size: 28px;
    }

    .practice-header h6 {
        font-size: 14px;
    }

    .quiz-wrapper {
        padding: 0 14px;
    }

    .quiz-container {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 18px;
    }

    .browse-thumb-wrap {
        height: 140px;
    }
}

@media (max-width: 480px) {
    .practice-header h1 {
        font-size: 22px;
    }

    .quiz-wrapper {
        margin-top: -35px;
        padding: 0 10px;
    }

    .browse-topbar {
        padding: 12px 14px;
    }

    .stage-heading {
        font-size: 17px;
    }

    .quiz-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .browse-thumb-wrap {
        height: 160px;
    }

    .quiz-card,
    .browse-card {
        padding-left: 0;
        padding-right: 0;
    }

    .quiz-card {
        padding: 20px;
    }
}