:root {
    --primary-color: #C8A165;
    /* Gold/Premium */
    --bg-color: #0F1115;
    /* Dark background */
    --card-bg: #1A1D24;
    --text-main: #FFFFFF;
    --text-muted: #A0A0A0;
    --accent-blue: #4A90E2;
    --font-main: 'Noto Sans TC', sans-serif;
    --font-display: 'Outfit', sans-serif;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-main);
}

h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    border-left: 4px solid var(--primary-color);
    padding-left: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 17, 21, 0.9);
    backdrop-filter: blur(10px);
    padding: var(--spacing-md);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-brand {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: var(--spacing-md);
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1548266652-99cf27701ced?auto=format&fit=crop&w=1000&q=80');
    /* Shanghai Skyline Placeholder */
    background-size: cover;
    background-position: center;
    padding: var(--spacing-lg);
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-lg);
}

.trip-dates {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    animation: bounce 2s infinite;
    opacity: 0.7;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Main Content */
main {
    padding: var(--spacing-lg) var(--spacing-md);
    max-width: 800px;
    margin: 0 auto;
}

.card-section {
    margin-bottom: 60px;
    scroll-margin-top: 80px;
    /* For sticky header offset */
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Flight Card */
.flight-route {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.airport {
    text-align: center;
}

.airport .code {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-display);
}

.airport .city {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.airport .time {
    display: block;
    font-size: 1.2rem;
    margin-top: var(--spacing-sm);
    font-weight: 500;
}

.flight-path {
    flex: 1;
    text-align: center;
    padding: 0 var(--spacing-md);
    position: relative;
}

.flight-path .line {
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    width: 100%;
    margin: 5px 0;
    position: relative;
}

.flight-path .line::after {
    content: '✈';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    background: var(--card-bg);
    padding: 0 5px;
    color: var(--primary-color);
}

.flight-details {
    display: flex;
    justify-content: space-around;
    background: rgba(0, 0, 0, 0.2);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
}

.detail-item {
    text-align: center;
}

.detail-item .label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.detail-item .value {
    font-weight: 600;
}

/* Flight Card Updates */
.flight-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    color: var(--primary-color);
}

.flight-leg {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
}

.flight-route-small {
    display: flex;
    gap: var(--spacing-md);
    font-family: var(--font-display);
    font-size: 1.1rem;
}

.flight-route-small .arrow {
    color: var(--text-muted);
}

.flight-meta {
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
}

.layover-info {
    text-align: center;
    margin: var(--spacing-sm) 0;
    font-size: 0.9rem;
    padding: 4px;
    border-radius: 4px;
}

.layover-info.warning {
    background: rgba(255, 193, 7, 0.15);
    color: #FFC107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

/* Hotel Card */
.hotel-card h3 {
    font-size: 1.4rem;
    margin-bottom: var(--spacing-sm);
}

.hotel-card .address {
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
    font-size: 0.9rem;
}

.hotel-actions {
    margin-bottom: var(--spacing-lg);
}

.btn-secondary {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--bg-color);
}

.check-times {
    display: flex;
    gap: var(--spacing-md);
}

.time-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    text-align: center;
}

.time-box .label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.time-box .value {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.day-item {
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.day-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 0;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 2px solid var(--bg-color);
}

.day-header {
    margin-bottom: var(--spacing-sm);
}

.day-num {
    font-weight: 700;
    color: var(--primary-color);
    margin-right: var(--spacing-sm);
}

.day-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.day-content {
    background: var(--card-bg);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
}

.day-content h4 {
    margin-bottom: var(--spacing-sm);
}

.day-content ul {
    list-style: none;
}

.day-content li {
    margin-bottom: 8px;
    padding-left: 16px;
    position: relative;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
}

.day-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Checklist */
.checklist {
    list-style: none;
}

.checklist li {
    display: flex;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.checklist li:last-child {
    border-bottom: none;
}

.checklist input[type="checkbox"] {
    margin-right: var(--spacing-md);
    accent-color: var(--primary-color);
    width: 20px;
    height: 20px;
}

/* Weather */
.weather-card {
    text-align: center;
    background: linear-gradient(135deg, #1A1D24 0%, #252A33 100%);
}

.weather-current {
    margin-bottom: var(--spacing-md);
}

.weather-current .temp {
    font-size: 3rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.weather-current .condition {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.weather-tip {
    font-size: 0.9rem;
    color: var(--primary-color);
    background: rgba(200, 161, 101, 0.1);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    display: inline-block;
}

/* Footer */
footer {
    text-align: center;
    padding: var(--spacing-lg);
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
        /* Simple hide for now, could add burger menu later */
    }

    .nav-brand {
        width: 100%;
        text-align: center;
    }
}

/* New Styles for App Grid and Tags */
.app-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.app-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s;
}

.app-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(200, 161, 101, 0.2);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(200, 161, 101, 0.3);
}