/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* 隐藏滚动条 */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 导航标签 */
.nav-tab {
    white-space: nowrap;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #78716c;
    background: #fafaf9;
    border: 1px solid #e7e5e4;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-tab.active {
    background: #292524;
    color: #fafaf9;
    border-color: #292524;
}

.nav-tab:hover:not(.active) {
    background: #f5f5f4;
    border-color: #d6d3d1;
}

/* 内容区域 */
.content-section {
    display: none;
    animation: fadeIn 0.4s ease;
    position: relative;
    z-index: 1;
}

/* 确保Leaflet地图不会覆盖导航栏 */
.leaflet-container {
    z-index: 1 !important;
}

#suzhou-map, #shanghai-map {
    position: relative;
    z-index: 1;
}

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

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

/* 日程卡片 */
.day-card {
    background: white;
    border-radius: 1.25rem;
    margin-bottom: 1.25rem;
    overflow: hidden;
    border: 1px solid #f5f5f4;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.day-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.day-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: background 0.2s;
}

.day-header:hover {
    background: #fafaf9;
}

.day-badge {
    background: linear-gradient(135deg, #a8a29e, #78716c);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 0.5rem;
    letter-spacing: 0.5px;
}

.day-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: #44403c;
}

.day-content {
    display: none;
    padding: 0 1.25rem 1.25rem;
    animation: slideDown 0.3s ease;
}

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

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 1000px; }
}

.day-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 1rem;
    margin-top: 1rem;
}

/* 时间线 */
.timeline {
    position: relative;
    padding-left: 1rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: linear-gradient(to bottom, #e7e5e4, #d6d3d1);
    border-radius: 1px;
}

.timeline-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.6rem 0;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border: 2px solid #a8a29e;
    border-radius: 50%;
    margin-left: -1px;
}

.timeline-item .time {
    font-size: 0.7rem;
    color: #a8a29e;
    font-weight: 500;
    min-width: 2.5rem;
    padding-top: 0.1rem;
}

.timeline-item .detail h4 {
    font-size: 0.85rem;
    font-weight: 500;
    color: #44403c;
    margin-bottom: 0.15rem;
}

.timeline-item .detail p {
    font-size: 0.75rem;
    color: #78716c;
    line-height: 1.4;
}

/* 打卡卡片 */
.checkin-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    aspect-ratio: 3/4;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.checkin-card:hover {
    transform: scale(1.02);
}

.checkin-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.checkin-card:hover img {
    transform: scale(1.05);
}

.checkin-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem 0.75rem 0.75rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.checkin-info h4 {
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.15rem;
}

.checkin-info p {
    color: rgba(255,255,255,0.75);
    font-size: 0.65rem;
}

/* 美食卡片 */
.food-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: white;
    border-radius: 1rem;
    border: 1px solid #f5f5f4;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
}

.food-card:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}

.food-icon {
    font-size: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafaf9;
    border-radius: 0.75rem;
    flex-shrink: 0;
}

.food-info h4 {
    font-size: 0.85rem;
    font-weight: 500;
    color: #44403c;
    margin-bottom: 0.1rem;
}

.food-info p {
    font-size: 0.72rem;
    color: #78716c;
    line-height: 1.3;
}

.food-tag {
    display: inline-block;
    font-size: 0.65rem;
    color: #a8a29e;
    margin-top: 0.25rem;
}

/* 交通卡片 */
.transport-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 1rem;
    border: 1px solid #f5f5f4;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.transport-route {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.city-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.route-line {
    width: 2px;
    height: 20px;
    background: #e7e5e4;
    border-radius: 1px;
}

.transport-info h4 {
    font-size: 0.85rem;
    font-weight: 500;
    color: #44403c;
    margin-bottom: 0.2rem;
}

.transport-info p {
    font-size: 0.75rem;
    color: #78716c;
}

/* 提示卡片 */
.tip-card {
    padding: 0.85rem 1rem;
    background: white;
    border-radius: 1rem;
    border: 1px solid #f5f5f4;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

/* 响应式 - 确保移动端优先 */
@media (max-width: 480px) {
    .day-img {
        height: 140px;
    }
    
    .checkin-card {
        aspect-ratio: 2/3;
    }
}

@media (min-width: 768px) {
    main {
        max-width: 480px;
    }
}

/* 页面加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.day-card, .checkin-card, .food-card, .transport-card, .tip-card {
    animation: fadeInUp 0.5s ease forwards;
}

.day-card:nth-child(1) { animation-delay: 0.05s; }
.day-card:nth-child(2) { animation-delay: 0.1s; }
.day-card:nth-child(3) { animation-delay: 0.15s; }
.day-card:nth-child(4) { animation-delay: 0.2s; }
.day-card:nth-child(5) { animation-delay: 0.25s; }
