/* ============================================
   寻美县域 - 全局样式
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: #f8f8f8;
    color: #333;
    line-height: 1.5;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ========== 头部导航 ========== */
.header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
}

/* Logo */
.logo {
    font-size: 22px;
    font-weight: bold;
    text-decoration: none;
    background: linear-gradient(135deg, #007aff, #00c6ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.logo span {
    font-size: 24px;
}

/* 导航菜单 */
.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-size: 15px;
    padding: 8px 0;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #007aff;
}

.nav-links a.active {
    color: #007aff;
    font-weight: 500;
}

/* ============================================
   用户区域 - 直接链接样式（无下拉菜单）
   ============================================ */
.user-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 用户名链接 */
.user-area .user-link {
    color: #1a1a2e;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 6px 16px;
    border-radius: 20px;
    background: #f0f4ff;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.user-area .user-link:hover {
    background: #dce5f5;
}
.user-area .user-link:active {
    transform: scale(0.96);
}

/* 退出按钮 */
.user-area .logout-btn {
    color: #ff3b30;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 16px;
    border-radius: 20px;
    background: #fff0ef;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.user-area .logout-btn:hover {
    background: #ffe0de;
}
.user-area .logout-btn:active {
    transform: scale(0.96);
}

/* 登录按钮 */
.user-area .login-btn {
    color: #007aff;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 16px;
    border-radius: 20px;
    background: #f0f4ff;
    transition: 0.2s;
    border: 1px solid transparent;
}
.user-area .login-btn:hover {
    background: #dce5f5;
}
.user-area .login-btn:active {
    transform: scale(0.96);
}

/* 注册按钮 */
.user-area .register-btn {
    color: white;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 16px;
    border-radius: 20px;
    background: #007aff;
    transition: 0.2s;
    border: 1px solid #007aff;
}
.user-area .register-btn:hover {
    background: #005fc1;
    border-color: #005fc1;
}
.user-area .register-btn:active {
    transform: scale(0.96);
}

/* ========== 底部 ========== */
.footer {
    background: white;
    margin-top: 40px;
    padding: 30px 15px;
    text-align: center;
    color: #999;
    font-size: 12px;
    border-top: 1px solid #eee;
}

.footer a {
    color: #007aff;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* ========== 按钮 ========== */
.btn {
    background: #007aff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn:active {
    background: #005fc1;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* ========== 面包屑 ========== */
.breadcrumb {
    margin: 15px 0;
    font-size: 13px;
}

.breadcrumb a {
    color: #007aff;
    text-decoration: none;
}

.breadcrumb span {
    color: #333;
}

/* ========== 卡片通用样式 ========== */
.card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: 0.2s;
}

.card:active {
    transform: scale(0.98);
}

/* ========== 响应式设计 ========== */

/* 手机端（宽度小于768px） */
@media (max-width: 767px) {
    .header .container {
        flex-wrap: nowrap;
        gap: 10px;
        padding: 10px 15px;
    }
    
    .logo {
        font-size: 18px;
        flex-shrink: 0;
    }
    
    .logo span {
        font-size: 20px;
    }
    
    /* 手机端隐藏导航菜单 */
    .nav-links {
        display: none;
    }
    
    .user-area {
        margin-left: auto;
        gap: 6px;
    }
    
    .user-area .user-link,
    .user-area .logout-btn,
    .user-area .login-btn,
    .user-area .register-btn {
        padding: 4px 10px;
        font-size: 12px;
    }
}

/* 平板端（宽度768px-1024px） */
@media (min-width: 768px) and (max-width: 1024px) {
    .nav-links {
        gap: 18px;
    }
    
    .nav-links a {
        font-size: 14px;
    }
}

/* 桌面端（宽度大于1024px） */
@media (min-width: 1025px) {
    .nav-links {
        display: flex !important;
    }
}

/* 确保所有页面都有基础样式 */
a {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* 清除浮动 */
.clearfix::after {
    content: "";
    clear: both;
    display: table;
}


/* ========== 首页专用样式 ========== */

/* Banner */
.banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0 0 30px 30px;
    padding: 40px 20px 30px 20px;
    text-align: center;
    color: white;
}

.banner h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.banner p {
    font-size: 14px;
    opacity: 0.9;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 800px;
    margin: -25px auto 0 auto;
    padding: 0 15px;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 15px 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 28px;
    font-weight: bold;
    color: #007aff;
}

.stat-label {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

/* 搜索框 */
.search-container {
    max-width: 500px;
    margin: 25px auto 20px auto;
    padding: 0 15px;
}

.search-form {
    background: white;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    overflow: hidden;
}

.search-form input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    font-size: 15px;
    outline: none;
}

.search-form button {
    background: #007aff;
    color: white;
    border: none;
    padding: 0 22px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
}

.search-form button:hover {
    background: #005fc1;
}

/* 板块标题 */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 25px 0 15px 0;
}

.section-title h2 {
    font-size: 20px;
    font-weight: 600;
}

.section-title a {
    color: #007aff;
    text-decoration: none;
    font-size: 13px;
}

.section-title a:hover {
    text-decoration: underline;
}

/* 省份标签 */
.province-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.province-tag {
    background: white;
    padding: 8px 18px;
    border-radius: 30px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: 0.2s;
}

.province-tag.hot {
    background: #ffe5e5;
    color: #ff3b30;
}

.province-tag:hover {
    background: #e9e9e9;
    transform: translateY(-2px);
}

/* 城市网格 */
.city-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.city-card {
    background: white;
    border-radius: 16px;
    padding: 15px;
    text-decoration: none;
    color: #333;
    transition: 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
}

.city-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.city-card:active {
    transform: scale(0.98);
}

.city-card-img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.city-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.city-info {
    flex: 1;
}

.city-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.city-location {
    font-size: 12px;
    color: #888;
}

.city-count {
    font-size: 12px;
    color: #007aff;
    margin-top: 4px;
}

/* 县域卡片网格 */
.county-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.county-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: #333;
    transition: 0.2s;
}

.county-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.county-card:active {
    transform: scale(0.98);
}

.county-card-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: #e0e0e0;
}

.county-card-info {
    padding: 10px 12px;
}

.county-card-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.county-card-info p {
    font-size: 12px;
    color: #888;
}

.county-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

.tag {
    font-size: 10px;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 12px;
    color: #666;
}

/* 景点横向滚动 */
.attraction-scroll {
    overflow-x: auto;
    display: flex;
    gap: 15px;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

.attraction-scroll::-webkit-scrollbar {
    display: none;
}

.attraction-item {
    flex: 0 0 140px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: 0.2s;
}

.attraction-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.attraction-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    background: #e0e0e0;
}

.attraction-info {
    padding: 8px 10px;
}

.attraction-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attraction-info .price {
    font-size: 12px;
    color: #ff6b35;
}

.attraction-info .location {
    font-size: 10px;
    color: #888;
}

/* 桌面端适配 */
@media (min-width: 768px) {
    .city-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .county-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .county-card-img {
        height: 160px;
    }
    
    .attraction-item {
        flex: 0 0 180px;
    }
    
    .attraction-img {
        height: 130px;
    }
    
    .banner {
        padding: 50px 20px 40px 20px;
    }
    
    .banner h1 {
        font-size: 36px;
    }
    
    .banner p {
        font-size: 16px;
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    .stat-label {
        font-size: 14px;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .logo span {
        font-size: 26px;
    }
}

/* 手机端适配 */
@media (max-width: 600px) {
    .stats-grid {
        gap: 10px;
    }
    
    .stat-card {
        padding: 12px 5px;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        gap: 8px;
    }
    
    .stat-number {
        font-size: 18px;
    }
    
    .stat-label {
        font-size: 9px;
    }
    
    .city-grid {
        grid-template-columns: 1fr;
    }
    
    .city-card {
        padding: 12px;
    }
    
    .banner h1 {
        font-size: 22px;
    }
}