:root {
    --bg-dark: #020617;
    /* Deep Slate 950 */
    --bg-card: #0f172a;
    /* Slate 900 */
    --bg-header: #020617;
    --primary: #f59e0b;
    /* Amber 500 */
    --primary-glow: rgba(245, 158, 11, 0.4);
    --success: #10b981;
    /* Emerald 500 */
    --success-glow: rgba(16, 185, 129, 0.4);
    --warning: #f43f5e;
    /* Rose 500 */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(51, 65, 85, 0.5);
    /* Slate 700 with alpha */
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: none;
}

/* Header Section */
.pid-header {
    height: 14vh;
    background-color: var(--bg-header);
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5rem;
    position: relative;
    z-index: 100;
}

.branding {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo-box {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), #d97706);
    color: #000;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 0 30px var(--primary-glow);
}

.title-group h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 5.5rem;
    letter-spacing: 6px;
    line-height: 0.8;
    background: linear-gradient(to bottom, #fff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 400;
}

.title-group h2 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
    margin-left: 4px;
    opacity: 0.9;
}

.time-box {
    text-align: right;
}

.time-box .date {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 2px;
}

.time-box .clock {
    font-size: 5rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    letter-spacing: -2px;
}

/* Main Split Layout */
.pid-main {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.schedule-section {
    flex: 6;
    padding: 2rem 5rem;
    background: radial-gradient(circle at top left, #0f172a 0%, #020617 100%);
    border-right: 1px solid var(--border);
}

.map-section {
    flex: 4;
    position: relative;
    background: #020617;
}

/* Table Styling */
.departure-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 1rem;
}

.departure-table th {
    font-size: 0.9rem;
    font-weight: 900;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 4px;
    padding-bottom: 1rem;
    opacity: 0.6;
}

.departure-table tr {
    transition: all 0.5s ease;
}

.departure-table td {
    background: rgba(15, 23, 42, 0.4);
    height: 13vh;
    vertical-align: middle;
}

.departure-table td:first-child {
    border-radius: 12px 0 0 12px;
    border-left: 1px solid var(--border);
}

.departure-table td:last-child {
    border-radius: 0 12px 12px 0;
    border-right: 1px solid var(--border);
}

tr.is-tracked td {
    background: rgba(245, 158, 11, 0.05) !important;
    border-top: 1px solid rgba(245, 158, 11, 0.2);
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}

.route-main {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4.5rem;
    letter-spacing: 2px;
    line-height: 1;
    color: var(--text-main);
    padding-left: 2rem;
}

.route-sub {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 3px;
    margin-top: 4px;
    padding-left: 2rem;
    opacity: 0.7;
}

.status {
    font-size: 1.4rem;
    font-weight: 900;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-main);
}

.status-indicator {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    box-shadow: 0 0 15px currentColor;
}

.eta {
    font-size: 4rem;
    font-weight: 900;
    text-align: right;
    padding-right: 3rem;
    letter-spacing: -2px;
}

.eta.warning {
    color: var(--primary);
}

.bay-badge {
    background: var(--primary);
    color: #000;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    font-size: 2.8rem;
    font-weight: 900;
}

/* Map UI */
.map-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
}

#transit-map {
    width: 100%;
    height: 100%;
    background: #020617;
    z-index: 10;
}

.map-label-container {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.map-label {
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: var(--primary);
    background: rgba(2, 6, 23, 0.9);
    padding: 8px 16px;
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
}

.tracking-status {
    font-size: 0.7rem;
    font-weight: 900;
    color: #fff;
    background: var(--bg-card);
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 1px;
    border: 1px solid var(--border);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
}

/* Clean Marker Styling */
.transit-marker {
    background: none;
    border: none;
}

.vehicle-marker-icon {
    width: 18px;
    height: 18px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.is-tracked-marker .vehicle-marker-icon {
    width: 24px;
    height: 24px;
    border-color: var(--text-main);
    background: var(--success);
    box-shadow: 0 0 30px var(--success);
}

.terminal-marker div {
    border: 3px solid #fff;
    background: var(--success);
    border-radius: 50%;
}

/* Footer Section */
.pid-footer {
    height: 10vh;
    background: #000;
    display: flex;
    align-items: center;
    border-top: 1px solid var(--border);
}

.ticker-wrap {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.ticker {
    display: inline-block;
    padding-left: 100%;
    animation: ticker 45s linear infinite;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-muted);
}

.ticker span {
    margin-right: 12rem;
}

.ticker strong {
    color: var(--primary);
    margin-right: 1rem;
}

@keyframes ticker {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}