*, *::before, *::after {
    font-family: Arial, sans-serif;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

#banner {
    width: 100%;
    object-fit: contain;
}

#map {
    width: 100%;
    flex: 1;
}

/* 共用基礎工具類別 */
.w-100 {
    width: 100%;
}

.text-center {
    text-align: center;
}

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

.text-white {
    color: white;
}

.text-gray {
    color: gray;
}

.font-bold {
    font-weight: bold;
}

.pointer {
    cursor: pointer;
}

.opacity-50 {
    opacity: 0.5;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.menu-toggle-btn {
    display: none;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    padding: 10px 20px;
    font-size: 24px;
    background: #fff;
    border: 2px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.menu-toggle-btn.visible {
    display: block;
}

.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1001;
    backdrop-filter: blur(2px);
}

.menu-overlay.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-modal {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 550px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.menu-header {
    margin-top: 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.menu-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.menu-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.menu-btn {
    flex: 1;
    max-width: 150px;
    padding: 10px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
}

.btn-blue {
    background: #2196F3;
}

.btn-red {
    background: #f44336;
}

.vis-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vis-span {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 22px;
    display: inline-block;
    flex-grow: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.vis-divider {
    border: 0;
    border-top: 1px solid #ddd;
    margin: 5px 0;
}

.info-window-container, .train-info-container {
    font-size: 24px;
}

.info-window-container {
    width: 550px;
}

.info-window-title {
    font-size: 32px;
}

.weather-container {
    text-align: left;
    margin-top: 5px;
    background-color: #02254D;
    padding: 5px;
}

.weather-icon, .weather-temp {
    vertical-align: middle;
}

.weather-icon {
    height: 32px;
    margin-right: 4px;
}

.weather-temp {
    font-size: 20px;
}

.data-table {
    border-collapse: collapse;
}

.table-cell {
    text-align: left;
    border: 1px solid #ddd;
    padding: 5px;
}

.data-table thead tr, .bg-navy {
    background-color: #02254D;
}

.line-header {
    padding: 5px;
    border: 1px solid #ddd;
}

.toggle-btn-container {
    margin-top: 10px;
}

.toggle-btn {
    color: black;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 18px;
}

/* 跑馬燈特效 */
.data-cell-marquee {
    max-width: 150px;
    overflow: hidden;
}

.marquee-container {
    width: 150px;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.marquee-text {
    display: inline-block;
    white-space: nowrap;
    transform: translateX(0);
}

.marquee-animate {
    animation: scroll-text 5s linear infinite;
}

@keyframes scroll-text {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.station-marker-wrapper {
    position: absolute;
    transform: translate(-50%, -50%);
}

.marker-icon {
    width: 100px;
    height: 100px;
}

.train-marker-icon {
    display: block;
    margin: 0 auto;
}

.tml-train-marker-wrapper {
    will-change: transform, opacity;
    transform: translateZ(0);
}

.train-info-container {
    width: 750px;
    height: 80px;
    padding: 10px;
    border: 2px solid #ccc;
    background-color: white;
}

.train-info-title {
    font-size: 28px;
    margin-bottom: 10px;
}

.train-info-cars-wrapper {
    gap: 4px;
}

.train-info-direction {
    font-size: 24px;
}

.train-info-car {
    width: 40px;
    height: 28px;
    padding: 4px 10px;
    border-radius: 6px;
}

.car-text-red {
    color: #880015;
}