* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background:
        linear-gradient(135deg, #f7f9ff 0%, #eef3ff 45%, #fdfaff 100%);
    color: #18213d;
    min-height: 100vh;
}


/* =========================
   TOP BAR
========================= */

.topbar {
    min-height: 78px;
    padding: 14px 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;

    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid #e3e8f7;

    position: sticky;
    top: 0;
    z-index: 100;

    backdrop-filter: blur(18px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 45px;
    height: 45px;

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

    border-radius: 14px;

    background:
        linear-gradient(135deg, #5d5bea, #8b5cf6);

    color: white;
    font-size: 13px;
    font-weight: 900;

    box-shadow:
        0 10px 25px rgba(99, 91, 234, 0.3);
}

.brand h2 {
    font-size: 17px;
    line-height: 1.1;
}

.brand span {
    display: block;
    margin-top: 3px;
    color: #8a93aa;
    font-size: 10px;
}

nav {
    display: flex;
    gap: 7px;
}

nav a {
    text-decoration: none;
    color: #69738c;

    padding: 10px 15px;
    border-radius: 10px;

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

    transition: 0.2s;
}

nav a:hover,
nav a.active {
    color: #5d5bea;
    background: #eeeeff;
}

.model-online {
    display: flex;
    align-items: center;
    gap: 9px;

    padding: 8px 13px;

    background: #f7fff9;
    border: 1px solid #d8f1e2;
    border-radius: 12px;
}

.model-online strong {
    display: block;
    font-size: 11px;
}

.model-online small {
    display: block;
    margin-top: 2px;
    color: #7b8798;
    font-size: 9px;
}

.online-dot {
    width: 9px;
    height: 9px;
    flex-shrink: 0;

    border-radius: 50%;
    background: #19c779;

    box-shadow:
        0 0 0 4px rgba(25, 199, 121, 0.12);
}


/* =========================
   HERO
========================= */

.hero {
    padding: 72px 6% 62px;

    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(91, 91, 234, 0.15),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 10%,
            rgba(168, 85, 247, 0.16),
            transparent 30%
        );
}

.hero-content {
    width: min(1080px, 100%);
    margin: auto;
}

.hero-badge {
    display: inline-block;

    padding: 8px 13px;

    border-radius: 30px;

    background: linear-gradient(
        135deg,
        #eeeefe,
        #f6edff
    );

    color: #625de9;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 1.5px;
}

.hero h1 {
    max-width: 760px;

    margin-top: 19px;

    font-size: clamp(40px, 6vw, 66px);

    line-height: 1.03;
    letter-spacing: -3px;
}

.hero h1 span {
    display: block;

    background:
        linear-gradient(
            90deg,
            #5756e8,
            #7c3aed,
            #c026d3
        );

    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    max-width: 620px;

    margin-top: 21px;

    color: #68738c;

    font-size: 16px;
    line-height: 1.7;
}

.system-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    margin-top: 25px;

    padding: 10px 15px;

    background: white;

    border: 1px solid #dfe5f2;
    border-radius: 10px;

    font-size: 11px;
    font-weight: 800;

    box-shadow:
        0 8px 25px rgba(41, 51, 84, 0.06);
}

.system-status span {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: #19c779;

    box-shadow:
        0 0 0 4px rgba(25, 199, 121, 0.12);
}


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

.prediction-section,
.history-section,
.how-section {
    width: min(1080px, 88%);
    margin-left: auto;
    margin-right: auto;
}


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

.card {
    background: rgba(255, 255, 255, 0.94);

    border: 1px solid #e2e7f3;

    border-radius: 22px;

    padding: 30px;

    box-shadow:
        0 18px 55px rgba(45, 55, 95, 0.08);
}

.prediction-section {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 22px;

    margin-top: -8px;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    margin-bottom: 28px;
}

.section-label {
    color: #6965e9;

    font-size: 9px;
    font-weight: 900;

    letter-spacing: 1.7px;
}

.card h2,
.history-section h2,
.how-section h2 {
    margin-top: 6px;

    font-size: 24px;
    letter-spacing: -0.5px;
}

.step-badge {
    padding: 7px 10px;

    border-radius: 9px;

    background: #f0efff;
    color: #6863e8;

    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1px;
}

.ml-status {
    display: flex;
    align-items: center;
    gap: 8px;

    color: #727c92;

    font-size: 9px;
    font-weight: 900;
}


/* =========================
   FORM
========================= */

.form-grid {
    display: grid;

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

    gap: 21px;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 7px;

    margin-bottom: 8px;

    color: #29334e;

    font-size: 12px;
    font-weight: 800;
}

.input-group label em {
    margin-left: auto;

    color: #939bb0;

    font-style: normal;

    font-size: 9px;
    font-weight: 700;
}

.label-icon {
    width: 24px;
    height: 24px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 7px;

    font-size: 10px;
    font-weight: 900;
}

.attendance-icon {
    color: #0b9c70;
    background: #e6fff6;
}

.study-icon {
    color: #e27c00;
    background: #fff3dd;
}

.marks-icon {
    color: #5c5bea;
    background: #eeeeff;
}

.assignment-icon {
    color: #008ac7;
    background: #e5f7ff;
}

.internal-icon {
    color: #c026d3;
    background: #fdeaff;
}

.gpa-icon {
    color: #8b5cf6;
    background: #f1eaff;
}

.backlog-icon {
    color: #e23d67;
    background: #ffe8ee;
}

.input-box {
    position: relative;
}

.input-box input {
    width: 100%;
    height: 50px;

    padding: 0 72px 0 15px;

    border: 1px solid #dfe4f0;
    border-radius: 11px;

    outline: none;

    background: #f9faff;

    color: #1d2742;

    font-size: 14px;
    font-weight: 800;

    transition: 0.2s;
}

.input-box input:hover {
    border-color: #c8cdf0;
}

.input-box input:focus {
    border-color: #6b65ed;

    background: white;

    box-shadow:
        0 0 0 4px rgba(107, 101, 237, 0.1);
}

.input-box span {
    position: absolute;

    right: 13px;
    top: 50%;

    transform: translateY(-50%);

    color: #9098ac;

    font-size: 9px;
    font-weight: 800;
}

.input-group small {
    display: block;

    margin-top: 6px;

    color: #9aa2b5;

    font-size: 9px;
}


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

.predict-button {
    width: 100%;
    height: 54px;

    margin-top: 27px;

    border: none;
    border-radius: 12px;

    background:
        linear-gradient(
            100deg,
            #5957e8,
            #7655ef,
            #9b4de0
        );

    color: white;

    font-size: 13px;
    font-weight: 900;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    box-shadow:
        0 13px 28px rgba(91, 85, 231, 0.27);

    transition: 0.2s;
}

.predict-button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 17px 35px rgba(91, 85, 231, 0.34);
}

.predict-button:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}


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

.error-message {
    display: none;

    margin-top: 15px;
    padding: 12px;

    border-radius: 10px;

    background: #fff0f3;
    border: 1px solid #ffd2dc;

    color: #d9365d;

    font-size: 11px;
}


/* =========================
   EMPTY RESULT
========================= */

.empty-result {
    min-height: 300px;

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

    flex-direction: column;

    text-align: center;

    padding: 25px;
}

.empty-icon {
    width: 70px;
    height: 70px;

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

    border-radius: 21px;

    background:
        linear-gradient(
            135deg,
            #eeeeff,
            #f6eaff
        );

    color: #6862e9;

    font-size: 27px;

    margin-bottom: 17px;

    box-shadow:
        0 12px 30px rgba(103, 97, 231, 0.12);
}

.empty-result h3 {
    font-size: 17px;
}

.empty-result p {
    max-width: 300px;

    margin-top: 8px;

    color: #8a94a9;

    font-size: 11px;
    line-height: 1.7;
}

.hidden {
    display: none !important;
}


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

.result-content {
    animation: resultAppear 0.45s ease;
}

@keyframes resultAppear {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-grid {
    display: grid;

    grid-template-columns: 1fr;

    gap: 12px;
}

.result-stat {
    padding: 18px;

    border-radius: 15px;

    border: 1px solid;
}

.marks-stat {
    background:
        linear-gradient(
            135deg,
            #efefff,
            #f8efff
        );

    border-color: #dedbff;
}

.performance-stat {
    background:
        linear-gradient(
            135deg,
            #eafff7,
            #effffb
        );

    border-color: #d1f3e4;
}

.risk-stat {
    background:
        linear-gradient(
            135deg,
            #fff5e8,
            #fffaf0
        );

    border-color: #f7dfbb;
}

.stat-title {
    color: #8a93a8;

    font-size: 9px;
    font-weight: 900;

    letter-spacing: 1.3px;
}

.marks-number {
    margin-top: 8px;
}

.marks-number span {
    color: #5b59e7;

    font-size: 38px;
    font-weight: 900;

    letter-spacing: -1px;
}

.stat-subtitle {
    color: #969eb0;
    font-size: 9px;
}

.status-value {
    margin-top: 12px;

    font-size: 23px;
    font-weight: 900;
}

.performance-stat .status-value {
    color: #0a9b70;
}

.risk-stat .status-value {
    color: #e28414;
}


/* =========================
   RECOMMENDATION
========================= */

.recommendation {
    display: flex;
    gap: 12px;

    margin-top: 15px;

    padding: 16px;

    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            #f5f3ff,
            #fbf5ff
        );

    border: 1px solid #e7defc;
}

.recommendation-icon {
    width: 34px;
    height: 34px;

    flex-shrink: 0;

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

    border-radius: 9px;

    background: #eae5ff;

    color: #665de8;
}

.recommendation-label {
    color: #8a91a6;

    font-size: 9px;
    font-weight: 900;

    letter-spacing: 1.2px;
}

#recommendation {
    margin-top: 7px;

    color: #4d5870;

    font-size: 11px;

    line-height: 1.65;
}

#recommendation div {
    margin-bottom: 4px;
}


/* =========================
   HISTORY
========================= */

.history-section {
    margin-top: 75px;
}

.history-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    margin-bottom: 22px;
}

.history-header p {
    margin-top: 7px;

    color: #8992a7;

    font-size: 11px;
}

.clear-button {
    padding: 9px 13px;

    border: 1px solid #e0e4ef;
    border-radius: 9px;

    background: white;

    color: #747e94;

    font-size: 10px;
    font-weight: 800;

    cursor: pointer;

    transition: 0.2s;
}

.clear-button:hover {
    color: #e34b70;
    border-color: #f2c6d1;
    background: #fff6f8;
}

.empty-history {
    min-height: 150px;

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

    flex-direction: column;

    gap: 6px;

    border: 1px dashed #d8ddea;

    border-radius: 18px;

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

.history-empty-icon {
    width: 43px;
    height: 43px;

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

    margin-bottom: 4px;

    border-radius: 12px;

    background: #f0efff;
    color: #6b64e9;
}

.empty-history strong {
    font-size: 12px;
}

.empty-history span {
    color: #99a1b3;
    font-size: 10px;
}


/* HISTORY CARD */

.history-card {
    display: grid;

    grid-template-columns: 1fr auto auto;

    align-items: center;

    gap: 25px;

    padding: 16px 20px;

    margin-bottom: 10px;

    background: white;

    border: 1px solid #e3e7f1;

    border-radius: 14px;

    box-shadow:
        0 8px 25px rgba(40, 48, 80, 0.05);
}

.history-card strong {
    display: block;
    font-size: 12px;
}

.history-card small {
    display: block;

    margin-top: 4px;

    color: #9ba3b4;

    font-size: 9px;
}

.history-score {
    color: #5d59e7;

    font-size: 20px;
    font-weight: 900;
}

.history-performance,
.history-risk {
    display: inline-block;

    padding: 5px 8px;

    border-radius: 7px;

    font-size: 8px;
    font-weight: 900;
}

.history-performance {
    background: #e9fff6;
    color: #07966d;
}

.history-risk {
    margin-left: 4px;

    background: #fff2df;
    color: #d47b10;
}


/* =========================
   HOW IT WORKS
========================= */

.how-section {
    margin-top: 75px;
    margin-bottom: 75px;
}

.how-section > h2 {
    margin-bottom: 22px;
}

.steps {
    display: grid;

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

    gap: 18px;
}

.step-card {
    position: relative;

    overflow: hidden;

    padding: 25px;

    background: white;

    border: 1px solid #e1e6f2;

    border-radius: 18px;

    box-shadow:
        0 10px 30px rgba(43, 53, 89, 0.05);
}

.step-card::after {
    content: "";

    position: absolute;

    width: 90px;
    height: 90px;

    right: -35px;
    bottom: -35px;

    border-radius: 50%;
}

.step-one::after {
    background: #e8e7ff;
}

.step-two::after {
    background: #e3fff4;
}

.step-three::after {
    background: #fff0da;
}

.step-number {
    color: #6b65e8;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 1px;
}

.step-icon {
    margin-top: 17px;

    font-size: 24px;
}

.step-card h3 {
    margin-top: 12px;

    font-size: 15px;
}

.step-card p {
    margin-top: 8px;

    color: #8791a6;

    font-size: 10px;

    line-height: 1.7;
}


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

footer {
    padding: 28px 6%;

    text-align: center;

    background: #171d35;

    color: #aab2c8;

    font-size: 11px;
}

footer strong {
    color: #ffffff;
}

footer span {
    color: #8f98b1;
}

footer p {
    margin-top: 7px;

    color: #747e99;

    font-size: 9px;
}


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

@media (max-width: 900px) {

    .prediction-section {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-wrap: wrap;
    }

    nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .steps {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 650px) {

    .topbar {
        padding: 12px 4%;
    }

    .model-online {
        display: none;
    }

    .hero {
        padding: 52px 5% 45px;
    }

    .hero h1 {
        font-size: 42px;
        letter-spacing: -2px;
    }

    .prediction-section,
    .history-section,
    .how-section {
        width: 92%;
    }

    .card {
        padding: 22px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .history-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .history-card {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .history-risk {
        margin-left: 3px;
    }

    nav a {
        padding: 8px;
        font-size: 10px;
    }
}