:root {
    --oebb-red: #e2001a;
    --bg-color: #0f1115;
    --card-bg: #1a1d23;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-blue: #38bdf8;
    --success-green: #22c55e;
    --delay-red: #ef4444;
    --font-main: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

header {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.oebb-dot {
    width: 12px;
    height: 12px;
    background-color: var(--oebb-red);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--oebb-red);
}

h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.route-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.station {
    display: flex;
    flex-direction: column;
}

.station .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.station .name {
    font-size: 1.1rem;
    font-weight: 600;
}

.arrow {
    color: var(--oebb-red);
    font-size: 1.5rem;
    font-weight: 700;
}

.error-container {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--delay-red);
    padding: 1.5rem;
    border-radius: 1rem;
    color: var(--text-primary);
    text-align: center;
}

.error-detail {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0.5rem 0;
    font-family: monospace;
}

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.trip-card {
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.trip-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.1);
}

.time-info {
    display: flex;
    flex-direction: column;
}

.time {
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.delay {
    font-size: 0.8rem;
    font-weight: 600;
}

.delay.on-time { color: var(--success-green); }
.delay.late { color: var(--delay-red); }

.line-info {
    display: flex;
    flex-direction: column;
}

.line-badge {
    background: #334155;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 0.4rem;
    font-weight: 700;
    font-size: 0.8rem;
    width: fit-content;
    margin-bottom: 0.25rem;
}

.line-badge.tram { background: var(--oebb-red); }
.line-badge.bus { background: #475569; }

.direction {
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.countdown {
    text-align: right;
}

.minutes {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.min-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
}

footer {
    margin-top: auto;
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.build-info {
    opacity: 0.6;
    font-size: 0.65rem;
}

.refresh-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background 0.2s;
}

.refresh-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 480px) {
    .trip-card {
        gap: 1rem;
        padding: 1rem;
    }
    .time { font-size: 1.25rem; }
}
