/* =========================================================
   RAILTRACK - FINAL PROFESSIONAL LIGHT UI
   VANDE BHARAT BACKGROUND
========================================================= */

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

:root {
    --primary: #1769e0;
    --primary-dark: #1055b7;
    --primary-light: #eaf2ff;

    --text: #172033;
    --muted: #71809a;

    --background: #f5f8fc;
    --surface: #ffffff;
    --surface-soft: #f8faff;

    --border: #e3e9f2;

    --green: #0ba968;
    --green-light: #e9f9f1;

    --orange: #f59e0b;
    --orange-light: #fff7e6;

    --red: #e5484d;
    --red-light: #fff0f1;

    --shadow:
        0 8px 30px rgba(28, 55, 90, 0.07);

    --radius: 18px;
}


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

html,
body {
    width: 100%;
    min-height: 100%;
}

html {
    scroll-behavior: smooth;
}

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

    color: var(--text);

    min-height: 100vh;

    position: relative;

    overflow-x: hidden;

    background:
        linear-gradient(
            135deg,
            #f7fbff 0%,
            #edf5ff 45%,
            #f8fbff 100%
        );
}


/* =========================================================
   VANDE BHARAT BACKGROUND
========================================================= */

body::before {
    content: "";

    position: fixed;

    top: 74px;
    right: 0;

    width: 70vw;
    height: 580px;

    background-image:
        linear-gradient(
            90deg,
            rgba(247, 251, 255, 1) 0%,
            rgba(247, 251, 255, 0.94) 10%,
            rgba(247, 251, 255, 0.72) 27%,
            rgba(247, 251, 255, 0.30) 55%,
            rgba(247, 251, 255, 0.04) 100%
        ),
        url("./vande-bharat-bg.png");

    background-repeat: no-repeat;

    background-position:
        center,
        center right;

    background-size:
        cover,
        cover;

    opacity: 0.36;

    pointer-events: none;

    z-index: 0;

    border-bottom-left-radius: 160px;

    -webkit-mask-image:
        linear-gradient(
            to bottom,
            transparent 0%,
            black 10%,
            black 82%,
            transparent 100%
        );

    mask-image:
        linear-gradient(
            to bottom,
            transparent 0%,
            black 10%,
            black 82%,
            transparent 100%
        );
}


/* =========================================================
   DECORATIVE RAILWAY CIRCLE
========================================================= */

body::after {
    content: "";

    position: fixed;

    width: 720px;
    height: 720px;

    right: -350px;
    bottom: -300px;

    border-radius: 50%;

    border:
        2px solid
        rgba(37, 99, 235, 0.055);

    box-shadow:
        0 0 0 45px rgba(37, 99, 235, 0.025),
        0 0 0 90px rgba(37, 99, 235, 0.020),
        0 0 0 135px rgba(37, 99, 235, 0.015),
        0 0 0 180px rgba(37, 99, 235, 0.010);

    pointer-events: none;

    z-index: 0;
}


/* =========================================================
   CONTENT ABOVE BACKGROUND
========================================================= */

.topbar,
.container,
footer,
.hero,
.dashboard,
.panel,
.card,
.section,
.empty-card {
    position: relative;
    z-index: 2;
}


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

.topbar {
    width: 100%;

    min-height: 74px;

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

    border-bottom:
        1px solid rgba(227, 233, 242, 0.95);

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    padding:
        0 5%;

    position:
        sticky;

    top: 0;

    z-index: 1000;

    -webkit-backdrop-filter:
        blur(18px);

    backdrop-filter:
        blur(18px);

    box-shadow:
        0 4px 20px
        rgba(15, 23, 42, 0.045);
}


/* =========================================================
   BRAND
========================================================= */

.brand {
    display:
        flex;

    align-items:
        center;

    gap:
        12px;
}

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

    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            #1769e0,
            #4b8df0
        );

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    font-size: 21px;

    box-shadow:
        0 6px 18px
        rgba(23, 105, 224, 0.22);
}

.brand strong {
    display: block;

    font-size: 18px;

    letter-spacing: -0.3px;
}

.brand span {
    display: block;

    color: var(--muted);

    font-size: 11px;

    margin-top: 2px;
}


/* =========================================================
   CONNECTION
========================================================= */

.connection {
    font-size: 12px;

    font-weight: 700;

    padding:
        8px 12px;

    border-radius: 30px;

    white-space: nowrap;
}

.connection.connected {
    color: var(--green);

    background: var(--green-light);
}

.connection.disconnected {
    color: var(--red);

    background: var(--red-light);
}


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

.container {
    width:
        min(
            1250px,
            92%
        );

    margin:
        0 auto 60px;
}


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

.hero {
    margin-top: 30px;

    border-radius: 26px;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            rgba(237, 245, 255, 0.95),
            rgba(255, 255, 255, 0.91)
        );

    border:
        1px solid #dce8fa;

    box-shadow:
        0 20px 55px
        rgba(28, 55, 90, 0.085);

    -webkit-backdrop-filter:
        blur(12px);

    backdrop-filter:
        blur(12px);
}

.hero-content {
    padding: 42px;
}

.eyebrow {
    color: var(--primary);

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 1.2px;

    margin-bottom: 9px;
}

.hero h1 {
    font-size:
        clamp(
            30px,
            5vw,
            48px
        );

    line-height: 1.05;

    letter-spacing: -1.5px;

    margin-bottom: 12px;
}

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

    max-width: 650px;

    line-height: 1.6;

    font-size: 15px;

    margin-bottom: 28px;
}


/* =========================================================
   TABS
========================================================= */

.tabs {
    display: flex;

    gap: 8px;

    margin-bottom: 18px;

    flex-wrap: wrap;
}

.tab {
    border:
        1px solid var(--border);

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

    color: var(--muted);

    padding:
        11px 17px;

    border-radius: 12px;

    cursor: pointer;

    font-weight: 700;

    transition:
        all 0.2s ease;
}

.tab:hover {
    border-color: #b9cff2;

    color: var(--primary);

    transform:
        translateY(-1px);
}

.tab.active {
    background: var(--primary);

    color: white;

    border-color: var(--primary);

    box-shadow:
        0 6px 17px
        rgba(23, 105, 224, 0.22);
}


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

.search-form {
    display: grid;

    grid-template-columns:
        minmax(180px, 1fr)
        minmax(180px, 1fr)
        auto;

    gap: 12px;

    align-items: end;
}

.between-form {
    grid-template-columns:
        repeat(
            3,
            minmax(150px, 1fr)
        )
        auto;
}


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

.field label {
    display: flex;

    align-items: center;

    gap: 7px;

    font-size: 10px;

    font-weight: 800;

    color: #65738a;

    letter-spacing: 0.7px;

    margin-bottom: 7px;
}

.field label span {
    font-size: 8px;

    background: #edf1f7;

    color: #7b8799;

    padding:
        3px 6px;

    border-radius: 5px;
}

.field input {
    width: 100%;

    height: 48px;

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

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

    color: var(--text);

    border-radius: 12px;

    padding:
        0 14px;

    outline: none;

    font-size: 14px;

    transition:
        border 0.2s,
        box-shadow 0.2s;
}

.field input::placeholder {
    color: #a3adbd;
}

.field input:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 4px
        rgba(23, 105, 224, 0.09);
}


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

.search-button {
    height: 48px;

    border: none;

    border-radius: 12px;

    padding:
        0 23px;

    background:
        linear-gradient(
            135deg,
            #1769e0,
            #2577e8
        );

    color: white;

    font-weight: 800;

    cursor: pointer;

    white-space: nowrap;

    box-shadow:
        0 7px 17px
        rgba(23, 105, 224, 0.22);

    transition:
        all 0.2s ease;
}

.search-button:hover {
    background: var(--primary-dark);

    transform:
        translateY(-2px);

    box-shadow:
        0 10px 22px
        rgba(23, 105, 224, 0.27);
}

.search-button:disabled {
    opacity: 0.65;

    cursor: wait;

    transform: none;
}


/* =========================================================
   GENERAL
========================================================= */

.hidden {
    display: none !important;
}

.error-box {
    margin-top: 20px;

    padding:
        14px 16px;

    background: var(--red-light);

    color: #c52e34;

    border:
        1px solid #ffd0d3;

    border-radius: 12px;

    font-size: 13px;

    font-weight: 600;
}


/* =========================================================
   EMPTY CARD
========================================================= */

.empty-card {
    margin-top: 25px;

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

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

    border-radius: var(--radius);

    padding:
        55px 20px;

    text-align: center;

    box-shadow: var(--shadow);

    -webkit-backdrop-filter:
        blur(10px);

    backdrop-filter:
        blur(10px);
}

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

    margin:
        0 auto 16px;

    border-radius: 18px;

    background: var(--primary-light);

    display:
        flex;

    align-items: center;

    justify-content: center;

    font-size: 30px;
}

.empty-card h2 {
    font-size: 21px;

    margin-bottom: 8px;
}

.empty-card p {
    color: var(--muted);

    font-size: 14px;
}

.feature-pills {
    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: 20px;
}

.feature-pills span {
    padding:
        7px 11px;

    background: #f5f8fc;

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

    border-radius: 30px;

    color: #637188;

    font-size: 11px;

    font-weight: 700;
}


/* =========================================================
   DASHBOARD
========================================================= */

.dashboard {
    margin-top: 26px;

    display: flex;

    flex-direction: column;

    gap: 18px;
}


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

.train-header {
    background:
        rgba(255,255,255,0.95);

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

    border-radius: var(--radius);

    padding: 24px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    box-shadow: var(--shadow);

    -webkit-backdrop-filter:
        blur(10px);

    backdrop-filter:
        blur(10px);
}

.train-header h2 {
    font-size:
        clamp(
            20px,
            3vw,
            28px
        );

    margin:
        8px 0 5px;
}

.train-header p {
    color: var(--muted);

    font-size: 13px;
}

.status-badge {
    display: inline-flex;

    padding:
        6px 10px;

    border-radius: 30px;

    background:
        var(--green-light);

    color:
        var(--green);

    font-size: 10px;

    font-weight: 900;

    letter-spacing: 0.5px;
}

.status-badge.error {
    background: var(--red-light);

    color: var(--red);
}

.train-number-box {
    min-width: 145px;

    text-align: right;
}

.train-number-box span {
    display: block;

    color: var(--muted);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 0.7px;
}

.train-number-box strong {
    display: block;

    color: var(--primary);

    font-size: 25px;

    margin-top: 4px;
}


/* =========================================================
   STATS GRID
========================================================= */

.stats-grid {
    display: grid;

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

    gap: 12px;
}

.stat-card {
    background:
        rgba(255,255,255,0.95);

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

    border-radius: 15px;

    padding: 16px;

    display: flex;

    align-items: center;

    gap: 11px;

    box-shadow:
        0 5px 20px
        rgba(28, 55, 90, 0.04);

    -webkit-backdrop-filter:
        blur(10px);

    backdrop-filter:
        blur(10px);

    transition:
        all 0.2s ease;
}

.stat-card:hover {
    transform:
        translateY(-3px);

    box-shadow:
        0 10px 28px
        rgba(28, 55, 90, 0.08);
}

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

    flex-shrink: 0;

    background: var(--primary-light);

    border-radius: 11px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    font-size: 18px;
}

.stat-card span {
    display: block;

    color: var(--muted);

    font-size: 8px;

    font-weight: 900;

    letter-spacing: 0.5px;

    margin-bottom: 4px;
}

.stat-card strong {
    display: inline-block;

    font-size: 17px;

    max-width: 120px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.stat-card small {
    color: var(--muted);

    font-size: 9px;

    margin-left: 2px;
}


/* =========================================================
   CONTENT GRID
========================================================= */

.content-grid {
    display: grid;

    grid-template-columns:
        1.6fr 1fr;

    gap: 18px;
}

.panel {
    background:
        rgba(255,255,255,0.96);

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

    border-radius: var(--radius);

    box-shadow: var(--shadow);

    overflow: hidden;

    -webkit-backdrop-filter:
        blur(10px);

    backdrop-filter:
        blur(10px);
}


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

.panel-header {
    padding:
        19px 20px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 15px;

    border-bottom:
        1px solid #edf1f6;

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

.panel-header h2 {
    font-size: 17px;
}

.panel-header p {
    color: var(--muted);

    font-size: 11px;

    margin-top: 4px;
}

.panel-header > span {
    color: var(--muted);

    font-size: 11px;

    font-weight: 700;
}


/* =========================================================
   MAP
========================================================= */

.map {
    width: 100%;

    height: 440px;

    background: #e9eef4;
}

.map-panel .leaflet-container {
    font-family: inherit;
}

.live-badge {
    background:
        var(--green-light);

    color:
        var(--green);

    border-radius: 30px;

    padding:
        6px 10px;

    font-size: 9px;

    font-weight: 900;

    box-shadow:
        0 0 0 4px
        rgba(16,185,129,0.06),
        0 4px 12px
        rgba(16,185,129,0.10);
}


/* =========================================================
   MAP INFORMATION
========================================================= */

.map-info {
    display: grid;

    grid-template-columns:
        1fr auto 1fr auto 1fr;

    align-items: center;

    gap: 10px;

    padding:
        15px 18px;

    background:
        rgba(251,252,254,0.96);

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

.map-info div:not(.arrow) {
    min-width: 0;
}

.map-info span {
    display: block;

    font-size: 8px;

    font-weight: 900;

    color: var(--muted);

    margin-bottom: 4px;
}

.map-info strong {
    display: block;

    font-size: 12px;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;
}

.arrow {
    color: #a3afc0;

    font-size: 18px;
}


/* =========================================================
   ETA
========================================================= */

.eta-box {
    padding: 22px;
}

.eta-box > span {
    display: block;

    color: var(--muted);

    font-size: 9px;

    font-weight: 900;

    letter-spacing: 0.7px;
}

.eta-box > strong {
    display: block;

    color: var(--text);

    font-size: 20px;

    margin-top: 5px;

    margin-bottom: 20px;
}

.eta-main {
    padding: 17px;

    background:
        linear-gradient(
            135deg,
            #eaf2ff,
            #f4f8ff
        );

    border:
        1px solid #dce9ff;

    border-radius: 14px;

    margin-bottom: 12px;
}

.eta-main span {
    display: block;

    color: var(--primary);

    font-size: 9px;

    font-weight: 900;

    letter-spacing: 0.6px;
}

.eta-main strong {
    display: block;

    color: var(--primary);

    font-size: 27px;

    margin-top: 5px;
}

.eta-row {
    display: flex;

    justify-content: space-between;

    gap: 15px;

    padding:
        11px 0;

    border-bottom:
        1px solid #edf1f5;

    font-size: 12px;
}

.eta-row:last-child {
    border-bottom: none;
}

.eta-row span {
    color: var(--muted);
}

.eta-row strong {
    text-align: right;
}


/* =========================================================
   PROGRESS BAR
========================================================= */

.progress-panel {
    padding:
        0 0 20px;
}

.progress-track {
    height: 9px;

    margin:
        0 20px;

    background:
        #e8edf4;

    border-radius: 20px;

    overflow: hidden;
}

.progress-bar {
    width: 0%;

    height: 100%;

    background:
        linear-gradient(
            90deg,
            #1769e0,
            #4b91f7
        );

    border-radius: inherit;

    transition:
        width 0.6s ease;
}


/* =========================================================
   STATION TIMING
========================================================= */

.timing-panel {
    overflow: hidden;
}

.timing-grid {
    display: grid;

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

    gap: 0;

    padding: 18px;
}

.timing-card {
    padding: 18px;

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

    background:
        rgba(251,252,254,0.95);

    margin:
        0 7px;

    border-radius: 15px;

    transition:
        all 0.2s ease;
}

.timing-card:hover {
    transform:
        translateY(-2px);

    box-shadow:
        0 8px 22px
        rgba(15,23,42,0.06);
}

.timing-card.current-timing {
    background:
        #f0f6ff;

    border-color:
        #cfe0fc;
}

.timing-icon {
    width: 36px;
    height: 36px;

    border-radius: 10px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    background:
        white;

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

    margin-bottom: 13px;
}

.timing-card > div:nth-child(2) span {
    display: block;

    color: var(--muted);

    font-size: 8px;

    font-weight: 900;

    letter-spacing: 0.6px;
}

.timing-card > div:nth-child(2) strong {
    display: block;

    font-size: 15px;

    margin-top: 4px;
}

.timing-card > div:nth-child(2) small {
    color: var(--muted);

    font-size: 10px;

    margin-top: 3px;

    display: block;
}

.timing-values {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 8px;

    margin-top: 17px;
}

.timing-values div {
    background: white;

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

    border-radius: 10px;

    padding: 9px;
}

.timing-values span {
    display: block;

    color: var(--muted);

    font-size: 8px;

    margin-bottom: 4px;
}

.timing-values strong {
    font-size: 11px;
}


/* =========================================================
   ROUTE LIST
========================================================= */

.route-list {
    padding:
        8px 20px 20px;
}

.route-item {
    min-height: 64px;

    display: grid;

    grid-template-columns:
        18px 1fr auto;

    gap: 12px;

    align-items: start;

    padding:
        12px 0;

    position: relative;
}

.route-item:not(:last-child)::after {
    content: "";

    position: absolute;

    left: 7px;

    top: 29px;

    bottom: -12px;

    width: 2px;

    background: #e1e7ef;
}

.route-dot {
    width: 15px;
    height: 15px;

    border-radius: 50%;

    border:
        3px solid #aeb9c9;

    background: white;

    z-index: 2;
}

.route-item.passed .route-dot {
    background: var(--green);

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

.route-item.current .route-dot {
    background: var(--primary);

    border-color: var(--primary);

    box-shadow:
        0 0 0 5px
        rgba(23,105,224,0.12);
}

.route-item.current .route-name {
    color: var(--primary);

    font-weight: 900;
}

.route-name {
    font-size: 13px;

    font-weight: 700;
}

.route-code {
    color: var(--muted);

    font-size: 10px;

    margin-top: 3px;
}

.route-time {
    color: #56657b;

    font-size: 11px;

    font-weight: 700;

    text-align: right;
}

.route-status {
    display: inline-block;

    margin-top: 5px;

    padding:
        4px 7px;

    border-radius: 5px;

    background: var(--primary-light);

    color: var(--primary);

    font-size: 8px;

    font-weight: 900;
}


/* =========================================================
   RAILWAY STATION TIMELINE
========================================================= */

.railway-station {
    display: flex;

    position: relative;

    width: 100%;

    padding:
        0 0 28px 0;

    box-sizing: border-box;
}

.timeline-column {
    width: 42px;

    min-width: 42px;

    position: relative;

    display: flex;

    justify-content: center;
}

.timeline-dot {
    width: 18px;
    height: 18px;

    border-radius: 50%;

    border:
        3px solid #ffffff;

    box-shadow:
        0 0 0 2px #94a3b8;

    background: #ffffff;

    z-index: 5;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 10px;
}

.timeline-dot.passed {
    background: #10b981;

    box-shadow:
        0 0 0 2px #10b981;
}

.timeline-dot.current {
    width: 28px;
    height: 28px;

    background: #1769e0;

    box-shadow:
        0 0 0 4px #dbeafe;

    color: white;

    font-size: 13px;
}

.timeline-dot.upcoming {
    background: white;

    box-shadow:
        0 0 0 2px #94a3b8;
}

.timeline-line {
    position: absolute;

    width: 3px;

    top: 20px;

    bottom: -10px;

    background: #cbd5e1;

    border-radius: 5px;
}

.timeline-line.completed-line {
    background: #10b981;
}


/* =========================================================
   STATION CONTENT
========================================================= */

.station-content {
    flex: 1;

    min-width: 0;

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

    border:
        1px solid #e2e8f0;

    border-radius: 14px;

    padding: 18px;

    margin-left: 8px;

    box-sizing: border-box;

    -webkit-backdrop-filter:
        blur(8px);

    backdrop-filter:
        blur(8px);

    transition:
        all 0.2s ease;
}

.station-content:hover {
    box-shadow:
        0 8px 25px
        rgba(15,23,42,0.055);

    transform:
        translateY(-1px);
}

.railway-station.current
.station-content {
    border-color: #93c5fd;

    background:
        linear-gradient(
            135deg,
            rgba(248,251,255,0.98),
            rgba(239,246,255,0.95)
        );

    box-shadow:
        0 7px 24px
        rgba(37,99,235,0.09);
}

.railway-station.passed
.station-content {
    border-color: #d1fae5;
}


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

.station-header {
    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 15px;

    margin-bottom: 15px;
}

.station-name {
    font-size: 17px;

    font-weight: 800;

    color: #0f172a;

    line-height: 1.3;
}

.station-code {
    margin-top: 4px;

    font-size: 12px;

    font-weight: 700;

    color: #64748b;

    letter-spacing: 0.5px;
}

.station-status {
    padding:
        5px 10px;

    border-radius: 20px;

    font-size: 10px;

    font-weight: 800;

    white-space: nowrap;
}

.station-status.passed {
    background: #dcfce7;

    color: #047857;
}

.station-status.current {
    background: #dbeafe;

    color: #1d4ed8;
}

.station-status.upcoming {
    background: #f1f5f9;

    color: #64748b;
}


/* =========================================================
   STATION TIMING GRID
========================================================= */

.station-timing-grid {
    display: grid;

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

    gap: 12px;

    margin-top: 12px;
}

.timing-box {
    background:
        rgba(248,250,252,0.96);

    border:
        1px solid #e2e8f0;

    border-radius: 10px;

    padding: 12px;
}

.expected-box {
    background:
        rgba(255,250,243,0.96);

    border-color:
        #fed7aa;
}

.actual-box {
    background:
        rgba(240,253,244,0.96);

    border-color:
        #bbf7d0;
}

.timing-title {
    font-size: 12px;

    font-weight: 800;

    color: #475569;

    margin-bottom: 10px;
}

.timing-row {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 10px;

    padding:
        5px 0;

    font-size: 12px;

    color: #64748b;
}

.timing-row strong {
    color: #0f172a;

    font-size: 13px;
}


/* =========================================================
   STATION EXTRA INFO
========================================================= */

.station-extra {
    display: grid;

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

    gap: 10px;

    margin-top: 12px;

    padding: 10px;

    background:
        rgba(248,250,252,0.97);

    border:
        1px solid #dbe5f0;

    border-radius: 12px;
}

.extra-item {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 8px;

    padding:
        10px 12px;

    border-radius: 8px;

    background: #ffffff;

    border:
        1px solid #e8edf3;

    font-size: 11px;

    color: #64748b;
}

.extra-item strong {
    color: #0f172a;

    font-size: 12px;
}

.delay-text {
    color: #dc2626 !important;
}

.on-time-text {
    color: #059669 !important;
}


/* =========================================================
   CURRENT TRAIN BANNER
========================================================= */

.current-train-banner {
    margin-top: 14px;

    padding:
        11px 14px;

    border-radius: 9px;

    background:
        linear-gradient(
            90deg,
            #dbeafe,
            #eff6ff
        );

    border:
        1px solid #93c5fd;

    color: #1d4ed8;

    font-size: 12px;

    font-weight: 800;

    text-align: center;
}


/* =========================================================
   STATION INFO BOX
========================================================= */

.station-info-box {
    width: 100%;

    display: grid;

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

    gap: 10px;

    padding: 10px;

    margin-top: 12px;

    background:
        rgba(248,250,252,0.97);

    border:
        1px solid #dbe5f0;

    border-radius: 12px;
}

.station-info-item {
    min-height: 40px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding:
        0 12px;

    background: #ffffff;

    border:
        1px solid #e8edf3;

    border-radius: 8px;
}

.station-info-item span {
    color: #64748b;

    font-size: 13px;
}

.station-info-item strong {
    color: #0f172a;

    font-size: 14px;

    font-weight: 700;
}

.station-info-item .delay-value {
    color: #ef4444;
}


/* =========================================================
   UPDATE BAR
========================================================= */

.update-bar {
    background:
        rgba(255,255,255,0.95);

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

    border-radius: 13px;

    padding:
        11px 14px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 5px;

    color: var(--muted);

    font-size: 11px;
}

.update-bar strong {
    color: var(--text);
}

.update-bar button {
    margin-left: 12px;

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

    background: white;

    color: var(--primary);

    border-radius: 8px;

    padding:
        7px 10px;

    font-size: 10px;

    font-weight: 800;

    cursor: pointer;
}

.update-bar button:hover {
    background:
        var(--primary-light);
}

.update-bar button:disabled {
    opacity: 0.6;

    cursor: wait;
}


/* =========================================================
   BETWEEN SEARCH RESULTS
========================================================= */

.section {
    margin-top: 25px;
}

.section-title {
    margin-bottom: 12px;
}

.section-title h2 {
    font-size: 21px;
}

.section-title p {
    color: var(--muted);

    font-size: 12px;

    margin-top: 4px;
}

.train-list {
    display: flex;

    flex-direction: column;

    gap: 10px;
}

.train-result {
    background:
        rgba(255,255,255,0.96);

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

    border-radius: 15px;

    padding:
        17px 19px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    box-shadow:
        0 5px 18px
        rgba(28,55,90,0.04);

    transition:
        all 0.2s ease;
}

.train-result:hover {
    border-color: #cbdcf5;

    transform:
        translateY(-2px);

    box-shadow:
        0 9px 25px
        rgba(28,55,90,0.08);
}

.train-result h3 {
    font-size: 16px;

    margin-bottom: 4px;
}

.train-result p {
    color: var(--muted);

    font-size: 11px;
}

.train-result p strong {
    color: var(--primary);
}

.result-meta {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: 10px;
}

.result-meta span {
    background: #f5f8fc;

    border:
        1px solid #e9edf3;

    color: #65738a;

    border-radius: 8px;

    padding:
        5px 7px;

    font-size: 9px;

    font-weight: 700;
}

.track-button {
    flex-shrink: 0;

    border: none;

    background:
        linear-gradient(
            135deg,
            #1769e0,
            #2577e8
        );

    color: white;

    padding:
        10px 15px;

    border-radius: 9px;

    font-size: 11px;

    font-weight: 800;

    cursor: pointer;
}

.track-button:hover {
    background: var(--primary-dark);

    transform:
        translateY(-1px);
}


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

footer {
    width: 92%;

    max-width: 1250px;

    margin:
        0 auto 30px;

    padding:
        20px 0;

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

    display: flex;

    justify-content: space-between;

    gap: 15px;

    color: var(--muted);

    font-size: 10px;

    position: relative;

    z-index: 2;
}


/* =========================================================
   LEAFLET MAP
========================================================= */

.leaflet-popup-content-wrapper {
    border-radius: 12px;

    box-shadow:
        0 10px 30px
        rgba(15,23,42,0.14);
}

.leaflet-popup-content {
    margin: 13px;

    font-size: 12px;

    line-height: 1.7;
}


/* =========================================================
   TRAIN MARKER
========================================================= */

.railtrack-train-marker {
    background: transparent !important;

    border: none !important;
}


/* =========================================================
   ROUTE LINE - BLUE
========================================================= */

.leaflet-overlay-pane path {
    vector-effect: non-scaling-stroke;
}


/* =========================================================
   SCROLLBAR
========================================================= */

@supports (scrollbar-width: thin) {
    * {
        scrollbar-width: thin;
    }
}

@supports (scrollbar-color: auto) {
    * {
        scrollbar-color:
            #bfdbfe
            transparent;
    }
}

::-webkit-scrollbar {
    width: 7px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background:
        #bfdbfe;

    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background:
        #93c5fd;
}


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

@media (max-width: 1050px) {

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

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

    body::before {
        width: 75vw;

        opacity: 0.25;
    }
}


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

@media (max-width: 760px) {

    body::before {
        top: 70px;

        width: 100vw;

        height: 400px;

        opacity: 0.18;

        background-position:
            center,
            70% center;
    }

    body::after {
        width: 400px;
        height: 400px;

        right: -250px;
        bottom: -160px;
    }

    .topbar {
        padding:
            12px 4%;

        min-height: 0;

        align-items:
            flex-start;
    }

    .connection {
        font-size: 9px;

        padding:
            6px 8px;
    }

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

        font-size: 18px;
    }

    .brand strong {
        font-size: 15px;
    }

    .brand span {
        font-size: 9px;
    }

    .hero {
        margin-top: 18px;

        border-radius: 19px;
    }

    .hero-content {
        padding:
            25px 18px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero-text {
        font-size: 13px;
    }

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

    .search-button {
        width: 100%;
    }

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

    .stat-card {
        padding: 12px;

        align-items:
            flex-start;
    }

    .stat-icon {
        width: 32px;
        height: 32px;

        font-size: 15px;
    }

    .stat-card strong {
        font-size: 14px;
    }

    .train-header {
        align-items:
            flex-start;

        flex-direction:
            column;
    }

    .train-number-box {
        text-align:
            left;
    }

    .map {
        height: 340px;
    }

    .map-info {
        grid-template-columns: 1fr;

        text-align: center;
    }

    .map-info .arrow {
        display: none;
    }

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

        gap: 10px;

        padding: 12px;
    }

    .timing-card {
        margin: 0;
    }

    .train-result {
        align-items:
            stretch;

        flex-direction:
            column;
    }

    .track-button {
        width: 100%;
    }

    .update-bar {
        flex-wrap: wrap;
    }

    footer {
        flex-direction:
            column;

        text-align:
            center;
    }

    .station-timing-grid {
        grid-template-columns:
            1fr;
    }

    .station-extra,
    .station-info-box {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .station-header {
        gap: 10px;
    }
}


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

@media (max-width: 420px) {

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

    .tabs {
        flex-direction:
            column;
    }

    .tab {
        width: 100%;
    }

    .hero h1 {
        font-size: 28px;
    }

    .map {
        height: 300px;
    }

    .route-item {
        grid-template-columns:
            18px 1fr;
    }

    .route-time {
        grid-column: 2;

        text-align: left;

        margin-top: -5px;
    }

    .railway-station {
        padding-bottom: 18px;
    }

    .timeline-column {
        width: 30px;

        min-width: 30px;
    }

    .station-content {
        padding: 12px;

        margin-left: 5px;
    }

    .station-header {
        flex-direction:
            column;

        gap: 8px;
    }

    .station-extra,
    .station-info-box {
        grid-template-columns: 1fr;
    }

    .timing-box {
        padding: 10px;
    }

    .eta-main strong {
        font-size: 23px;
    }
}