/* CSS变量定义 */
:root {
    --primary-color: #3a86ff;
    --secondary-color: #8d99ae;
    --accent-color: #e76f51;
    --success-color: #2a9d8f;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-color: #ffffff;
    --card-bg-color: #ffffff;
    --nav-bg-color: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --text-light: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --header-height: 60px;
    --container-max-width: 1200px;
    --border-radius: 8px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
}

/* 基础重置 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

ul, ol {
    list-style-position: inside;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
}

/* 应用容器 */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 导航栏 */
.main-nav {
    background-color: var(--nav-bg-color);
    box-shadow: var(--shadow);
    padding: 0 var(--spacing);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: var(--spacing);
}

.nav-link {
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link i {
    font-size: 1.1rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
    background-color: rgba(58, 134, 255, 0.1);
}

.nav-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-color);
    padding: 8px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.action-btn:hover {
    background-color: rgba(58, 134, 255, 0.1);
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: var(--border-radius);
    transition: background-color 0.2s ease;
    z-index: 1000;
}

.mobile-menu-btn:hover {
    background-color: rgba(58, 134, 255, 0.1);
}

/* 页面容器 */
.page-container {
    flex: 1;
    padding: var(--spacing) var(--spacing) var(--spacing-lg);
    max-width: var(--container-max-width);
    margin: 0 auto;
    width: 100%;
}

.page-header {
    margin-bottom: var(--spacing-md);
}

.page-header h1 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
}

.note {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-md);
}

/* 卡片样式 */
.card {
    background-color: var(--card-bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.card h2 {
    font-size: 1.4rem;
    margin-bottom: var(--spacing);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card h2 i {
    color: var(--primary-color);
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card h3 i {
    color: var(--primary-color);
}

/* 图库样式 */
.gallery-grid { 
    display:grid; 
    grid-template-columns: repeat(3, minmax(0, 1fr)); 
    gap:16px; 
}
@media (max-width: 992px){ 
    .gallery-grid { 
        grid-template-columns: repeat(2, minmax(0, 1fr)); 
    } 
}
@media (max-width: 640px){ 
    .gallery-grid { 
        grid-template-columns: 1fr; 
    } 
}
.gallery-card { 
    background: var(--card-bg-color); 
    border-radius: var(--border-radius); 
    box-shadow: var(--shadow-sm); 
    overflow:hidden; 
    display:flex; 
    flex-direction:column; 
}
.gallery-card img { 
    width:100%; 
    height:180px; 
    object-fit:cover; 
    display:block; 
}
.gallery-card .meta { 
    padding:12px; 
}
.badge { 
    display:inline-block; 
    padding:2px 8px; 
    border-radius:999px; 
    font-size:12px; 
    margin-right:6px; 
}
.badge.sight { 
    background: rgba(42,157,143,.12); 
    color:#2a9d8f; 
    border:1px solid rgba(42,157,143,.35); 
}
.badge.view { 
    background: rgba(58,134,255,.12); 
    color:#3a86ff; 
    border:1px solid rgba(58,134,255,.35); 
}
.badge.food { 
    background: rgba(245,158,11,.12); 
    color:#f59e0b; 
    border:1px solid rgba(245,158,11,.35); 
}
.caption { 
    color: var(--text-muted); 
    font-size:.92rem; 
    margin-top:6px; 
}
.open-full { 
    color: var(--primary-color); 
    font-size:.9rem; 
    text-decoration:none; 
}
.tips-grid { 
    display:grid; 
    grid-template-columns: repeat(2, minmax(0, 1fr)); 
    gap:12px; 
}
@media (max-width: 768px){ 
    .tips-grid { 
        grid-template-columns: 1fr; 
    } 
}
.tip-card { 
    background: var(--card-bg-color); 
    border-radius: var(--border-radius); 
    box-shadow: var(--shadow-sm); 
    padding:12px; 
}
.tip-title { 
    font-weight:600; 
    display:flex; 
    align-items:center; 
    gap:8px; 
    margin-bottom:6px; 
}
.tip-desc { 
    color: var(--text-muted); 
    font-size:.92rem; 
}

/* 地图样式 */
.map-container { 
    position: relative; 
    background:#fff; 
    border-radius: var(--border-radius); 
    box-shadow: var(--shadow); 
    padding: var(--spacing); 
}
.map-layer-buttons { 
    display:flex; 
    gap:10px; 
    margin-top:10px; 
    margin-bottom:10px; 
    flex-wrap:wrap; 
}
.map-layer-btn { 
    padding:6px 12px; 
    background:#f8fafc; 
    border:1px solid #e2e8f0; 
    border-radius:999px; 
    cursor:pointer; 
    font-size:13px; 
    transition:all .2s ease; 
}
.map-layer-btn.active { 
    background:#3a86ff; 
    color:#fff; 
    border-color:#3a86ff; 
}
.routes-panel .card p { 
    margin:6px 0; 
}
.detailed-timeline { 
    margin-top: var(--spacing); 
}
.detail-timeline { 
    display:flex; 
    flex-direction:column; 
    gap:12px; 
    margin-bottom:20px; 
}
.detail-item { 
    display:flex; 
    gap:12px; 
    padding:12px; 
    border-radius: var(--border-radius); 
    background: var(--card-bg-color); 
    box-shadow: var(--shadow-sm); 
}
.detail-item.travel { 
    border-left: 4px solid #3a86ff; 
}
.detail-item.sight { 
    border-left: 4px solid #2a9d8f; 
}
.detail-item.meal { 
    border-left: 4px solid #f59e0b; 
}
.detail-time { 
    min-width: 68px; 
    color: var(--text-muted); 
    font-weight: 500; 
}
.detail-content { 
    flex:1; 
}
.detail-title { 
    display:flex; 
    align-items:center; 
    gap:8px; 
    font-weight:600; 
    margin-bottom:6px; 
    cursor:pointer; 
}
.detail-desc { 
    color: var(--text-muted); 
    font-size:.92rem; 
    margin-bottom:6px; 
}
.route-info { 
    background: rgba(58,134,255,.08); 
    border-radius: var(--border-radius); 
    padding: 8px 10px; 
    font-size: .9rem; 
}
.route-actions a { 
    margin-right:10px; 
    font-size:.9rem; 
}
.legend { 
    margin-top:8px; 
    color: var(--text-muted); 
    font-size:.9rem; 
}

/* 自定义样式 */
.home-btn { 
    display:flex; 
    align-items:center; 
    gap:8px; 
    padding:8px 15px; 
    color: var(--text-color); 
    text-decoration:none; 
    border-radius: var(--border-radius); 
    font-weight:500; 
    font-size:14px; 
    transition: all .2s ease; 
    margin-left:15px; 
    background-color: rgba(58,134,255,.1); 
}
.home-btn:hover { 
    background-color: var(--primary-color); 
    color:#fff; 
}

.kpis { 
    display:grid; 
    grid-template-columns: repeat(2, minmax(0, 1fr)); 
    gap:12px; 
}
.kpis .card { 
    padding:14px; 
}
@media (max-width: 768px){ 
    .kpis { 
        grid-template-columns: 1fr; 
    } 
}
.note-list { 
    color: var(--text-muted); 
    font-size:.95rem; 
}

/* 现代化UI优化 */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.nav-link:hover::before {
    left: 100%;
}

.action-btn {
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(58, 134, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.action-btn:hover::before {
    width: 100%;
    height: 100%;
}

.home-btn {
    position: relative;
    overflow: hidden;
}

.home-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.home-btn:hover::before {
    left: 100%;
}

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

.card {
    animation: fadeInUp 0.6s ease-out;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

/* 现代化按钮效果 */
.action-btn, .home-btn {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 页脚 */
.main-footer {
    background-color: var(--nav-bg-color);
    color: var(--text-muted);
    padding: var(--spacing);
    text-align: center;
    font-size: 0.9rem;
    box-shadow: var(--shadow);
    margin-top: auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: var(--nav-bg-color);
        flex-direction: column;
        gap: 0;
        transform: translateY(-150%);
        box-shadow: var(--shadow);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
        z-index: 999;
        display: flex;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        display: flex;
    }
    
    .nav-link {
        padding: 12px var(--spacing);
        border-radius: 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-actions {
        gap: 5px;
    }
    
    .action-btn span {
        display: none;
    }
}
