/* =========================================================
   PHISHING MESSAGE CLASSIFIER
   Professional AI Security Interface
   ========================================================= */

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

:root {
    --background: #07111f;
    --background-soft: #0b1728;
    --surface: rgba(15, 28, 47, 0.88);
    --surface-solid: #0f1c2f;
    --surface-light: #13243b;

    --border: rgba(148, 163, 184, 0.16);
    --border-light: rgba(148, 163, 184, 0.25);

    --text: #f8fafc;
    --text-soft: #a9b7ca;
    --text-muted: #718198;

    --primary: #38bdf8;
    --primary-dark: #0284c7;
    --primary-soft: rgba(56, 189, 248, 0.1);

    --success: #22c55e;
    --success-soft: rgba(34, 197, 94, 0.1);
    --success-border: rgba(34, 197, 94, 0.3);

    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.1);
    --danger-border: rgba(239, 68, 68, 0.3);

    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.1);

    --shadow: 0 25px 70px rgba(0, 0, 0, 0.25);

    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
}


/* =========================================================
   BODY
   ========================================================= */

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

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

    background:
        radial-gradient(
            circle at 15% 0%,
            rgba(14, 165, 233, 0.12),
            transparent 32%
        ),
        radial-gradient(
            circle at 90% 20%,
            rgba(59, 130, 246, 0.08),
            transparent 30%
        ),
        var(--background);

    color: var(--text);

    padding: 0 20px 60px;

    line-height: 1.5;
}


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

.background-grid {
    position: fixed;
    inset: 0;

    pointer-events: none;

    opacity: 0.16;

    background-image:
        linear-gradient(
            rgba(148, 163, 184, 0.05) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(148, 163, 184, 0.05) 1px,
            transparent 1px
        );

    background-size: 50px 50px;

    mask-image: linear-gradient(
        to bottom,
        black,
        transparent 80%
    );

    z-index: -1;
}


/* =========================================================
   CONTAINER
   ========================================================= */

.container {
    width: min(1050px, 100%);
    margin: 0 auto;
}


/* =========================================================
   TOPBAR
   ========================================================= */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 28px 0;

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


.brand {
    display: flex;
    align-items: center;

    gap: 12px;

    color: inherit;
    text-decoration: none;
}


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

    display: grid;
    place-items: center;

    border: 1px solid rgba(56, 189, 248, 0.25);

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            rgba(56, 189, 248, 0.18),
            rgba(59, 130, 246, 0.05)
        );

    font-size: 1.2rem;

    box-shadow:
        0 0 30px rgba(56, 189, 248, 0.08);
}


.brand-text {
    display: flex;
    flex-direction: column;
}


.brand-name {
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}


.brand-subtitle {
    margin-top: 2px;

    color: var(--text-muted);

    font-size: 0.64rem;
    font-weight: 700;

    letter-spacing: 0.14em;
}


.system-status {
    display: flex;
    align-items: center;

    gap: 8px;

    padding: 8px 12px;

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

    border-radius: 999px;

    background: rgba(15, 28, 47, 0.65);

    color: var(--text-soft);

    font-size: 0.76rem;
    font-weight: 700;
}


.status-indicator,
.model-status-dot {
    width: 7px;
    height: 7px;

    display: inline-block;

    border-radius: 50%;

    background: var(--success);

    box-shadow:
        0 0 0 4px rgba(34, 197, 94, 0.1),
        0 0 14px rgba(34, 197, 94, 0.5);
}


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

.hero {
    max-width: 800px;

    margin: 0 auto;

    padding: 80px 0 65px;

    text-align: center;
}


.hero-badge {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    padding: 7px 13px;

    border: 1px solid rgba(56, 189, 248, 0.18);

    border-radius: 999px;

    background: var(--primary-soft);

    color: #8bdcff;

    font-size: 0.68rem;
    font-weight: 800;

    letter-spacing: 0.13em;
}


.badge-dot {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: var(--primary);
}


.hero h1 {
    margin-top: 22px;

    font-size: clamp(2.7rem, 7vw, 5rem);

    line-height: 0.98;

    letter-spacing: -0.06em;

    font-weight: 900;
}


.hero h1 span {
    display: block;

    color: var(--primary);

    text-shadow:
        0 0 40px rgba(56, 189, 248, 0.14);
}


.hero-description {
    max-width: 670px;

    margin: 24px auto 0;

    color: var(--text-soft);

    font-size: 1rem;

    line-height: 1.75;
}


.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;

    gap: 25px;

    margin-top: 32px;
}


.hero-stat {
    display: flex;
    flex-direction: column;

    gap: 2px;
}


.hero-stat strong {
    font-size: 0.82rem;
    color: var(--text);
}


.hero-stat span {
    color: var(--text-muted);

    font-size: 0.7rem;
}


.hero-divider {
    width: 1px;
    height: 28px;

    background: var(--border);
}


/* =========================================================
   ANALYZER CARD
   ========================================================= */

.analyzer-card {
    position: relative;

    padding: 30px;

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

    border-radius: var(--radius-xl);

    background:
        linear-gradient(
            145deg,
            rgba(19, 36, 59, 0.92),
            rgba(10, 22, 38, 0.92)
        );

    box-shadow: var(--shadow);

    overflow: hidden;
}


.analyzer-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 10%;

    width: 80%;
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(56, 189, 248, 0.5),
            transparent
        );
}


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

    gap: 25px;

    margin-bottom: 28px;
}


.section-label {
    margin-bottom: 8px;

    color: var(--primary);

    font-size: 0.66rem;
    font-weight: 800;

    letter-spacing: 0.16em;
}


.card-top h2 {
    font-size: 1.45rem;

    letter-spacing: -0.03em;
}


.card-top p {
    margin-top: 6px;

    color: var(--text-soft);

    font-size: 0.85rem;
}


.model-status {
    display: flex;
    align-items: center;

    gap: 8px;

    padding: 8px 11px;

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

    border-radius: 999px;

    background: var(--success-soft);

    color: #86efac;

    font-size: 0.68rem;
    font-weight: 800;

    white-space: nowrap;
}


/* =========================================================
   INPUT
   ========================================================= */

.input-header {
    display: flex;
    justify-content: space-between;

    margin-bottom: 9px;
}


.input-header label {
    color: var(--text);

    font-size: 0.8rem;
    font-weight: 800;
}


#character-count {
    color: var(--text-muted);

    font-size: 0.72rem;
}


.textarea-wrapper {
    position: relative;
}


textarea {
    width: 100%;
    min-height: 220px;

    display: block;

    resize: vertical;

    padding: 20px;

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

    border-radius: var(--radius-md);

    outline: none;

    background: rgba(5, 15, 27, 0.72);

    color: var(--text);

    font: inherit;
    font-size: 0.93rem;

    line-height: 1.7;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


textarea::placeholder {
    color: #52637a;
}


textarea:focus {
    border-color: rgba(56, 189, 248, 0.5);

    background: rgba(5, 15, 27, 0.9);

    box-shadow:
        0 0 0 4px rgba(56, 189, 248, 0.07);
}


.textarea-corner {
    position: absolute;

    right: 13px;
    bottom: 12px;

    padding: 4px 7px;

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

    border-radius: 5px;

    background: rgba(7, 17, 31, 0.8);

    color: var(--text-muted);

    font-size: 0.55rem;
    font-weight: 800;

    letter-spacing: 0.08em;
}


/* =========================================================
   EXAMPLES
   ========================================================= */

.examples {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    margin-top: 13px;
}


.examples-label {
    margin-right: 3px;

    color: var(--text-muted);

    font-size: 0.7rem;
}


.example-button {
    padding: 6px 10px;

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

    border-radius: 7px;

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

    color: var(--text-soft);

    font: inherit;
    font-size: 0.67rem;
    font-weight: 700;

    cursor: pointer;

    transition: 0.2s ease;
}


.example-button:hover {
    border-color: rgba(56, 189, 248, 0.3);

    background: var(--primary-soft);

    color: var(--primary);

    transform: translateY(-1px);
}


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

.analyzer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-top: 18px;
}


.input-security-note {
    display: flex;
    align-items: center;

    gap: 7px;

    color: var(--text-muted);

    font-size: 0.7rem;
}


.analyze-button {
    min-width: 190px;

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

    padding: 13px 20px;

    border: none;

    border-radius: 10px;

    background: var(--primary);

    color: #04101c;

    font: inherit;

    font-size: 0.78rem;
    font-weight: 900;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}


.analyze-button:hover {
    background: #7dd3fc;

    transform: translateY(-2px);

    box-shadow:
        0 10px 30px rgba(56, 189, 248, 0.18);
}


.analyze-button:active {
    transform: translateY(0);
}


.analyze-button:disabled {
    cursor: not-allowed;

    opacity: 0.65;

    transform: none;
}


.button-content {
    display: flex;
    align-items: center;
    gap: 10px;
}


.button-arrow {
    font-size: 1rem;
}


/* =========================================================
   LOADING
   ========================================================= */

.loading-content {
    display: flex;
    align-items: center;

    gap: 9px;
}


.spinner {
    width: 15px;
    height: 15px;

    border: 2px solid rgba(4, 16, 28, 0.3);

    border-top-color: #04101c;

    border-radius: 50%;

    animation: spin 0.7s linear infinite;
}


@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


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

.error-message {
    margin-top: 15px;

    padding: 12px 14px;

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

    border-radius: 10px;

    background: var(--danger-soft);

    color: #fca5a5;

    font-size: 0.78rem;

    line-height: 1.5;
}


.hidden {
    display: none !important;
}


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

.result-card {
    margin-top: 22px;

    padding: 28px;

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

    border-radius: var(--radius-xl);

    background:
        linear-gradient(
            145deg,
            rgba(22, 101, 52, 0.12),
            rgba(15, 28, 47, 0.94)
        );

    box-shadow: var(--shadow);

    transition: 0.3s ease;
}


.result-card.spam {
    border-color: var(--danger-border);

    background:
        linear-gradient(
            145deg,
            rgba(127, 29, 29, 0.15),
            rgba(15, 28, 47, 0.94)
        );
}


.result-card.legitimate {
    border-color: var(--success-border);
}


.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 22px;
}


.result-status {
    padding: 6px 9px;

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

    border-radius: 999px;

    background: var(--success-soft);

    color: #86efac;

    font-size: 0.62rem;
    font-weight: 800;

    letter-spacing: 0.08em;
}


.result-card.spam .result-status {
    border-color: var(--danger-border);

    background: var(--danger-soft);

    color: #fca5a5;
}


.result-main {
    display: flex;
    align-items: center;

    gap: 20px;
}


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

    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 20px;

    background: var(--success-soft);

    color: var(--success);

    font-size: 1.8rem;

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


.result-card.spam .result-icon {
    background: var(--danger-soft);

    color: var(--danger);

    border-color: var(--danger-border);
}


.result-caption {
    color: var(--text-muted);

    font-size: 0.68rem;
    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.1em;
}


#prediction {
    margin-top: 2px;

    font-size: clamp(1.8rem, 5vw, 2.8rem);

    line-height: 1;

    letter-spacing: -0.05em;

    color: var(--success);
}


.result-card.spam #prediction {
    color: var(--danger);
}


.interpretation {
    max-width: 650px;

    margin-top: 9px;

    color: var(--text-soft);

    font-size: 0.83rem;

    line-height: 1.6;
}


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

.result-metrics {
    display: grid;

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

    gap: 12px;

    margin-top: 28px;
}


.metric {
    padding: 16px;

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

    border-radius: 12px;

    background: rgba(7, 17, 31, 0.42);
}


.metric-label {
    display: block;

    margin-bottom: 5px;

    color: var(--text-muted);

    font-size: 0.68rem;
}


.metric-value {
    color: var(--text);

    font-size: 1.15rem;

    letter-spacing: -0.02em;
}


.result-card.legitimate #threat-level {
    color: var(--success);
}


.result-card.spam #threat-level {
    color: var(--danger);
}


/* =========================================================
   PROBABILITY
   ========================================================= */

.probability-section {
    margin-top: 18px;
}


.probability-header {
    display: flex;
    justify-content: space-between;

    margin-bottom: 8px;

    color: var(--text-soft);

    font-size: 0.68rem;
    font-weight: 700;
}


#probability-label {
    color: var(--text);
}


.probability-bar {
    width: 100%;
    height: 10px;

    overflow: hidden;

    border-radius: 999px;

    background: rgba(148, 163, 184, 0.12);
}


.probability-fill {
    width: 0%;
    height: 100%;

    border-radius: inherit;

    background: var(--success);

    transition: width 0.8s ease;
}


.result-card.spam .probability-fill {
    background: var(--danger);
}


.probability-scale {
    display: flex;
    justify-content: space-between;

    margin-top: 7px;

    color: var(--text-muted);

    font-size: 0.58rem;
}


/* =========================================================
   PIPELINE
   ========================================================= */

.pipeline-section {
    padding-top: 80px;
}


.section-heading {
    text-align: center;

    max-width: 620px;

    margin: 0 auto 32px;
}


.section-heading h2 {
    font-size: 1.7rem;

    letter-spacing: -0.04em;
}


.section-heading p {
    margin-top: 8px;

    color: var(--text-soft);

    font-size: 0.82rem;

    line-height: 1.6;
}


.pipeline {
    display: grid;

    grid-template-columns:
        1fr
        35px
        1fr
        35px
        1fr
        35px
        1fr;

    align-items: center;
}


.pipeline-step {
    min-height: 200px;

    padding: 20px;

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

    border-radius: var(--radius-lg);

    background: rgba(15, 28, 47, 0.7);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease;
}


.pipeline-step:hover {
    transform: translateY(-4px);

    border-color: rgba(56, 189, 248, 0.25);
}


.pipeline-number {
    color: var(--text-muted);

    font-size: 0.62rem;
    font-weight: 800;

    letter-spacing: 0.1em;
}


.pipeline-icon {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    margin: 15px 0;

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

    border-radius: 11px;

    background: var(--primary-soft);

    font-size: 1rem;
}


.pipeline-step h3 {
    font-size: 0.9rem;
}


.pipeline-step p {
    margin-top: 5px;

    color: var(--text-soft);

    font-size: 0.72rem;

    line-height: 1.6;
}


.pipeline-line {
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(56, 189, 248, 0.35),
            transparent
        );
}


/* =========================================================
   TECHNOLOGY
   ========================================================= */

.technology-section {
    padding-top: 80px;
}


.section-heading.compact {
    margin-bottom: 22px;
}


.technology-grid {
    display: grid;

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

    gap: 12px;
}


.technology-card {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 16px;

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

    border-radius: 13px;

    background: rgba(15, 28, 47, 0.7);
}


.technology-icon {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 9px;

    background: var(--primary-soft);

    color: var(--primary);

    font-size: 0.68rem;
    font-weight: 900;
}


.technology-card strong {
    display: block;

    font-size: 0.76rem;
}


.technology-card span {
    display: block;

    margin-top: 2px;

    color: var(--text-muted);

    font-size: 0.61rem;
}


/* =========================================================
   SECURITY NOTE
   ========================================================= */

.security-note {
    display: flex;
    align-items: flex-start;

    gap: 14px;

    margin-top: 28px;

    padding: 18px;

    border: 1px solid rgba(56, 189, 248, 0.13);

    border-radius: 14px;

    background: rgba(56, 189, 248, 0.045);
}


.security-note-icon {
    width: 35px;
    height: 35px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 9px;

    background: var(--primary-soft);
}


.security-note strong {
    font-size: 0.75rem;
}


.security-note p {
    margin-top: 4px;

    color: var(--text-muted);

    font-size: 0.68rem;

    line-height: 1.6;
}


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

footer {
    padding-top: 70px;

    text-align: center;

    color: var(--text-muted);

    font-size: 0.7rem;

    line-height: 1.7;
}


.footer-brand {
    color: var(--text-soft);

    font-size: 0.82rem;
    font-weight: 800;
}


.footer-credit {
    margin-top: 4px;
}


.footer-credit strong {
    color: var(--primary);
}


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

@media (max-width: 850px) {

    .pipeline {
        grid-template-columns: 1fr 1fr;

        gap: 12px;
    }

    .pipeline-line {
        display: none;
    }

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


@media (max-width: 650px) {

    body {
        padding-left: 14px;
        padding-right: 14px;
    }

    .topbar {
        padding: 20px 0;
    }

    .system-status {
        padding: 7px 9px;
    }

    .hero {
        padding: 60px 0 45px;
    }

    .hero h1 {
        font-size: clamp(2.5rem, 13vw, 3.7rem);
    }

    .hero-description {
        font-size: 0.88rem;
    }

    .hero-stats {
        gap: 15px;
    }

    .analyzer-card,
    .result-card {
        padding: 20px;

        border-radius: 18px;
    }

    .card-top {
        flex-direction: column;
    }

    .model-status {
        align-self: flex-start;
    }

    .analyzer-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .analyze-button {
        width: 100%;
    }

    .result-main {
        align-items: flex-start;
    }

    .result-icon {
        width: 58px;
        height: 58px;
    }

    .result-metrics {
        grid-template-columns: 1fr;
    }

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

    .pipeline-step {
        min-height: auto;
    }

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


@media (max-width: 430px) {

    .brand-subtitle {
        display: none;
    }

    .system-status {
        font-size: 0.65rem;
    }

    .hero-stats {
        gap: 10px;
    }

    .hero-divider {
        height: 22px;
    }

    .examples {
        align-items: flex-start;
        flex-direction: column;
    }

    .examples-label {
        margin-bottom: 2px;
    }

    .example-button {
        width: 100%;

        text-align: left;
    }

    textarea {
        min-height: 190px;
    }

    .security-note {
        padding: 14px;
    }
}