﻿:root {
    --accent: #4f46e5;
    --accent-soft: #eef2ff;
    --yellow-accent: #facc15;
    --text-main: #1e293b;
    --text-soft: #64748b;
    --border-soft: #e2e8f0;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
}


/* ---------- base ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
    background: radial-gradient(circle at 20% 10%, #eef2ff 0%, transparent 40%), radial-gradient(circle at 80% 90%, #fef3c7 0%, transparent 40%), linear-gradient(135deg,#f8fafc,#eef2f7);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
}


/* ---------- layout ---------- */

.page {
    width: 100%;
    max-width: 720px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}


/* ---------- header ---------- */

.hero {
    display: flex;
    justify-content: center;
}

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

.ns-logo {
    background: #ffc917;
    color: #002776;
    font-weight: 900;
    font-size: 26px;
    padding: 10px 14px;
    border-radius: 6px;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.brand-text h1 {
    margin: 0;
    font-size: 26px;
    letter-spacing: -0.3px;
}

.brand-text p {
    margin: 2px 0 0 0;
    opacity: 0.65;
    font-size: 14px;
}


/* ---------- card ---------- */

.card {
    background: var(--surface);
    padding: 36px;
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    box-shadow: 0 10px 25px rgba(0,0,0,.05), 0 2px 6px rgba(0,0,0,.04);
    display: flex;
    flex-direction: column;
    gap: 24px;
}


/* ---------- search ---------- */

.search-form {
    width: 100%;
}

.input-wrapper {
    display: flex;
    gap: 10px;
}


/* ---------- input ---------- */

input {
    flex: 1;
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    background: var(--surface-soft);
    outline: none;
    transition: all .2s ease;
}

    input:focus {
        background: white;
        border-color: var(--accent);
        box-shadow: 0 0 0 3px var(--accent-soft);
    }


/* ---------- button ---------- */

button {
    background: linear-gradient( 135deg, #6366f1, #4f46e5 );
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 22px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all .18s ease;
    box-shadow: 0 6px 16px rgba(79,70,229,.25);
}

    button:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 22px rgba(79,70,229,.35);
    }

    button:active {
        transform: translateY(0);
    }


/* ---------- results container ---------- */

#results {
    min-height: 60px;
    transition: opacity .15s ease;
}

.htmx-swapping {
    opacity: 0;
}


/* ---------- empty state ---------- */

.empty {
    opacity: .6;
    font-style: italic;
}


/* ---------- result messages ---------- */

.found {
    color: var(--text-soft);
    font-size: 14px;
    margin-bottom: 10px;
}

.no-result {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #be123c;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
}


/* ---------- station cards ---------- */

.station-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.station {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border: 1px solid var(--border-soft);
    padding: 14px 16px;
    border-radius: 10px;
    font-weight: 600;
    transition: all .15s ease;
    animation: resultIn .25s ease;
}

    .station::before {
        content: "🚉";
        font-size: 18px;
    }

    .station:hover {
        transform: translateY(-1px);
        border-color: var(--accent);
        box-shadow: 0 6px 16px rgba(0,0,0,.06);
    }


/* ---------- animations ---------- */

@keyframes resultIn {

    from {
        opacity: 0;
        transform: translateY(6px);
    }

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


/* ---------- loading spinner ---------- */

.loading {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    opacity: .8;
}

.spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid #d3d9e3;
    border-top-color: var(--accent);
    animation: spin 1s linear infinite;
}

@keyframes spin {

    to {
        transform: rotate(360deg);
    }
}


/* ---------- footer ---------- */

.footer {
    text-align: center;
    font-size: 13px;
    opacity: .55;
}

.rainbow-bg {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 260px;
    z-index: -1;
    pointer-events: none;
}