/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* iOS 触摸优化 */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

html {
    /* iOS 安全区域适配 */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    /* 确保在 iOS 上背景覆盖整个安全区域 */
    min-height: -webkit-fill-available;
    color: #e2e8f0;
    line-height: 1.6;
    /* 防止 iOS 橡皮筋效果时露出白色背景 */
    background-attachment: fixed;
    /* 优化 iOS 滚动 */
    -webkit-overflow-scrolling: touch;
}

/* 导航栏 */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    /* iOS 安全区域：顶部刘海适配 */
    padding-top: calc(1rem + env(safe-area-inset-top));
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: #fff;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.nav-link.nav-extern {
    font-size: 0.95rem;
    opacity: 0.9;
}

.nav-link.nav-hub {
    font-size: 0.9rem;
    opacity: 0.95;
    border: 1px dashed rgba(255, 255, 255, 0.25);
}

/* 行程首页 */
.trip-hub-hero {
    margin-bottom: 1rem;
}

.trip-cards {
    display: grid;
    gap: 1.25rem;
    max-width: 640px;
    margin: 0 auto 2rem;
}

.trip-card {
    display: block;
    padding: 1.5rem 1.75rem;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.trip-card:hover {
    transform: translateY(-3px);
    border-color: rgba(102, 126, 234, 0.45);
}

.trip-card-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.trip-card h2 {
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
    color: #f1f5f9;
}

.trip-card-meta {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.trip-card-desc {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.55;
    margin-bottom: 1rem;
}

.trip-card-cta {
    font-size: 0.9rem;
    color: #a5b4fc;
    font-weight: 500;
}

/* 长沙页 */
.booking-shot {
    margin: 1rem 0 1.25rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.booking-shot img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: middle;
}

.booking-shot figcaption {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: #94a3b8;
}

.muted-note {
    font-size: 0.88rem;
    color: #94a3b8;
    line-height: 1.5;
    margin-top: 0.75rem;
}

.card.highlight-gold {
    border-left: 4px solid #fbbf24;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(30, 41, 59, 0.6));
}

.info-bullets {
    list-style: disc;
    padding-left: 1.25rem;
    color: #94a3b8;
    line-height: 1.7;
}

.info-bullets li {
    margin: 0.4rem 0;
}

.info-bullets strong {
    color: #e2e8f0;
}

.page-changsha .hero h1 {
    background: linear-gradient(90deg, #fca5a5, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.trip-focus {
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
    margin-top: 1rem;
    text-align: center;
}

/* 容器 */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

/* 头部 */
.hero {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    border-radius: 20px;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #60a5fa, #a78bfa, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.route {
    color: #64748b;
    font-size: 0.95rem;
}

/* 卡片 */
.card {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.card h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card h3 {
    font-size: 1rem;
    color: #94a3b8;
    margin: 1rem 0 0.5rem;
    padding-left: 0.5rem;
    border-left: 3px solid #667eea;
}

/* 酒店网格 */
.hotel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.hotel-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.2));
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hotel-date {
    color: #60a5fa;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.hotel-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.3rem;
}

.hotel-city {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Day卡片 */
.day-card .day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.day-card .day-header h2 {
    margin-bottom: 0;
}

.day-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #94a3b8;
}

.day-tag.highlight {
    background: linear-gradient(90deg, #f59e0b, #ef4444);
    color: #fff;
}

/* 行程表格 */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
}

.schedule-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.schedule-table tr:last-child {
    border-bottom: none;
}

.schedule-table td {
    padding: 0.75rem 0.5rem;
    vertical-align: top;
}

.schedule-table .time {
    width: 100px;
    color: #60a5fa;
    font-weight: 500;
    white-space: nowrap;
}

.schedule-table .note {
    color: #64748b;
    font-size: 0.9rem;
    text-align: right;
}

/* 行程段距离：窄屏备注列隐藏时，在中间列显示 */
.leg-dist {
    display: none;
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.45;
    margin-top: 0.4rem;
    font-weight: normal;
}

.schedule-table strong {
    color: #fff;
}

.warning-row {
    background: rgba(239, 68, 68, 0.1);
}

.warning-row td {
    color: #fbbf24;
}

/* 警告框 */
.alert {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    color: #fbbf24;
}

/* 美食网格 */
.food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.food-section h3 {
    margin-bottom: 0.75rem;
}

.food-section h3 + .muted-note {
    margin-top: 0.35rem;
    margin-bottom: 0.5rem;
}

.food-list {
    list-style: none;
}

.food-list li {
    padding: 0.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.stars {
    color: #fbbf24;
    font-size: 0.8rem;
}

/* 交通表格 */
.transport-table {
    width: 100%;
    border-collapse: collapse;
}

.transport-table th {
    text-align: left;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    font-weight: 500;
}

.transport-table td {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* 提醒列表 */
.alerts-list {
    list-style: none;
}

.alerts-list li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: rgba(251, 191, 36, 0.1);
    border-left: 3px solid #fbbf24;
    border-radius: 0 8px 8px 0;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 2rem;
    /* iOS 安全区域：底部 Home Indicator 适配 */
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
    color: #64748b;
}

/* ========== 行李清单专用样式 ========== */

.checklist-hero {
    position: relative;
}

.progress-container {
    margin: 1.5rem 0;
}

.progress-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 6px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    color: #94a3b8;
    font-size: 0.9rem;
}

.reset-btn {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #f87171;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.reset-btn:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* 清单卡片 */
.checklist-card {
    border-left: 4px solid #667eea;
}

.highlight-card {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(30, 41, 59, 0.8));
}

.final-check {
    border-left-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(30, 41, 59, 0.8));
}

/* 清单项目 */
.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.check-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.check-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.check-item input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid #64748b;
    border-radius: 6px;
    margin-right: 1rem;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.check-item input:checked+.checkmark {
    background: linear-gradient(135deg, #10b981, #34d399);
    border-color: #10b981;
}

.check-item input:checked+.checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.check-item input:checked~.item-text {
    color: #64748b;
    text-decoration: line-through;
}

.item-text {
    color: #e2e8f0;
    transition: all 0.2s ease;
}

/* 小贴士 */
.tips-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(30, 41, 59, 0.8));
    border-left: 4px solid #60a5fa;
}

.tips-list {
    list-style: none;
}

.tips-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #94a3b8;
}

.tips-list li::before {
    content: '💡';
    position: absolute;
    left: 0;
}

/* 提示框 */
.tip-box {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid #60a5fa;
    border-radius: 0 8px 8px 0;
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.6;
}

.tip-box strong {
    color: #60a5fa;
}

.tip-box.warning {
    background: rgba(251, 191, 36, 0.1);
    border-left-color: #fbbf24;
}

.tip-box.warning strong {
    color: #fbbf24;
}

/* 响应式 */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
        /* iOS 底部安全区域 */
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .card {
        padding: 1rem 1.25rem;
    }

    .navbar {
        padding: 0.75rem 1rem;
        /* iOS 安全区域：顶部刘海适配 */
        padding-top: calc(0.75rem + env(safe-area-inset-top));
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.95rem;
        padding: 0.5rem 1rem;
    }

    .schedule-table .time {
        width: auto;
        min-width: 70px;
    }

    .schedule-table .note {
        display: none;
    }

    .leg-dist {
        display: block;
    }

    .day-header {
        flex-direction: column;
        align-items: flex-start !important;
    }

    /* iOS 点击优化：增大点击区域 */
    .check-item {
        padding: 1rem;
        min-height: 48px;
    }

    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .trip-cards {
        max-width: none;
    }

    .trip-card {
        padding: 1.25rem 1.35rem;
    }
}