/* =========================================================
   PYQ SUBJECT CARDS
   AUTO COLOR SYSTEM
   ========================================================= */


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

.sp-subject-grid {

    width: 100%;
    max-width: 1200px;

    margin: 28px auto 40px;

    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 18px;

    box-sizing: border-box;
}

/* =========================================================
   COMMON CARD
   ========================================================= */

.sp-subject-card {

    /*
     * Every card gets its own color automatically.
     * No subject name is required.
     */

    --subject-color: #2563eb;
    --subject-soft: #eaf2ff;
    --subject-border: #dbe7ff;

    position: relative;

    min-width: 0;

    padding: 15px;

    box-sizing: border-box;

    border-radius: 15px;

    background: #ffffff;

    border: 1px solid var(--subject-border);

    box-shadow:
        0 5px 18px rgba(15, 23, 42, 0.055);

    overflow: hidden;

    transition:
        transform .18s ease,
        box-shadow .18s ease;
}


.sp-subject-card:hover {

    transform: translateY(-2px);

    box-shadow:
        0 9px 24px rgba(15, 23, 42, 0.09);
}


/* =========================================================
   10-COLOR SYSTEM
   ---------------------------------------------------------
   Card 1  → Blue
   Card 2  → Green
   Card 3  → Purple
   Card 4  → Orange
   Card 5  → Pink
   Card 6  → Cyan
   Card 7  → Red
   Card 8  → Indigo
   Card 9  → Teal
   Card 10 → Amber

   11th card automatically returns to color 1.
   ========================================================= */


/* 1 */

.sp-subject-card:nth-child(10n + 1) {

    --subject-color: #2563eb;
    --subject-soft: #eaf2ff;
    --subject-border: #dbe7ff;
}


/* 2 */

.sp-subject-card:nth-child(10n + 2) {

    --subject-color: #16a34a;
    --subject-soft: #e8f8ee;
    --subject-border: #d9f0e2;
}


/* 3 */

.sp-subject-card:nth-child(10n + 3) {

    --subject-color: #7c3aed;
    --subject-soft: #f0e9ff;
    --subject-border: #e7dcff;
}


/* 4 */

.sp-subject-card:nth-child(10n + 4) {

    --subject-color: #f97316;
    --subject-soft: #fff1e6;
    --subject-border: #ffe3cf;
}


/* 5 */

.sp-subject-card:nth-child(10n + 5) {

    --subject-color: #ec4899;
    --subject-soft: #ffeaf4;
    --subject-border: #ffdbea;
}


/* 6 */

.sp-subject-card:nth-child(10n + 6) {

    --subject-color: #0891b2;
    --subject-soft: #e5f8fc;
    --subject-border: #cceff5;
}


/* 7 */

.sp-subject-card:nth-child(10n + 7) {

    --subject-color: #ef4444;
    --subject-soft: #fff0f0;
    --subject-border: #ffd9d9;
}


/* 8 */

.sp-subject-card:nth-child(10n + 8) {

    --subject-color: #4f46e5;
    --subject-soft: #eeeeff;
    --subject-border: #dedefd;
}


/* 9 */

.sp-subject-card:nth-child(10n + 9) {

    --subject-color: #0d9488;
    --subject-soft: #e6f8f6;
    --subject-border: #ccefeb;
}


/* 10 */

.sp-subject-card:nth-child(10n) {

    --subject-color: #d97706;
    --subject-soft: #fff5df;
    --subject-border: #ffe8b5;
}


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

.sp-card-header {

    position: relative;

    min-height: 70px;

    display: flex;

    align-items: flex-start;

    gap: 11px;

    padding-right: 92px;

    box-sizing: border-box;
}


/* =========================================================
   ICON
   ========================================================= */

.sp-card-icon {

    width: 46px;
    height: 46px;

    flex: 0 0 46px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: var(--subject-color);

    background: var(--subject-soft);

    font-size: 25px;

    line-height: 1;

    font-family:
        "Segoe UI Emoji",
        "Apple Color Emoji",
        sans-serif;
}


.text-icon {

    font-family: Arial, sans-serif;

    font-size: 23px;

    font-weight: 800;
}


/* =========================================================
   CARD CONTENT
   ========================================================= */

.sp-card-content {

    min-width: 0;

    padding-top: 2px;
}


/* =========================================================
   TITLE
   ========================================================= */

.sp-card-title {

    margin: 0;

    color: #111827;

    font-size: 16px;

    font-weight: 800;

    line-height: 1.25;
}


/* =========================================================
   SUBTITLE
   ========================================================= */

.sp-card-subtitle {

    margin-top: 6px;

    color: #64748b;

    font-size: 10px;

    line-height: 1.45;

    font-weight: 500;
}


/* =========================================================
   UPDATED BADGE
   ========================================================= */

.sp-updated-badge {

    position: absolute;

    top: 1px;
    right: 0;

    display: inline-flex;

    align-items: center;

    gap: 5px;

    padding: 4px 7px;

    border-radius: 999px;

    color: var(--subject-color);

    background: var(--subject-soft);

    font-size: 8px;

    font-weight: 700;

    line-height: 1;

    white-space: nowrap;
}


/* =========================================================
   CHECK MARK
   ========================================================= */

.sp-check {

    width: 13px;
    height: 13px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: #ffffff;

    background: var(--subject-color);

    font-size: 8px;

    font-weight: 900;
}


/* =========================================================
   STATS ROW
   ========================================================= */

.sp-stats-row {

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    margin-top: 10px;

    padding: 6px 3px;

    border: 1px solid var(--subject-border);

    border-radius: 9px;

    background: rgba(255, 255, 255, .55);
}


/* =========================================================
   SINGLE STAT
   ========================================================= */

.sp-stat {

    min-width: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 5px;

    padding: 2px 5px;

    border-right: 1px solid var(--subject-border);
}


.sp-stat:last-child {

    border-right: 0;
}


/* =========================================================
   STAT ICON
   ========================================================= */

.sp-stat-icon {

    color: var(--subject-color);

    font-size: 14px;

    font-weight: 700;

    line-height: 1;
}


/* =========================================================
   STAT TEXT
   ========================================================= */

.sp-stat div {

    min-width: 0;
}


.sp-stat strong {

    display: block;

    color: #1e293b;

    font-size: 10px;

    line-height: 1.1;

    font-weight: 800;

    white-space: nowrap;
}


.sp-stat small {

    display: block;

    margin-top: 2px;

    color: #64748b;

    font-size: 7px;

    line-height: 1;

    white-space: nowrap;
}


/* =========================================================
   BUTTON AREA
   ========================================================= */

.sp-subject-actions {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 7px;

    margin-top: 10px;
}


/* =========================================================
   COMMON BUTTON
   ========================================================= */

.sp-mode-btn {

    min-width: 0;

    min-height: 31px;

    padding: 6px 9px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 6px;

    box-sizing: border-box;

    border-radius: 7px;

    font-size: 10px;

    font-weight: 800;

    line-height: 1;

    text-decoration: none !important;

    transition:
        transform .15s ease,
        opacity .15s ease;
}


.sp-mode-btn:hover {

    transform: translateY(-1px);

    opacity: .92;
}


/* =========================================================
   TOPIC WISE
   ========================================================= */

.sp-topic-btn {

    color: var(--subject-color) !important;

    background: #ffffff;

    border: 1px solid var(--subject-color);
}


/* =========================================================
   FULL LENGTH
   ========================================================= */

.sp-full-btn {

    color: #ffffff !important;

    background: var(--subject-color);

    border: 1px solid var(--subject-color);
}


.sp-full-btn span {

    margin-left: auto;

    font-size: 15px;

    line-height: 1;
}


/* =========================================================
   DARK MODE
   ========================================================= */

html.dark-mode .sp-subject-card,
body.dark-mode .sp-subject-card,
html.dark .sp-subject-card,
body.dark .sp-subject-card {

    background: #111827;

    border-color: var(--subject-border);

    box-shadow:
        0 6px 20px rgba(0, 0, 0, .22);
}


html.dark-mode .sp-card-title,
body.dark-mode .sp-card-title,
html.dark .sp-card-title,
body.dark .sp-card-title {

    color: #f8fafc;
}


html.dark-mode .sp-card-subtitle,
body.dark-mode .sp-card-subtitle,
html.dark .sp-card-subtitle,
body.dark .sp-card-subtitle {

    color: #94a3b8;
}


html.dark-mode .sp-stats-row,
body.dark-mode .sp-stats-row,
html.dark .sp-stats-row,
body.dark .sp-stats-row {

    background: #151f31;
}


html.dark-mode .sp-stat strong,
body.dark-mode .sp-stat strong,
html.dark .sp-stat strong,
body.dark .sp-stat strong {

    color: #e2e8f0;
}


html.dark-mode .sp-stat small,
body.dark-mode .sp-stat small,
html.dark .sp-stat small,
body.dark .sp-stat small {

    color: #94a3b8;
}


html.dark-mode .sp-topic-btn,
body.dark-mode .sp-topic-btn,
html.dark .sp-topic-btn,
body.dark .sp-topic-btn {

    background: #111827;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

    .sp-subject-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        width: min(
            720px,
            calc(100% - 24px)
        );

        gap: 12px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .sp-subject-grid {

        grid-template-columns: 1fr;

        width: calc(100% - 20px);
        max-width: none;

        margin-top: 18px;

        gap: 11px;
    }


    .sp-subject-card {

        padding: 13px;

        border-radius: 13px;
    }


    .sp-card-header {

        min-height: 63px;

        padding-right: 82px;

        gap: 9px;
    }


    .sp-card-icon {

        width: 41px;
        height: 41px;

        flex-basis: 41px;

        font-size: 22px;
    }


    .sp-card-title {

        font-size: 15px;
    }


    .sp-card-subtitle {

        font-size: 9.5px;

        margin-top: 4px;
    }


    .sp-updated-badge {

        font-size: 7px;

        padding: 4px 6px;
    }


    .sp-check {

        width: 12px;
        height: 12px;

        font-size: 7px;
    }


    .sp-stat {

        gap: 3px;

        padding: 2px 3px;
    }


    .sp-stat-icon {

        font-size: 12px;
    }


    .sp-stat strong {

        font-size: 9px;
    }


    .sp-stat small {

        font-size: 6.5px;
    }
}


/* =========================================================
   VERY SMALL DEVICES
   ========================================================= */

@media (max-width: 360px) {

    .sp-card-header {

        padding-right: 74px;
    }


    .sp-updated-badge {

        font-size: 6.5px;
    }


    .sp-mode-btn {

        font-size: 9px;

        min-height: 30px;
    }
}





















/* =========================================================
   PYQ EXAM HEADING
========================================================= */

.sp-pyq-heading {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 18px;
    text-align: center;
    box-sizing: border-box;
}


/* =========================================================
   TITLE
========================================================= */

.sp-pyq-heading-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.sp-pyq-heading-title h1 {
    margin: 0;
    padding: 0;

    color: #0f172a;

    font-size: 30px;
    line-height: 1.15;
    font-weight: 800;

    letter-spacing: -0.5px;
}


/* =========================================================
   LAUREL
========================================================= */

.sp-heading-laurel {
    color: #2563eb;

    font-size: 29px;
    font-weight: 700;

    line-height: 1;

    display: inline-block;
}

.sp-heading-laurel:first-child {
    transform: rotate(-20deg);
}

.sp-heading-laurel:last-child {
    transform: rotate(20deg);
}


/* =========================================================
   SUBTITLE
========================================================= */

.sp-pyq-heading-subtitle {
    margin-top: 7px;

    color: #64748b;

    font-size: 11px;
    line-height: 1.4;
    font-weight: 500;
}


/* =========================================================
   DARK MODE
========================================================= */

html.dark-mode .sp-pyq-heading-title h1,
body.dark-mode .sp-pyq-heading-title h1,
html.dark .sp-pyq-heading-title h1,
body.dark .sp-pyq-heading-title h1 {
    color: #f8fafc;
}


html.dark-mode .sp-pyq-heading-subtitle,
body.dark-mode .sp-pyq-heading-subtitle,
html.dark .sp-pyq-heading-subtitle,
body.dark .sp-pyq-heading-subtitle {
    color: #94a3b8;
}


html.dark-mode .sp-heading-laurel,
body.dark-mode .sp-heading-laurel,
html.dark .sp-heading-laurel,
body.dark .sp-heading-laurel {
    color: #60a5fa;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .sp-pyq-heading {
        width: calc(100% - 20px);
        max-width: none;
        margin: 18px auto 14px;
    }

    .sp-pyq-heading-title {
        gap: 8px;
    }

    .sp-pyq-heading-title h1 {
        font-size: 24px;
    }

    .sp-heading-laurel {
        font-size: 23px;
    }

    .sp-pyq-heading-subtitle {
        font-size: 9px;
        padding: 0 10px;
    }
}

















