#csec-practice-centre-app,
#csec-practice-centre-app * {
    box-sizing: border-box;
}

#csec-practice-centre-app {
    --page-bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-raised: #ffffff;
    --text: #172033;
    --text-soft: #4f5f75;
    --muted: #718096;
    --border: #e3e9f1;
    --border-strong: #d5deea;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #eaf2ff;
    --success: #0f9f6e;
    --success-soft: #e7f8f1;
    --shadow-sm: 0 8px 24px rgba(27, 39, 64, 0.07);
    --shadow-md: 0 18px 48px rgba(27, 39, 64, 0.12);
    --radius-sm: 14px;
    --radius-md: 20px;
    --radius-lg: 28px;
    min-height: 100vh;
    padding: 42px 20px 72px;
    color: var(--text);
    background:
        radial-gradient(circle at 8% 4%, rgba(37, 99, 235, 0.10), transparent 28%),
        radial-gradient(circle at 92% 26%, rgba(15, 159, 110, 0.08), transparent 26%),
        var(--page-bg);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    transition: color 0.25s ease, background-color 0.25s ease;
}

#csec-practice-centre-app.is-dark {
    --page-bg: #0d1422;
    --surface: #141f31;
    --surface-soft: #101a2a;
    --surface-raised: #18253a;
    --text: #edf3fc;
    --text-soft: #c5d0df;
    --muted: #94a4b8;
    --border: #26354a;
    --border-strong: #34465f;
    --primary: #6ea8ff;
    --primary-dark: #8bb8ff;
    --primary-soft: rgba(76, 137, 232, 0.16);
    --success: #51d6a8;
    --success-soft: rgba(24, 170, 119, 0.14);
    --shadow-sm: 0 10px 28px rgba(0, 0, 0, 0.22);
    --shadow-md: 0 22px 54px rgba(0, 0, 0, 0.34);
    background:
        radial-gradient(circle at 8% 4%, rgba(66, 125, 225, 0.13), transparent 28%),
        radial-gradient(circle at 92% 26%, rgba(25, 165, 116, 0.09), transparent 26%),
        var(--page-bg);
}

#csec-practice-centre-app a {
    color: inherit;
}

#csec-practice-centre-app button,
#csec-practice-centre-app input {
    font: inherit;
}

#csec-practice-centre-app button {
    cursor: pointer;
}

#csec-practice-centre-app .is-hidden,
#csec-practice-centre-app .is-filtered-out {
    display: none !important;
}

#csec-practice-centre-app .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#csec-practice-centre-app .practice-centre-shell {
    width: min(1240px, 100%);
    margin: 0 auto;
}

#csec-practice-centre-app .practice-centre-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

#csec-practice-centre-app .eyebrow,
#csec-practice-centre-app .section-label {
    display: block;
    margin-bottom: 7px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.13em;
    line-height: 1.3;
    text-transform: uppercase;
}

#csec-practice-centre-app .practice-centre-header h1 {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 8px;
    color: var(--text);
    font-size: clamp(29px, 4vw, 43px);
    font-weight: 850;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

#csec-practice-centre-app .practice-centre-header h1 i {
    color: var(--primary);
    font-size: 0.82em;
}

#csec-practice-centre-app .practice-centre-header p {
    max-width: 720px;
    margin: 0;
    color: var(--text-soft);
    font-size: 16px;
    line-height: 1.65;
}

#csec-practice-centre-app .theme-toggle {
    display: inline-grid;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    place-items: center;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#csec-practice-centre-app .theme-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

#csec-practice-centre-app .theme-toggle:focus-visible,
#csec-practice-centre-app .category-filter:focus-visible,
#csec-practice-centre-app .subject-card:focus-visible,
#csec-practice-centre-app .reset-filter-button:focus-visible,
#csec-practice-centre-app .clear-search:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.3);
    outline-offset: 3px;
}

#csec-practice-centre-app .practice-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
    gap: 38px;
    align-items: center;
    overflow: hidden;
    padding: 42px;
    margin-bottom: 30px;
    color: #ffffff;
    background:
        linear-gradient(128deg, rgba(6, 32, 76, 0.12), rgba(2, 44, 33, 0.12)),
        linear-gradient(120deg, #2359ca 0%, #2775da 48%, #0b9a78 100%);
    border-radius: var(--radius-lg);
    box-shadow: 0 26px 66px rgba(30, 91, 174, 0.23);
}

#csec-practice-centre-app .practice-hero::before,
#csec-practice-centre-app .practice-hero::after {
    position: absolute;
    width: 260px;
    height: 260px;
    content: "";
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    pointer-events: none;
}

#csec-practice-centre-app .practice-hero::before {
    top: -145px;
    right: 16%;
}

#csec-practice-centre-app .practice-hero::after {
    right: -130px;
    bottom: -160px;
    width: 330px;
    height: 330px;
}

#csec-practice-centre-app .hero-copy,
#csec-practice-centre-app .hero-stats {
    position: relative;
    z-index: 1;
}

#csec-practice-centre-app .hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 17px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

#csec-practice-centre-app .practice-hero h2 {
    max-width: 720px;
    margin: 0 0 14px;
    color: #ffffff;
    font-size: clamp(31px, 4.1vw, 52px);
    font-weight: 850;
    letter-spacing: -0.045em;
    line-height: 1.04;
}

#csec-practice-centre-app .practice-hero p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 16px;
    line-height: 1.7;
}

#csec-practice-centre-app .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

#csec-practice-centre-app .hero-stat {
    min-height: 116px;
    padding: 22px 18px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    backdrop-filter: blur(11px);
}

#csec-practice-centre-app .hero-stat.live-total-stat {
    grid-column: 1 / -1;
    min-height: 104px;
}

#csec-practice-centre-app .hero-stat strong,
#csec-practice-centre-app .hero-stat span {
    display: block;
}

#csec-practice-centre-app .hero-stat strong {
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 32px;
    font-weight: 850;
    letter-spacing: -0.035em;
    line-height: 1;
}

#csec-practice-centre-app .hero-stat span {
    color: rgba(255, 255, 255, 0.76);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.065em;
    text-transform: uppercase;
}

#csec-practice-centre-app .subject-browser {
    padding: 34px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

#csec-practice-centre-app .browser-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 24px;
}

#csec-practice-centre-app .browser-heading h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(25px, 3vw, 34px);
    font-weight: 820;
    letter-spacing: -0.035em;
    line-height: 1.15;
}

#csec-practice-centre-app #subject-result-count {
    flex: 0 0 auto;
    padding: 7px 11px;
    margin: 0 0 3px;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 750;
}

#csec-practice-centre-app .subject-tools {
    margin-bottom: 28px;
}

#csec-practice-centre-app .subject-search {
    position: relative;
    display: flex;
    align-items: center;
    width: min(560px, 100%);
    height: 50px;
    margin-bottom: 17px;
    color: var(--muted);
}

#csec-practice-centre-app .subject-search > i {
    position: absolute;
    left: 17px;
    z-index: 1;
    pointer-events: none;
}

#csec-practice-centre-app .subject-search input {
    width: 100%;
    height: 100%;
    padding: 0 50px 0 45px;
    color: var(--text);
    background: var(--surface-soft);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#csec-practice-centre-app .subject-search input::placeholder {
    color: var(--muted);
}

#csec-practice-centre-app .subject-search input:focus {
    background: var(--surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

#csec-practice-centre-app .clear-search {
    position: absolute;
    right: 10px;
    display: inline-grid;
    width: 31px;
    height: 31px;
    place-items: center;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 50%;
}

#csec-practice-centre-app .clear-search:hover {
    color: var(--text);
    background: var(--border);
}

#csec-practice-centre-app .category-filters {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding: 2px 2px 7px;
    scrollbar-width: thin;
}

#csec-practice-centre-app .category-filter {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 13px;
    color: var(--text-soft);
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 720;
    line-height: 1.2;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

#csec-practice-centre-app .category-filter:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
}

#csec-practice-centre-app .category-filter.is-active {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.19);
}

#csec-practice-centre-app .subject-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
}

#csec-practice-centre-app .subject-card {
    --card-accent: #66758a;
    --card-accent-rgb: 102, 117, 138;
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 264px;
    overflow: hidden;
    flex-direction: column;
    padding: 22px;
    color: var(--text);
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none !important;
    box-shadow: 0 7px 22px rgba(27, 39, 64, 0.05);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

#csec-practice-centre-app .subject-card.category-math-science {
    --card-accent: #2868d8;
    --card-accent-rgb: 40, 104, 216;
}

#csec-practice-centre-app .subject-card.category-languages {
    --card-accent: #8b5cf6;
    --card-accent-rgb: 139, 92, 246;
}

#csec-practice-centre-app .subject-card.category-business-digital {
    --card-accent: #0f9f83;
    --card-accent-rgb: 15, 159, 131;
}

#csec-practice-centre-app .subject-card.category-humanities {
    --card-accent: #e17a21;
    --card-accent-rgb: 225, 122, 33;
}

#csec-practice-centre-app .subject-card.category-creative-technical {
    --card-accent: #d04f79;
    --card-accent-rgb: 208, 79, 121;
}

#csec-practice-centre-app .subject-card:hover {
    color: var(--text);
    border-color: rgba(var(--card-accent-rgb), 0.42);
    box-shadow: 0 17px 40px rgba(27, 39, 64, 0.12);
    transform: translateY(-5px);
}

#csec-practice-centre-app.is-dark .subject-card:hover {
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.30);
}

#csec-practice-centre-app .subject-card.is-coming-soon:hover {
    transform: translateY(-2px);
}

#csec-practice-centre-app .card-accent {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: var(--card-accent);
    opacity: 0.72;
}

#csec-practice-centre-app .subject-card.is-available .card-accent {
    height: 5px;
    opacity: 1;
}

#csec-practice-centre-app .subject-card-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

#csec-practice-centre-app .subject-icon {
    display: inline-grid;
    width: 50px;
    height: 50px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--card-accent);
    background: rgba(var(--card-accent-rgb), 0.11);
    border: 1px solid rgba(var(--card-accent-rgb), 0.13);
    border-radius: 15px;
    font-size: 21px;
}

#csec-practice-centre-app .availability-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.035em;
    line-height: 1;
    text-transform: uppercase;
}

#csec-practice-centre-app .availability-badge.available {
    color: #087451;
    background: #e5f7ef;
}

#csec-practice-centre-app.is-dark .availability-badge.available {
    color: #79e3bd;
    background: rgba(29, 165, 115, 0.15);
}

#csec-practice-centre-app .availability-badge.coming-soon {
    color: var(--muted);
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

#csec-practice-centre-app .subject-card-copy {
    display: block;
    flex: 1;
    min-width: 0;
}

#csec-practice-centre-app .subject-category,
#csec-practice-centre-app .subject-name {
    display: block;
}

#csec-practice-centre-app .subject-category {
    margin-bottom: 7px;
    color: var(--card-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.075em;
    line-height: 1.25;
    text-transform: uppercase;
}

#csec-practice-centre-app .subject-name {
    color: var(--text);
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.024em;
    line-height: 1.3;
}

#csec-practice-centre-app .subject-card-footer {
    display: block;
    padding-top: 18px;
    margin-top: 19px;
    border-top: 1px solid var(--border);
}

#csec-practice-centre-app .question-count,
#csec-practice-centre-app .subject-cta {
    display: flex;
    align-items: center;
    gap: 7px;
}

#csec-practice-centre-app .question-count {
    min-height: 20px;
    margin-bottom: 12px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 670;
}

#csec-practice-centre-app .question-count i {
    color: var(--card-accent);
}

#csec-practice-centre-app .question-count.muted {
    color: var(--muted);
    font-weight: 600;
}

#csec-practice-centre-app .question-count.muted i {
    color: inherit;
}

#csec-practice-centre-app .subject-cta {
    justify-content: space-between;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 760;
}

#csec-practice-centre-app .subject-card.is-available .subject-cta {
    color: var(--card-accent);
}

#csec-practice-centre-app .subject-card.is-available .subject-cta i {
    transition: transform 0.2s ease;
}

#csec-practice-centre-app .subject-card.is-available:hover .subject-cta i {
    transform: translateX(4px);
}

#csec-practice-centre-app .subject-empty-state {
    padding: 58px 20px 38px;
    text-align: center;
}

#csec-practice-centre-app .empty-icon {
    display: inline-grid;
    width: 58px;
    height: 58px;
    margin-bottom: 15px;
    place-items: center;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 50%;
    font-size: 22px;
}

#csec-practice-centre-app .subject-empty-state h3 {
    margin: 0 0 7px;
    color: var(--text);
    font-size: 22px;
}

#csec-practice-centre-app .subject-empty-state p {
    margin: 0 0 17px;
    color: var(--muted);
}

#csec-practice-centre-app .reset-filter-button {
    padding: 10px 15px;
    color: #ffffff;
    background: var(--primary);
    border: 0;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 750;
}

#csec-practice-centre-app .practice-centre-note {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 22px 24px;
    margin-top: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

#csec-practice-centre-app .note-icon {
    display: inline-grid;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    place-items: center;
    color: #b9660f;
    background: #fff4d9;
    border-radius: 12px;
}

#csec-practice-centre-app.is-dark .note-icon {
    color: #ffd281;
    background: rgba(210, 136, 34, 0.15);
}

#csec-practice-centre-app .practice-centre-note strong {
    display: block;
    margin: 1px 0 4px;
    color: var(--text);
    font-size: 15px;
}

#csec-practice-centre-app .practice-centre-note p {
    margin: 0;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.55;
}

#csec-practice-centre-app .practice-centre-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    display: flex;
    max-width: min(390px, calc(100vw - 36px));
    align-items: center;
    gap: 11px;
    padding: 14px 17px;
    color: #ffffff;
    background: #152033;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 13px;
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.27);
    font-size: 13px;
    font-weight: 680;
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

#csec-practice-centre-app .practice-centre-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

#csec-practice-centre-app .practice-centre-toast i {
    color: #79e3bd;
}

@media (max-width: 1020px) {
    #csec-practice-centre-app .practice-hero {
        grid-template-columns: 1fr;
    }

    #csec-practice-centre-app .hero-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #csec-practice-centre-app .hero-stat.live-total-stat {
        grid-column: auto;
        min-height: 116px;
    }

    #csec-practice-centre-app .subject-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    #csec-practice-centre-app {
        padding: 28px 14px 54px;
    }

    #csec-practice-centre-app .practice-centre-header {
        align-items: center;
    }

    #csec-practice-centre-app .practice-centre-header p {
        font-size: 14px;
    }

    #csec-practice-centre-app .theme-toggle {
        width: 42px;
        height: 42px;
    }

    #csec-practice-centre-app .practice-hero {
        gap: 29px;
        padding: 29px 23px;
        border-radius: 22px;
    }

    #csec-practice-centre-app .hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #csec-practice-centre-app .hero-stat.live-total-stat {
        grid-column: 1 / -1;
        min-height: 96px;
    }

    #csec-practice-centre-app .subject-browser {
        padding: 24px 17px;
        border-radius: 22px;
    }

    #csec-practice-centre-app .browser-heading {
        align-items: flex-start;
    }

    #csec-practice-centre-app .subject-grid {
        grid-template-columns: 1fr;
    }

    #csec-practice-centre-app .subject-card {
        min-height: 244px;
    }
}

@media (max-width: 470px) {
    #csec-practice-centre-app .practice-centre-header h1 {
        font-size: 27px;
    }

    #csec-practice-centre-app .practice-centre-header h1 i {
        display: none;
    }

    #csec-practice-centre-app .practice-centre-header p {
        display: none;
    }

    #csec-practice-centre-app .practice-hero h2 {
        font-size: 32px;
    }

    #csec-practice-centre-app .hero-stat {
        min-height: 101px;
        padding: 19px 14px;
    }

    #csec-practice-centre-app .hero-stat strong {
        font-size: 27px;
    }

    #csec-practice-centre-app .browser-heading {
        display: block;
    }

    #csec-practice-centre-app #subject-result-count {
        display: inline-flex;
        margin-top: 13px;
    }

    #csec-practice-centre-app .practice-centre-note {
        padding: 19px;
    }

    #csec-practice-centre-app .practice-centre-toast {
        right: 18px;
        bottom: 18px;
        left: 18px;
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    #csec-practice-centre-app *,
    #csec-practice-centre-app *::before,
    #csec-practice-centre-app *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
