:root {
    --bg-color: #0b111e;
    --card-bg: #111a2e;
    --card-border: #1e2d4a;
    --text-main: #ffffff;
    --text-muted: #8c9ba5;
    --text-dim: #5c6e82;
    --blue-primary: #1e88e5;
    --blue-accent: #3892f6;
    --blue-light-bg: #162a45;
    --blue-tag: #1d4ed8;
    --green-primary: #22c55e;
    --green-accent: #4ade80;
    --green-light-bg: #142e2b;
    --green-tag: #16a34a;
    --yellow-time: #f59e0b;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    margin-bottom: 12px;
    border: 1px solid var(--primary-surface-border);
    border-radius: 999px;
    background-color: var(--primary-surface-bg);
}

.lang-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--secondary-surface-text);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.2;
}

.lang-switch a:hover {
    color: var(--primary-surface-text);
}

.lang-switch a.active {
    border-color: var(--secondary-surface-border);
    background-color: var(--secondary-surface-bg);
    color: var(--primary-surface-text);
}

.route-top{
    /* background-color: color-mix(in srgb, var(--background) 97%, var(--mix-color)); */
    background-color: var(--primary-surface-bg);
    border:1px solid var(--primary-surface-border);
    color: var(--primary-surface-text);
    border-radius: 10px;
    padding: 10px;
}
.route-middle{
    background-color: color-mix(in srgb, var(--background) 97%, var(--mix-color));
    border:1px solid var(--primary-surface-border);
    margin-top:10px;
    border-radius: 10px;
}

.train-no {
    
    padding: 3px 10px;
    font-weight: 800;
    font-size: 1rem;
    line-height: 1;
    border-radius: 5px;
    letter-spacing: 0.0247rem;
}

.outgoing .train-no{
    /* background-color: var(--orange); */
    background-color: color-mix(in srgb, var(--blue-accent) 70%, transparent);
}
.incoming .train-no{
    /* background-color: var(--blue); */
    /* background-color: color-mix(in srgb, var(--blue), #000 25%); */
    background-color: color-mix(in srgb, var(--green-accent) 50%, transparent);

}

.depurture {
    font-size: 1.2rem;
    font-weight: 800;
}

 .outgoing .depurture {
    color: color-mix(in srgb, var(--blue-accent) 70%, transparent);
}
 .incoming .depurture {
    color: color-mix(in srgb, var(--green-accent) 70%, transparent);
}

.stops {
    color: var(--secondary-surface-text);
    background-color: var(--secondary-surface-bg);
    border: 1px solid var(--secondary-surface-border);
    padding: 1px 12px;
    border-radius: 19px;
    font-size: 0.7rem;
}

.offday{
    color: color-mix(in srgb, var(--color) 70%, transparent);
    font-size: 0.8rem;
}

/* Timeline Section */
.timeline-container {
    padding: 16px 20px;
    position: relative;
    flex-grow: 1;
}

.timeline-list {
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Vertical Connection Lines */
.timeline-list::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 18px;
    bottom: 18px;
    width: 1px;
    z-index: 1;
}

.outgoing .timeline-list::before {
    background: repeating-linear-gradient(to bottom, blue 0, blue 4px, transparent 4px, transparent 8px);

}

.incoming .timeline-list::before {
    background: repeating-linear-gradient(to bottom, var(--green-accent) 0, var(--green-accent) 4px, transparent 4px, transparent 8px);
}

.station-row {
    display: flex;
    gap: 10px;
    /* align-items: center; */
    align-items: baseline;
    justify-content: space-between;
    padding: 8px 0;
    position: relative;
    z-index: 2;
}

.station-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.node {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: 1px solid;
    margin-left: 12px;
}

.outgoing .node {
    border-color: var(--blue-accent);
}

.incoming .node {
    border-color: var(--green-accent);
}

.outgoing .node.filled {
    background-color: var(--blue-accent);
    box-shadow: 0 0 8px rgba(56, 146, 246, 0.6);
}

.incoming .node.filled {
    background-color: var(--green-accent);
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}

.station-row{
    cursor: pointer;
}
.station-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.station-name a {
    font-size: 0.9rem;
    color: color-mix(in srgb, var(--color) 100%, transparent);
}

/* .middle-line {
    background: color-mix(in srgb, var(--color) 5%, transparent);;
    height: 1px;
    flex: 1;
    margin-left: 5px;
    margin-right: 5px;
} */


.middle-line {
    flex: 1;
    height: 1px;
    margin: 0 12px;
    background: color-mix(in srgb, var(--color) 5%, transparent);
    position: relative;
    overflow: hidden;
}

/* Rain droplet/streak */
.middle-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -30%;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--blue, #1e88e5), transparent);
    opacity: 0;
}

/* Animates ONLY the middle line inside the specific hovered row */
.timeline-row:hover .middle-line::after {
    opacity: 1;
    animation: single-drop 0.8s ease-in-out infinite;
}

@keyframes single-drop {
    0% {
        left: -30%;
    }
    100% {
        left: 100%;
    }
}





.station-time {
    font-size: 0.85rem;
    font-weight: 500;
}

.outgoing .station-time {
    color: color-mix(in srgb, var(--color) 70%, transparent);
}

.incoming .station-time {
    color: color-mix(in srgb, var(--color) 70%, transparent);
}