/* ============================================
   index.php 专用样式
   ============================================ */

* {
    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: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    flex-wrap: wrap;
}
.logo {
    font-size: 20px;
    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: 22px;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}
.nav-links a {
    text-decoration: none;
    color: #666;
    font-size: 15px;
    padding: 8px 0;
}
.nav-links a.active {
    color: #007aff;
    font-weight: 500;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 12px;
}
.login-btn, .register-btn {
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 14px;
    transition: 0.2s;
    display: inline-block;
}
.login-btn {
    color: #007aff;
    border: 1px solid #007aff;
    background: transparent;
}
.login-btn:active {
    background: #e8f4ff;
}
.register-btn {
    background: #007aff;
    color: white;
    border: 1px solid #007aff;
}
.register-btn:active {
    background: #005fc1;
}
.user-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-greeting {
    font-size: 14px;
    color: #333;
    background: #f5f5f5;
    padding: 6px 12px;
    border-radius: 30px;
    white-space: nowrap;
}
.user-profile-btn, .user-logout-btn {
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    transition: 0.2s;
    white-space: nowrap;
}
.user-profile-btn {
    background: #e8f4ff;
    color: #007aff;
    border: 1px solid #007aff;
}
.user-profile-btn:active {
    background: #d0e8ff;
}
.user-logout-btn {
    background: #fff0f0;
    color: #ff3b30;
    border: 1px solid #ffcdcc;
}
.user-logout-btn:active {
    background: #ffe0e0;
}

/* ========== 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:active {
    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;
}

/* ========== 省份标签 ========== */
.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:active {
    background: #e9e9e9;
}

/* ========== 城市网格 ========== */
.city-grid {
    display: grid;
    grid-template-columns: repeat(3, 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: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(4, 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: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);
}
.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;
}

/* ========== 今日日历卡片 ========== */
.today-calendar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px;
    padding: 20px 24px;
    margin: 20px 0;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: 0 8px 20px rgba(102,126,234,0.25);
}
.calendar-date-box {
    display: flex;
    align-items: center;
    gap: 15px;
}
.calendar-day-number {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}
.calendar-day-week {
    font-size: 16px;
    opacity: 0.9;
}
.calendar-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.3);
}
.calendar-lunar-box {
    text-align: center;
}
.calendar-lunar-label {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 4px;
}
.calendar-lunar-date {
    font-size: 18px;
    font-weight: 500;
}
.calendar-solar {
    font-size: 14px;
    opacity: 0.85;
}

/* ========== 日历卡片链接样式 ========== */
.today-calendar-link {
    text-decoration: none;
    display: block;
    cursor: pointer;
}
.today-calendar-link:active .today-calendar {
    transform: scale(0.98);
    opacity: 0.9;
}

/* ============================================
   联系我们区块
   ============================================ */
.contact-section {
    background: white;
    border-radius: 20px;
    padding: 30px 24px;
    margin-top: 40px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.contact-section .contact-title {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 6px;
    color: #1a1a2e;
}

.contact-section .contact-subtitle {
    font-size: 13px;
    color: #999;
    text-align: center;
    margin-bottom: 24px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.contact-card {
    background: #f8f9fc;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: 0.2s;
}

.contact-card:hover {
    background: #eef3fc;
    transform: translateY(-2px);
}

.contact-card .qr-img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    border-radius: 12px;
    background: white;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.contact-card .contact-icon {
    font-size: 48px;
    margin-bottom: 10px;
    line-height: 1;
}

.contact-card .contact-label {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.contact-card .contact-value {
    font-size: 14px;
    color: #007aff;
    font-weight: 500;
    word-break: break-all;
}

.contact-card .contact-desc {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
    line-height: 1.6;
}

.contact-card a {
    color: #007aff;
    text-decoration: none;
}

.contact-card a:hover {
    text-decoration: underline;
}

/* ========== 友情链接 ========== */
.friend-links {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px dashed #eee;
    text-align: center;
}

.friend-links .friend-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    font-weight: 500;
}

.friend-links .friend-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.friend-links .friend-item {
    display: inline-block;
    padding: 6px 16px;
    background: #f5f7fa;
    border-radius: 20px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    transition: 0.2s;
}

.friend-links .friend-item:hover {
    background: #e8f4ff;
    color: #007aff;
    text-decoration: none;
}

/* 欢迎加入友情链接的提示 */
.friend-links .join-tip {
    margin-top: 14px;
    font-size: 12px;
    color: #bbb;
}

.friend-links .join-tip a {
    color: #007aff;
    text-decoration: none;
}

.friend-links .join-tip a:hover {
    text-decoration: underline;
}

/* ========== 底部 ========== */
.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;
}

/* ========== 桌面端适配 ========== */
@media (min-width: 769px) {
    .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;
    }
    .stat-number {
        font-size: 32px;
    }
    .stat-label {
        font-size: 14px;
    }
    .logo {
        font-size: 24px;
    }
}

/* ========== 平板端适配 ========== */
@media (max-width: 768px) and (min-width: 481px) {
    .city-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .county-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .city-card {
        padding: 12px 10px;
        gap: 10px;
    }
    .city-card-img {
        width: 44px;
        height: 44px;
    }
    .city-name {
        font-size: 14px;
    }
    .city-location {
        font-size: 11px;
    }
    .city-count {
        font-size: 11px;
    }
    .county-card-img {
        height: 110px;
    }
    .county-card-info h3 {
        font-size: 15px;
    }

    /* 联系我们平板适配 */
    .contact-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
    .contact-card .qr-img {
        width: 110px;
        height: 110px;
    }
    .contact-section {
        padding: 24px 18px;
    }
}

/* ========== 手机端适配 ========== */
@media (max-width: 480px) {
    .stats-grid {
        gap: 8px;
    }
    .stat-card {
        padding: 10px 4px;
    }
    .stat-number {
        font-size: 18px;
    }
    .stat-label {
        font-size: 9px;
    }
    
    /* 城市：3列显示 */
    .city-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .city-card {
        padding: 8px 6px;
        flex-direction: column;
        text-align: center;
        gap: 4px;
        border-radius: 12px;
    }
    .city-card-img {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }
    .city-icon {
        font-size: 28px;
    }
    .city-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .city-name {
        font-size: 12px;
        font-weight: 600;
    }
    .city-location {
        font-size: 9px;
        color: #999;
    }
    .city-count {
        font-size: 9px;
        color: #007aff;
        margin-top: 2px;
    }
    
    /* 县域：2列显示 */
    .county-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .county-card-img {
        height: 90px;
    }
    .county-card-info {
        padding: 8px 10px;
    }
    .county-card-info h3 {
        font-size: 14px;
        font-weight: 600;
    }
    .county-card-info p {
        font-size: 11px;
        color: #999;
    }
    .county-card-tags {
        margin-top: 4px;
    }
    .tag {
        font-size: 9px;
        padding: 1px 6px;
    }
    
    /* 景点滚动保持不变 */
    .attraction-item {
        flex: 0 0 120px;
    }
    .attraction-img {
        height: 80px;
    }
    .attraction-info h4 {
        font-size: 12px;
    }
    .attraction-info .price {
        font-size: 11px;
    }
    .attraction-info .location {
        font-size: 9px;
    }
    
    /* 其他元素 */
    .user-buttons {
        gap: 4px;
    }
    .user-greeting {
        display: none;
    }
    .user-profile-btn, .user-logout-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    .today-calendar {
        padding: 12px 14px;
        gap: 8px;
    }
    .calendar-day-number {
        font-size: 28px;
    }
    .calendar-lunar-date {
        font-size: 12px;
    }
    .calendar-divider {
        height: 28px;
    }
    .calendar-solar {
        font-size: 11px;
    }
    .section-title h2 {
        font-size: 16px;
    }
    .section-title a {
        font-size: 11px;
    }
    .banner h1 {
        font-size: 20px;
    }
    .banner p {
        font-size: 12px;
    }
    .banner {
        padding: 30px 15px 20px 15px;
    }
    .province-tag {
        padding: 6px 12px;
        font-size: 12px;
    }
    .province-tags {
        gap: 6px;
    }
    .search-form input {
        padding: 10px 14px;
        font-size: 13px;
    }
    .search-form button {
        padding: 0 16px;
        font-size: 14px;
    }
    .logo {
        font-size: 16px;
    }
    .logo span {
        font-size: 18px;
    }

    /* 联系我们手机适配 */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .contact-card {
        padding: 16px;
    }
    .contact-card .qr-img {
        width: 110px;
        height: 110px;
    }
    .contact-section {
        padding: 20px 16px;
        margin-top: 30px;
    }
    .contact-section .contact-title {
        font-size: 17px;
    }
    .contact-section .contact-subtitle {
        font-size: 12px;
        margin-bottom: 18px;
    }
    .friend-links .friend-item {
        padding: 5px 12px;
        font-size: 12px;
    }
}

/* ========== 超小屏手机（宽度<360px） ========== */
@media (max-width: 359px) {
    .city-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .city-card {
        padding: 6px 4px;
    }
    .city-card-img {
        width: 30px;
        height: 30px;
    }
    .city-name {
        font-size: 11px;
    }
    .city-location {
        font-size: 8px;
    }
    .county-grid {
        gap: 8px;
    }
    .county-card-img {
        height: 75px;
    }
    .county-card-info h3 {
        font-size: 13px;
    }
    .stat-number {
        font-size: 16px;
    }
    .stat-label {
        font-size: 8px;
    }
    .contact-card .qr-img {
        width: 90px;
        height: 90px;
    }
}

/* ========== 手机端导航隐藏 ========== */
@media (max-width: 767px) {
    .header .container {
        flex-wrap: nowrap;
        gap: 8px;
    }
    .logo {
        font-size: 16px;
        flex-shrink: 0;
    }
    .nav-links {
        display: none;
    }
    .user-area {
        margin-left: auto;
    }
    .login-btn, .register-btn {
        padding: 4px 10px;
        font-size: 12px;
    }
    .user-profile-btn, .user-logout-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
}