:root {

    --bg: #07111f;

    --panel:
        rgba(13, 27, 45, 0.88);

    --panel-2:
        rgba(18, 35, 57, 0.90);

    --border:
        rgba(255, 255, 255, 0.09);

    --text:
        #f4f7fb;

    --muted:
        #9fb0c4;

    --accent:
        #4f8cff;

    --accent-2:
        #64d6ff;

    --success:
        #46d39a;

    --warning:
        #ffbd66;

    --danger:
        #ff6b7a;

    --shadow:
        0 24px 70px rgba(0, 0, 0, 0.28);
}



/* ========================================================= */
/* GLOBAL */
/* ========================================================= */

* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {

    margin: 0;

    min-height: 100vh;

    font-family:
        "Inter",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--text);

    background:

        radial-gradient(
            circle at 10% 10%,
            rgba(79, 140, 255, 0.16),
            transparent 30%
        ),

        radial-gradient(
            circle at 90% 20%,
            rgba(100, 214, 255, 0.12),
            transparent 30%
        ),

        linear-gradient(
            145deg,
            #06101c 0%,
            #0a1728 48%,
            #07111f 100%
        );
}


button,
input {
    font: inherit;
}


.page-shell {

    width:
        min(
            1180px,
            calc(100% - 32px)
        );

    margin: 0 auto;
}



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

.topbar {

    min-height: 88px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 24px;

    border-bottom:
        1px solid var(--border);
}


.brand {

    display: flex;

    align-items: center;

    gap: 14px;
}


.brand-mark {

    width: 44px;

    height: 44px;

    display: grid;

    place-items: center;

    border-radius: 14px;

    font-weight: 800;

    letter-spacing: -0.04em;

    background:
        linear-gradient(
            135deg,
            var(--accent),
            var(--accent-2)
        );

    box-shadow:
        0 12px 30px
        rgba(79, 140, 255, 0.28);
}


.brand h1 {

    margin: 0;

    font-size: 16px;

    font-weight: 700;
}


.brand p {

    margin:
        4px 0 0;

    color:
        var(--muted);

    font-size: 12px;
}



/* ========================================================= */
/* STATUS */
/* ========================================================= */

.status-pill,
.model-chip {

    display: inline-flex;

    align-items: center;

    gap: 8px;

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

    background:
        rgba(255, 255, 255, 0.04);

    padding:
        9px 12px;

    border-radius:
        999px;

    color:
        var(--muted);

    font-size:
        12px;

    font-weight:
        600;
}


.status-dot {

    width:
        8px;

    height:
        8px;

    border-radius:
        50%;

    background:
        #f3b74e;

    box-shadow:
        0 0 0 4px
        rgba(243, 183, 78, 0.10);
}


.status-pill.online
.status-dot {

    background:
        var(--success);

    box-shadow:
        0 0 0 4px
        rgba(70, 211, 154, 0.10);
}


.status-pill.offline
.status-dot {

    background:
        var(--danger);

    box-shadow:
        0 0 0 4px
        rgba(255, 107, 122, 0.10);
}



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

.content {

    padding:
        72px 0 48px;
}


.hero {

    display:
        grid;

    grid-template-columns:
        1.05fr 0.95fr;

    gap:
        56px;

    align-items:
        center;

    min-height:
        620px;
}


.eyebrow,
.card-kicker {

    display:
        inline-block;

    color:
        var(--accent-2);

    font-weight:
        700;

    font-size:
        12px;

    letter-spacing:
        0.14em;

    text-transform:
        uppercase;
}


.hero-copy h2,
.section-heading h2 {

    margin:
        14px 0 18px;

    letter-spacing:
        -0.04em;
}


.hero-copy h2 {

    max-width:
        680px;

    font-size:
        clamp(
            42px,
            5vw,
            68px
        );

    line-height:
        1.02;
}


.hero-copy p {

    max-width:
        650px;

    color:
        var(--muted);

    font-size:
        17px;

    line-height:
        1.75;
}



/* ========================================================= */
/* MODEL METRICS */
/* ========================================================= */

.metrics {

    margin-top:
        34px;

    display:
        grid;

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

    gap:
        14px;
}


.metric {

    padding:
        18px;

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

    border-radius:
        16px;

    background:
        rgba(
            255,
            255,
            255,
            0.035
        );
}


.metric-value {

    display:
        block;

    font-size:
        22px;

    font-weight:
        800;
}


.metric-label {

    display:
        block;

    margin-top:
        6px;

    color:
        var(--muted);

    font-size:
        11px;

    line-height:
        1.4;
}



/* ========================================================= */
/* CARDS */
/* ========================================================= */

.card {

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

    border-radius:
        24px;

    background:
        linear-gradient(
            180deg,
            rgba(18, 35, 57, 0.94),
            rgba(11, 24, 41, 0.92)
        );

    box-shadow:
        var(--shadow);
}


.classifier-card {

    padding:
        26px;
}


.card-header {

    display:
        flex;

    justify-content:
        space-between;

    align-items:
        flex-start;

    gap:
        16px;

    margin-bottom:
        20px;
}


.card-header h3 {

    margin:
        7px 0 0;

    font-size:
        24px;
}



/* ========================================================= */
/* DROP AREA */
/* ========================================================= */

.drop-zone {

    min-height:
        250px;

    padding:
        34px 24px;

    display:
        flex;

    flex-direction:
        column;

    justify-content:
        center;

    align-items:
        center;

    text-align:
        center;

    border:
        1.5px dashed
        rgba(
            100,
            214,
            255,
            0.35
        );

    border-radius:
        20px;

    background:
        rgba(
            79,
            140,
            255,
            0.04
        );

    cursor:
        pointer;

    transition:
        180ms ease;
}


.drop-zone:hover,
.drop-zone.dragging {

    transform:
        translateY(-2px);

    border-color:
        var(--accent-2);

    background:
        rgba(
            79,
            140,
            255,
            0.08
        );
}


.upload-icon {

    width:
        54px;

    height:
        54px;

    display:
        grid;

    place-items:
        center;

    border-radius:
        16px;

    margin-bottom:
        16px;

    font-size:
        24px;

    font-weight:
        800;

    background:
        linear-gradient(
            135deg,
            rgba(79, 140, 255, 0.25),
            rgba(100, 214, 255, 0.14)
        );

    color:
        var(--accent-2);
}


.drop-zone strong {

    font-size:
        16px;
}


.drop-zone span,
.drop-zone small {

    color:
        var(--muted);
}


.drop-zone span {

    margin-top:
        6px;

    font-size:
        14px;
}


.drop-zone small {

    margin-top:
        16px;

    font-size:
        11px;
}



/* ========================================================= */
/* IMAGE PREVIEW */
/* ========================================================= */

.preview-wrap {

    display:
        grid;

    gap:
        12px;
}


.preview-wrap img {

    width:
        100%;

    max-height:
        320px;

    object-fit:
        cover;

    border-radius:
        18px;

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



/* ========================================================= */
/* BUTTONS */
/* ========================================================= */

.primary-btn,
.secondary-btn {

    border:
        0;

    cursor:
        pointer;

    transition:
        180ms ease;
}


.primary-btn {

    width:
        100%;

    min-height:
        52px;

    margin-top:
        16px;

    border-radius:
        15px;

    color:
        #ffffff;

    font-weight:
        800;

    background:
        linear-gradient(
            135deg,
            var(--accent),
            #6f62ff
        );

    box-shadow:
        0 14px 34px
        rgba(79, 140, 255, 0.24);
}


.primary-btn:hover:not(:disabled) {

    transform:
        translateY(-1px);
}


.primary-btn:disabled {

    opacity:
        0.48;

    cursor:
        not-allowed;

    box-shadow:
        none;
}


.secondary-btn {

    width:
        fit-content;

    padding:
        9px 12px;

    border-radius:
        12px;

    color:
        var(--text);

    background:
        rgba(
            255,
            255,
            255,
            0.06
        );

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



/* ========================================================= */
/* ERROR */
/* ========================================================= */

.error-box {

    margin-top:
        14px;

    padding:
        13px 14px;

    border-radius:
        12px;

    color:
        #ffd8dd;

    background:
        rgba(
            255,
            107,
            122,
            0.10
        );

    border:
        1px solid
        rgba(
            255,
            107,
            122,
            0.22
        );

    font-size:
        13px;
}



/* ========================================================= */
/* RESULTS */
/* ========================================================= */

.results-section,
.classes-section {

    padding-top:
        70px;
}


.section-heading h2 {

    font-size:
        34px;
}


.results-grid {

    display:
        grid;

    grid-template-columns:
        1fr 1fr;

    gap:
        22px;
}


.primary-result,
.top-predictions-card {

    padding:
        26px;
}


.primary-result h3 {

    margin:
        10px 0 26px;

    font-size:
        42px;

    text-transform:
        capitalize;

    letter-spacing:
        -0.04em;
}



/* ========================================================= */
/* UNCERTAINTY RESULT */
/* ========================================================= */

.primary-result.uncertain-result {

    border-color:
        rgba(
            255,
            189,
            102,
            0.35
        );
}


.primary-result.uncertain-result h3 {

    color:
        var(--warning);
}


.prediction-message {

    margin-top:
        18px;

    padding:
        14px 16px;

    border-radius:
        14px;

    font-size:
        13px;

    line-height:
        1.6;
}


.prediction-message.uncertain {

    color:
        #ffd6a5;

    background:
        rgba(
            255,
            170,
            60,
            0.10
        );

    border:
        1px solid
        rgba(
            255,
            170,
            60,
            0.30
        );
}


.prediction-message.confident {

    color:
        #b9f6d8;

    background:
        rgba(
            70,
            211,
            154,
            0.10
        );

    border:
        1px solid
        rgba(
            70,
            211,
            154,
            0.25
        );
}



/* ========================================================= */
/* CONFIDENCE BAR */
/* ========================================================= */

.confidence-row {

    display:
        flex;

    justify-content:
        space-between;

    gap:
        20px;

    margin-bottom:
        10px;

    color:
        var(--muted);
}


.confidence-row strong {

    color:
        var(--text);
}


.confidence-track,
.prediction-track {

    width:
        100%;

    overflow:
        hidden;

    background:
        rgba(
            255,
            255,
            255,
            0.06
        );

    border-radius:
        999px;
}


.confidence-track {

    height:
        11px;
}


.confidence-fill,
.prediction-fill {

    width:
        0%;

    height:
        100%;

    border-radius:
        inherit;

    background:
        linear-gradient(
            90deg,
            var(--accent),
            var(--accent-2)
        );

    transition:
        width 650ms ease;
}



/* ========================================================= */
/* RESULT META */
/* ========================================================= */

.result-meta {

    display:
        flex;

    justify-content:
        space-between;

    gap:
        20px;

    margin-top:
        22px;

    padding-top:
        18px;

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

    color:
        var(--muted);

    font-size:
        12px;
}



/* ========================================================= */
/* TOP 3 */
/* ========================================================= */

.top-predictions {

    margin-top:
        18px;

    display:
        grid;

    gap:
        18px;
}


.prediction-row {

    display:
        grid;

    gap:
        8px;
}


.prediction-label {

    display:
        flex;

    justify-content:
        space-between;

    gap:
        20px;
}


.prediction-label strong {

    text-transform:
        capitalize;
}


.prediction-label span {

    color:
        var(--muted);
}


.prediction-track {

    height:
        8px;
}



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

.class-grid {

    display:
        grid;

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

    gap:
        14px;
}


.class-card {

    min-height:
        120px;

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    justify-content:
        center;

    gap:
        12px;

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

    border-radius:
        18px;

    background:
        rgba(
            255,
            255,
            255,
            0.035
        );
}


.class-card span {

    font-size:
        28px;
}


.class-card strong {

    font-size:
        13px;
}



/* ========================================================= */
/* FOOTER */
/* ========================================================= */

footer {

    min-height:
        80px;

    display:
        flex;

    justify-content:
        space-between;

    align-items:
        center;

    gap:
        20px;

    color:
        var(--muted);

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

    font-size:
        12px;
}



/* ========================================================= */
/* SPINNER */
/* ========================================================= */

.spinner {

    display:
        inline-block;

    width:
        17px;

    height:
        17px;

    margin-left:
        8px;

    border:
        2px solid
        rgba(
            255,
            255,
            255,
            0.35
        );

    border-top-color:
        #ffffff;

    border-radius:
        50%;

    vertical-align:
        middle;

    animation:
        spin 0.8s linear infinite;
}


.hidden {

    display:
        none !important;
}


@keyframes spin {

    to {
        transform:
            rotate(360deg);
    }

}



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

@media (max-width: 900px) {

    .hero {

        grid-template-columns:
            1fr;

        gap:
            38px;

        padding-top:
            24px;
    }


    .results-grid {

        grid-template-columns:
            1fr;
    }


    .class-grid {

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

}


@media (max-width: 620px) {

    .page-shell {

        width:
            min(
                100% - 20px,
                1180px
            );
    }


    .topbar {

        align-items:
            flex-start;

        padding:
            18px 0;

        flex-direction:
            column;
    }


    .content {

        padding-top:
            42px;
    }


    .hero-copy h2 {

        font-size:
            42px;
    }


    .metrics {

        grid-template-columns:
            1fr;
    }


    .classifier-card,
    .primary-result,
    .top-predictions-card {

        padding:
            18px;
    }


    .class-grid {

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


    footer {

        align-items:
            flex-start;

        flex-direction:
            column;

        justify-content:
            center;
    }

}
