body {
    background-color: #007A33;
    font-family: 'League Spartan', sans-serif;
    color: white;
    padding: 20px;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    font-size: clamp(32px, 7vw, 48px);
    text-align: center;
    margin: 30px 0 10px 0;
    font-weight: 900;
}

.subtitle {
    text-align: center;
    font-size: clamp(15px, 2.8vw, 18px);
    margin-bottom: 40px;
    opacity: 0.9;
}

.map-section {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 28px;
}

.map-hidden {
    display: none;
}

.map-header-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.map-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.map-header-row h2 {
    margin: 0;
    font-size: clamp(20px, 3.4vw, 28px);
}

.map-status {
    margin: 0;
    font-size: 13px;
    opacity: 0.85;
}

.map-toggle-btn {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
    padding: 0;
}

.map-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.mbta-map {
    width: 100%;
    height: 460px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.map-collapsed .mbta-map {
    display: none;
}

.lines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.line-card {
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.line-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.line-card:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
}

.line-card-active {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 10px 28px rgba(0, 0, 0, 0.45);
    transform: translateY(-6px);
}

.stop-label {
    font-size: 11px;
    font-weight: 700;
    color: #102b16;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 2px 5px;
}

.red-line {
    background: linear-gradient(135deg, #C41E3A 0%, #8B1538 100%);
}

.blue-line {
    background: linear-gradient(135deg, #003DA5 0%, #001F7A 100%);
}

.orange-line {
    background: linear-gradient(135deg, #ED8936 0%, #C14B1F 100%);
}

.green-line {
    background: linear-gradient(135deg, #00B050 0%, #007D38 100%);
}

.silver-line {
    background: linear-gradient(135deg, #9CA3AF 0%, #6B7280 100%);
}

.commuter-line {
    background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
}

.line-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 12px;
}

.line-header h2 {
    margin: 0;
    font-size: 24px;
    flex: 1;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.fare {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
}

.status-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.status-normal { background: rgba(0, 210, 100, 0.35); }
.status-minor  { background: rgba(255, 200, 0, 0.35); }
.status-major  { background: rgba(255, 70, 70, 0.4); }

.description {
    font-size: 15px;
    margin: 12px 0;
    font-weight: 500;
    opacity: 0.95;
}

.stations h3 {
    font-size: 16px;
    margin: 16px 0 8px 0;
    font-weight: 700;
}

.stations ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.stations li {
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.commuter-route-btn,
.green-route-btn {
    width: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 7px;
    color: white;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.commuter-route-btn:hover,
.green-route-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateX(2px);
}

.stations li:last-child {
    border-bottom: none;
}

.highlights {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 6px;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.link-button {
    display: inline-block;
    background: white;
    color: #007A33;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s, box-shadow 0.2s;
    margin: 0 8px;
}

.link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    body {
        padding: 14px;
    }

    h1 {
        font-size: 36px;
    }
    
    .lines-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .map-section {
        padding: 12px;
    }

    .map-controls {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
    }

    .mbta-map {
        height: 360px;
    }

    .line-card {
        padding: 18px;
    }

    .line-header h2 {
        font-size: 20px;
    }

    .status-badge {
        font-size: 10px;
        padding: 4px 8px;
    }

    .link-button {
        width: 100%;
        max-width: 280px;
        text-align: center;
        margin: 0;
    }
}
