* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Source Han Sans SC", "Helvetica Neue", Arial, sans-serif;
    background: #f0f0f0;
    min-height: 100vh;
    padding: 24px;
}
.container {
    max-width: 900px;
    margin: 0 auto;
}
.page-header {
    margin-bottom: 16px;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: white;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid #1a1a1a;
    transition: all 0.2s;
}
.back-link:hover {
    background: #1a1a1a;
    color: white;
}
h1 {
    text-align: left;
    color: #1a1a1a;
    margin-bottom: 32px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.logo-icon {
    width: 40px;
    height: 40px;
    background: #1a1a1a;
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.logo-text h1 {
    font-size: 20px;
    margin: 0;
    line-height: 1.2;
}
.logo-text h2 {
    font-size: 12px;
    color: #666;
    margin: 0;
    font-weight: 500;
}
.nav {
    display: flex;
    gap: 24px;
}
.nav-link {
    color: #555;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}
.nav-link:hover, .nav-link.active {
    color: #1a1a1a;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
}
.btn-primary {
    background: #1a1a1a;
    color: white;
}
.btn-primary:hover {
    background: #333;
}
.btn-secondary {
    background: #f0f0f0;
    color: #333;
}
.btn-secondary:hover {
    background: #e0e0e0;
}
.btn-outline {
    background: transparent;
    border: 2px solid #1a1a1a;
    color: #1a1a1a;
}
.btn-outline:hover {
    background: #1a1a1a;
    color: white;
}
.btn-large {
    padding: 14px 28px;
    font-size: 16px;
}
.hero {
    padding: 80px 0;
    text-align: center;
}
.hero-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 24px;
}
.hero-title {
    font-size: 48px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.title-en {
    font-size: 24px;
    color: #666;
    font-weight: 500;
}
.hero-subtitle {
    font-size: 18px;
    color: #555;
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.6;
}
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
.stats {
    padding: 40px 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-bottom: 60px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}
.stat-icon {
    font-size: 24px;
    color: #1a1a1a;
    margin-bottom: 12px;
}
.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}
.stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}
.section-header {
    text-align: center;
    margin-bottom: 40px;
}
.section-kicker {
    font-size: 13px;
    color: #1976d2;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
}
.section-title {
    font-size: 32px;
    color: #1a1a1a;
}
.quick-routes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.quick-route-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 6px solid #1a1a1a;
}
.quick-route-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.quick-route-color {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
}
.quick-route-info h4 {
    font-size: 18px;
    margin-bottom: 4px;
    color: #1a1a1a;
}
.quick-route-info p {
    font-size: 13px;
    color: #666;
}
.quick-routes-cta {
    text-align: center;
}
.footer {
    background: #1a1a1a;
    color: white;
    padding: 60px 0 24px;
    margin-top: 80px;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 24px;
}
.footer-description {
    color: rgba(255,255,255,0.7);
    max-width: 400px;
    line-height: 1.6;
    font-size: 14px;
}
.footer-address {
    flex: 1;
    max-width: 400px;
    margin-left: 40px;
}
.footer-address h4 {
    font-size: 16px;
    margin-bottom: 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}
.address-block {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.address-block strong {
    color: #e0e0e0;
    font-size: 14px;
}
.address-block span {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    line-height: 1.4;
}
.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    font-size: 13px;
}
body.lang-en .zh { display: none; }
body.lang-zh .en { display: none; }
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    padding: 20px;
    margin-bottom: 24px;
}
.search-box {
    margin-bottom: 16px;
}
.search-box input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #ddd;
    outline: none;
    transition: all 0.2s;
}
.search-box input:focus {
    border-color: #1a1a1a;
}
.category-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.category-tab {
    padding: 8px 16px;
    border: 2px solid #ddd;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    color: #333;
}
.category-tab:hover {
    border-color: #999;
}
.category-tab.active {
    background: #1a1a1a;
    color: white;
    border-color: #1a1a1a;
}
.toggle-controls {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
}
.toggle-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.route-card {
    background: white;
    border: 1px solid #e0e0e0;
    padding: 0;
    margin-bottom: 16px;
    overflow: hidden;
}
.route-header {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 16px 20px;
    background: #1a1a1a;
    color: white;
    flex-wrap: wrap;
    gap: 12px;
}
.route-color {
    width: 16px;
    height: 16px;
    border-radius: 0;
    margin-right: 12px;
    flex-shrink: 0;
    border: 2px solid white;
}
.route-title h2 {
    color: white;
    font-size: 18px;
    margin-bottom: 2px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.route-title p {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    font-weight: 500;
}
.route-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-left: auto;
}
.route-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(255,255,255,0.15);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}
.direction-toggle {
    display: flex;
    gap: 0;
    margin: 0;
    background: #f5f5f5;
    padding: 0;
    border-bottom: 1px solid #e0e0e0;
}
.direction-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: #f5f5f5;
    color: #666;
    border-right: 1px solid #e0e0e0;
}
.direction-btn:last-child {
    border-right: none;
}
.direction-btn:hover {
    background: #e8e8e8;
}
.direction-btn.active {
    background: white;
    color: #1a1a1a;
    border-bottom: 3px solid;
    border-color: inherit;
}
.station-list {
    display: flex;
    flex-direction: row;
    position: relative;
    padding: 60px 40px 180px 40px;
    overflow-x: auto;
    align-items: flex-start;
    min-height: 200px;
}
.station-list::-webkit-scrollbar {
    height: 8px;
}
.station-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
.station-list::before {
    content: '';
    position: absolute;
    left: 40px;
    right: 40px;
    top: 66px;
    height: 8px;
    background: var(--route-color, #1a1a1a);
    z-index: 0;
}
.station-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-width: 80px;
    flex: 1;
    margin: 0;
}
.station-item:hover {
    background: transparent;
}
.station-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 5px solid var(--route-color, #1a1a1a);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    flex-shrink: 0;
    margin-top: 0;
    transition: all 0.15s;
    position: relative;
}
.station-dot.transfer {
    border-width: 6px;
    width: 28px;
    height: 28px;
    margin-top: -4px;
}
.station-dot.transfer::after {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--route-color, #1a1a1a);
    border-radius: 50%;
}
.station-item:hover .station-dot {
    transform: scale(1.2);
}
.station-info {
    position: absolute;
    top: 35px;
    left: 50%;
    transform: translateX(-5px) rotate(45deg);
    transform-origin: top left;
    white-space: nowrap;
    text-align: left;
    width: 200px;
}
.station-name {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 2px;
    letter-spacing: 1px;
}
.station-name-en {
    font-size: 11px;
    color: #777;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.transfer-badges {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
    align-items: flex-start;
}
.transfer-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    font-size: 10px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid rgba(0,0,0,0.1);
}
.transfer-badge:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.transfer-badge.pinned {
    box-shadow: 0 0 0 2px #1a1a1a;
}
.transfer-badge.hidden-mode {
    opacity: 0.4;
}
.branch-section {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.branch-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 12px 20px;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 700;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}
.branch-header {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 12px 20px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}
.branch-header .route-color {
    width: 16px;
    height: 16px;
}
.hidden {
    display: none !important;
}
.expand-toggle {
    margin-left: auto;
    padding: 6px 16px;
    border: 2px solid white;
    background: transparent;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.expand-toggle:hover {
    background: white;
    color: #1a1a1a;
}
.route-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
.route-content.expanded {
    max-height: 10000px;
}
.transfer-notice {
    margin: 12px 20px;
    padding: 10px 14px;
    background: #fff8e1;
    border: 1px dashed #ffc107;
    font-size: 12px;
    color: #f57c00;
    font-weight: 500;
}
.transfer-notice .dashed-arrow {
    display: inline-block;
    margin: 0 8px;
    font-weight: 700;
}
.tooltip {
    position: absolute;
    background: white;
    border: 2px solid #1a1a1a;
    padding: 16px;
    z-index: 1000;
    min-width: 300px;
    max-width: 400px;
    display: none;
    animation: tooltipFade 0.15s ease;
}
.tooltip.show {
    display: block;
}
.tooltip.pinned {
    display: block;
    border: 3px solid #1a1a1a;
}
@keyframes tooltipFade {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
.tooltip-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
    justify-content: space-between;
}
.tooltip-header-left {
    display: flex;
    align-items: center;
}
.tooltip-color {
    width: 32px;
    height: 32px;
    border-radius: 0;
    margin-right: 12px;
    flex-shrink: 0;
    border: 2px solid #1a1a1a;
}
.tooltip-title h4 {
    font-size: 16px;
    color: #1a1a1a;
    font-weight: 700;
}
.tooltip-title p {
    font-size: 11px;
    color: #777;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.close-tooltip {
    background: #1a1a1a;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    font-weight: 700;
    transition: all 0.2s;
}
.close-tooltip:hover {
    background: #333;
}
.tooltip-station {
    background: #fff8e1;
    padding: 8px 12px;
    margin-bottom: 12px;
    border: 1px solid #ffc107;
}
.tooltip-station-name {
    font-weight: 700;
    color: #f57c00;
}
.tooltip-route-preview {
    max-height: 200px;
    overflow-y: auto;
}
.tooltip-route-station {
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 1px 0;
    transition: all 0.15s;
    border-bottom: 1px solid #f0f0f0;
}
.tooltip-route-station:last-child {
    border-bottom: none;
}
.tooltip-route-station:hover {
    background: #fafafa;
}
.tooltip-route-station.current {
    background: #e3f2fd;
    font-weight: 600;
}
.tooltip-route-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    flex-shrink: 0;
    border: 2px solid #ccc;
}
.tooltip-route-station.current .tooltip-route-dot {
    background: #1a1a1a;
    border-color: #1a1a1a;
    transform: scale(1.2);
}
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 40px;
    }
    .footer-address {
        margin-left: 0;
    }
    h1 { font-size: 24px; }
    .station-item { padding: 10px 16px; }
    .route-header { padding: 14px 16px; }
    .header-content {
        flex-direction: column;
        gap: 12px;
    }
    .nav {
        width: 100%;
        justify-content: space-between;
        overflow-x: auto;
        padding-bottom: 4px;
    }
    .nav-link {
        white-space: nowrap;
        padding: 6px 10px;
        font-size: 13px;
    }
    .desktop-only {
        display: none !important;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}
