:root {
    --primary-color: #6366f1;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --bg-color: #fcfcfd;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.4);
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --card-shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.app-container {
    max-width: 500px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 60px;
    background: #fff;
    box-shadow: 0 0 100px rgba(0,0,0,0.03);
    position: relative;
}

/* Header & Tabs */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    padding: 16px 20px;
    box-shadow: 0 4px 20px -5px rgba(0,0,0,0.05);
}

.title-container {
    text-align: center;
    margin-bottom: 16px;
}

h1 {
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.tabs {
    display: flex;
    gap: 8px;
    padding: 4px;
    background: rgba(0,0,0,0.03);
    border-radius: 14px;
    justify-content: center;
}

.tab {
    flex: 1;
    padding: 10px 12px;
    border-radius: 10px;
    border: none;
    background: transparent;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.tab.active {
    background: #fff;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Timeline */
.timeline-container {
    padding: 24px 20px;
}

.day-content {
    display: none;
    animation: slideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.day-content.active {
    display: block;
}

.timeline-item {
    position: relative;
    padding-left: 36px;
    margin-bottom: 32px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 24px;
    bottom: -32px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), rgba(99, 102, 241, 0.1));
    opacity: 0.3;
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-dot {
    position: absolute;
    left: 7px;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid var(--primary-color);
    z-index: 2;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.time {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.8rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.8;
}

.time::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: currentColor;
    border-radius: 50%;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.card:hover::after {
    opacity: 1;
}

.card:active {
    transform: scale(0.98) translateY(0);
}

.card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
}

.card h3 i {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

.card .meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
    align-items: center;
}

.card .meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card .meta span::before {
    content: '';
    width: 3px;
    height: 3px;
    background: currentColor;
    border-radius: 50%;
}

.details {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    color: var(--text-main);
    opacity: 0;
}

.card.expanded .details {
    max-height: 2000px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,0.05);
    opacity: 1;
}

/* Route Visualization */
.route-visual {
    margin-top: 20px;
    padding: 20px;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0,0,0,0.03);
}

.metro-timeline {
    position: relative;
    padding-left: 24px;
}

.metro-step {
    position: relative;
    padding-bottom: 20px;
    font-size: 0.85rem;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metro-step:last-child {
    padding-bottom: 0;
}

.metro-step::before {
    content: '';
    position: absolute;
    left: -22px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    border: 3px solid #cbd5e1;
    z-index: 2;
    transition: var(--transition-base);
}

.metro-step.line-1::before { border-color: #ef4444; }
.metro-step.line-2::before { border-color: #3b82f6; }
.metro-step.line-3::before { border-color: #ec4899; }
.metro-step.line-4::before { border-color: #a855f7; }
.metro-step.line-5::before { border-color: #f59e0b; }

.metro-step::after {
    content: '';
    position: absolute;
    left: -17px;
    top: 18px;
    bottom: -6px;
    width: 2px;
    background: #e2e8f0;
}

.metro-step:last-child::after {
    display: none;
}

.metro-line-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    margin-right: 6px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tag-l1 { background: #ef4444; }
.tag-l2 { background: #3b82f6; }
.tag-l3 { background: #ec4899; }
.tag-l4 { background: #a855f7; }
.tag-l5 { background: #f59e0b; color: #fff; }

.route-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin-top: 16px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    display: block;
    transition: var(--transition-base);
}

.route-img:hover {
    transform: scale(1.02);
}

.info-section {
    padding: 32px 20px;
    background: linear-gradient(to bottom, #fff, #f8fafc);
    border-top: 1px solid rgba(0,0,0,0.05);
}

.info-section h2 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-list li {
    font-size: 0.875rem;
    color: var(--text-main);
    padding: 12px 16px;
    background: #fff;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    position: relative;
    transition: var(--transition-base);
}

.info-list li:hover {
    transform: translateX(4px);
    border-color: var(--primary-color);
}

.info-list li b {
    color: var(--primary-color);
    margin-right: 4px;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* PC Optimization */
@media (min-width: 768px) {
    body {
        background: radial-gradient(circle at top right, #eef2ff, #fcfcfd);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 40px 0;
    }

    .app-container {
        margin: 0;
        border-radius: 32px;
        height: 850px;
        width: 420px;
        overflow-y: auto;
        box-shadow: 0 50px 100px -20px rgba(0,0,0,0.15);
        border: 8px solid #1e293b;
    }

    .app-container::-webkit-scrollbar {
        width: 6px;
    }
    .app-container::-webkit-scrollbar-thumb {
        background: #e2e8f0;
        border-radius: 10px;
    }
}

/* Decorative Background */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    filter: blur(80px);
    opacity: 0.05;
    border-radius: 50%;
}

.blob-1 { top: -100px; right: -100px; }
.blob-2 { bottom: -100px; left: -100px; background: #a855f7; }
