/*
Theme Name: 卡券屋
Theme URI: https://www.kaquanwu.cn/
Author: 卡券屋
Author URI: https://www.kaquanwu.cn/
Description: 卡券屋主题 - 提供虚拟卡券数字发卡权益货源平台推荐导航功能
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kaquanwu
Tags: one-column, custom-menu, custom-logo, featured-images, translation-ready
*/

/* 强力清除，防止溢出 */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    overflow-y: auto;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s;
}

.home-header {
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.home-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 10px;
    display: flex;
    align-items: center;
    height: 64px;
    width: 100%;
}

.home-header-left {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
}

.home-logo {
    display: flex;
    align-items: center;
    height: 64px;
    flex-shrink: 0;
}

.home-logo-img {
    max-height: 40px;
    width: auto;
    display: block;
}

.home-nav {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.home-nav-item {
    padding: 8px 16px;
    font-size: 14px;
    color: #333;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

.home-nav-item:hover {
    background-color: #e8f0fe;
    color: #1890ff;
}

.home-nav-item.active {
    background-color: #1890ff;
    color: #ffffff;
}

.home-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.home-top-search {
    display: flex;
    align-items: center;
    background-color: #f5f7fa;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    flex-shrink: 0;
}

.home-top-search input {
    padding: 8px 12px;
    border: none;
    background-color: transparent;
    width: 180px;
    font-size: 13px;
    outline: none;
}

.home-top-search button {
    background-color: #1890ff;
    border: none;
    color: #ffffff;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-top-search button:hover {
    background-color: #40a9ff;
}

.home-btn {
    padding: 7px 16px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    white-space: nowrap;
}

.home-btn-primary {
    background-color: #1890ff;
    color: #ffffff;
    border: 1px solid #1890ff;
}

.home-btn-primary:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
}

.home-btn-outline {
    background-color: #ffffff;
    color: #1890ff;
    border: 1px solid #d9d9d9;
}

.home-btn-outline:hover {
    color: #40a9ff;
    border-color: #40a9ff;
}

.home-main {
    padding: 10px 0;
    width: 100%;
}

.front-shell {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 10px;
    width: 100%;
}

/* 顶部区域：海报 + 侧边栏 */
.top-row {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 16px;
    margin-bottom: 0;
    align-items: stretch;
}

/* 底部区域：公告及站点列表 */
.bottom-row {
    width: 100%;
}

/* 侧边栏 */
.home-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

/* 让侧边栏的两个卡片都能填满高度 */
.home-side .side-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-hero-carousel {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0;
    height: auto;
    aspect-ratio: 30/9;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-repeat: no-repeat;
    position: relative;
}

.home-hero-carousel img {
    width: 100%;
    height: 100%;
    display: block;
}

.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide-item.active {
    opacity: 1;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: white;
    transform: scale(1.2);
}

/* 前端弹窗样式 */
.frontend-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.frontend-modal.active {
    display: block;
}

.frontend-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.frontend-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.frontend-modal-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f2f5;
    position: relative;
}

.frontend-modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    text-align: center;
}

.frontend-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.frontend-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.frontend-modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
    line-height: 1.8;
    color: #374151;
}

.frontend-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #f0f2f5;
    text-align: right;
}

.frontend-modal-btn-primary {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(24, 144, 255, 0.3);
}

.frontend-modal-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
}

.carousel-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #ffffff;
    font-size: 24px;
    font-weight: bold;
}

.side-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    width: 100%;
}

.side-card h3 {
    font-size: 15px;
    margin-bottom: 12px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.title-icon {
    color: #1890ff;
}

.side-card form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.side-card input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
}

.side-card input:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.side-card button {
    background-color: #1890ff;
    color: #ffffff;
    border: none;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.side-card button:hover {
    background-color: #40a9ff;
}

.action-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    width: 100%;
}

.action-card-icon {
    width: 36px;
    height: 36px;
    background-color: #e6f7ff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #1890ff;
    font-weight: bold;
    flex-shrink: 0;
}

.action-card-head h3 {
    font-size: 14px;
    margin: 0 0 2px 0;
}

.action-card-head p {
    font-size: 12px;
    color: #666;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-card-head em {
    margin-left: auto;
    background-color: #52c41a;
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-style: normal;
    flex-shrink: 0;
}

.action-card-buttons {
    display: flex;
    gap: 8px;
    width: 100%;
}

.action-card-buttons a {
    flex: 1;
    padding: 8px;
    text-align: center;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-tertiary {
    background-color: #f5f5f5;
    color: #666;
}

.action-tertiary:hover {
    background-color: #e8e8e8;
}

.action-primary {
    background-color: #1890ff;
    color: #ffffff;
}

.action-primary:hover {
    background-color: #40a9ff;
}

.action-secondary {
    background-color: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

.action-secondary:hover {
    background-color: #bae7ff;
}

.notice-bar {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    width: 100%;
}

.notice-bar > div:first-child {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.notice-icon {
    color: #ff4d4f;
}

.notice-bar strong {
    color: #333;
    font-size: 20px;
    font-weight: 700;
}

.notice-slider {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.notice-item {
    color: #333;
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.notice-more {
    color: #1890ff;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}

.notice-more:hover {
    text-decoration: underline;
}

.category-strip {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 12px;
    width: 100%;
}

.promo-slot,
.strip-vacant {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.2s;
    width: 100%;
    min-width: 0;
}

.promo-slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.strip-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.strip-icon.green {
    background-color: #d6f4d9;
    color: #389e0d;
}

.strip-icon.gray {
    background-color: #f5f5f5;
    color: #bfbfbf;
}

.strip-image {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #e5e7eb;
}

.promo-slot div {
    flex: 1;
    min-width: 0;
}

.promo-slot strong,
.strip-vacant strong {
    display: block;
    font-size: 17px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.promo-slot small,
.strip-vacant small {
    display: block;
    font-size: 15px;
    color: #999;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sponsor-banner {
    background: linear-gradient(135deg, #fff7e6 0%, #ffefd5 100%);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    border: 1px solid #ffd591;
    width: 100%;
}

.sponsor-banner > div {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.sponsor-banner span {
    color: #fa8c16;
    font-weight: bold;
    flex-shrink: 0;
}

.sponsor-banner strong {
    color: #d46b08;
    font-size: 16px;
    white-space: nowrap;
}

.sponsor-banner small {
    color: #fa8c16;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sponsor-banner a {
    color: #d46b08;
    font-size: 14px;
    padding: 6px 12px;
    background-color: #ffffff;
    border-radius: 4px;
    border: 1px solid #ffd591;
    white-space: nowrap;
    flex-shrink: 0;
}

.sponsor-banner a:hover {
    background-color: #fff7e6;
}

.content-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    width: 100%;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    width: 100%;
}

.section-heading h2 {
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.section-heading h2 span {
    color: #1890ff;
}

.section-heading a {
    color: #1890ff;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
}

.section-heading a:hover {
    text-decoration: underline;
}

.site-list-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    width: 100%;
}

.site-mini-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    background-color: #fafafa;
    border: 1px solid #f0f0f0;
    transition: all 0.2s;
    width: 100%;
    min-width: 0;
}

.site-mini-card:hover {
    background-color: #f0f7ff;
    border-color: #91d5ff;
    transform: translateY(-2px);
}

.site-avatar {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    background-color: #f0f0f0;
    flex-shrink: 0;
}

.site-mini-card div {
    flex: 1;
    min-width: 0;
}

.site-mini-card strong {
    display: block;
    font-size: 17px;
    color: #333;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.site-mini-card small {
    display: block;
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-footer {
    background-color: #ffffff;
    border-top: 1px solid #e8e8e8;
    padding: 24px 0;
    margin-top: 24px;
    width: 100%;
}

.home-footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.home-footer-info p {
    margin: 4px 0;
    color: #666;
    font-size: 12px;
}

.home-footer-info a {
    color: #666;
}

.home-footer-links {
    display: flex;
    gap: 20px;
}

.home-footer-links a {
    color: #666;
    font-size: 13px;
    white-space: nowrap;
}

.home-footer-links a:hover {
    color: #1890ff;
}

/* 移动端完整适配 */
@media (max-width: 768px) {
    /* 全局调整 */
    .home-container,
    .front-shell {
        padding: 0 12px;
    }
    
    /* 头部优化 */
    .home-header {
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    
    .home-header-left {
        gap: 15px;
    }
    
    .home-logo span {
        font-size: 18px !important;
    }
    
    .home-nav,
    .home-header-right {
        display: none;
    }
    
    .home-mobile-toggle {
        display: block;
        background: none;
        border: none;
        width: 40px;
        height: 40px;
        cursor: pointer;
        position: relative;
    }
    
    .home-mobile-toggle span,
    .home-mobile-toggle span::before,
    .home-mobile-toggle span::after {
        content: '';
        position: absolute;
        width: 24px;
        height: 3px;
        background: #333;
        border-radius: 2px;
        transition: all 0.3s;
    }
    
    .home-mobile-toggle span {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    .home-mobile-toggle span::before {
        top: -8px;
        left: 0;
    }
    
    .home-mobile-toggle span::after {
        top: 8px;
        left: 0;
    }
    
    /* 轮播图高度调整 */
    .home-hero-carousel {
        height: auto;
        aspect-ratio: 30/9;
        border-radius: 12px;
        margin-bottom: 10px;
    }
    
    .home-hero-carousel img {
        width: 100% !important;
        height: 100% !important;
        display: block !important;
    }
    
    /* 侧边栏重新布局 */
    .top-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .home-side {
        flex-direction: column;
    }
    
    .action-card-buttons {
        flex-direction: row;
        gap: 8px;
    }
    
    .action-card-buttons a {
        flex: 1;
        padding: 12px 8px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    /* 广告位调整 - 横向滚动 */
    .category-strip {
        grid-template-columns: none;
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 4px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    .category-strip::-webkit-scrollbar {
        display: none;
    }
    
    .promo-slot,
    .strip-vacant {
        min-width: 160px;
        scroll-snap-align: start;
        border-radius: 12px;
        padding: 16px 12px;
    }
    
    /* 公告栏调整 */
    .notice-bar {
        padding: 12px;
        border-radius: 12px;
        flex-wrap: wrap;
    }
    
    .notice-bar strong {
        font-size: 15px;
    }
    
    .notice-item {
        font-size: 14px;
    }
    
    .notice-more {
        font-size: 13px;
    }
    
    /* 广告位调整 */
    .promo-slot strong,
    .strip-vacant strong {
        font-size: 15px;
    }
    
    .promo-slot small,
    .strip-vacant small {
        font-size: 12px;
    }
    
    /* 赞助商横幅 */
    .sponsor-banner {
        padding: 16px 12px;
        border-radius: 12px;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .sponsor-banner a {
        flex: 1;
        text-align: center;
        width: 100%;
    }
    
    /* 内容卡片优化 */
    .content-card {
        padding: 16px 12px;
        border-radius: 12px;
    }
    
    .section-heading h2 {
        font-size: 18px;
    }
    
    /* 站点列表 - 移动端2列 */
    .site-list-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .site-mini-card {
        padding: 14px 12px;
        border-radius: 12px;
        flex-direction: column;
        text-align: center;
    }
    
    .site-avatar {
        width: 56px;
        height: 56px;
        border-radius: 12px;
    }
    
    .site-mini-card strong {
        font-size: 16px;
        margin-top: 8px;
        font-weight: 500;
    }
    
    /* 底部优化 */
    .home-footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        padding: 20px 0;
    }
    
    .home-footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px 20px;
    }
}

@media (max-width: 480px) {
    /* 超小屏幕优化 */
    .home-logo span {
        font-size: 16px !important;
    }
    
    .home-hero-carousel {
        height: 100px;
        aspect-ratio: 30/9;
    }
    
    /* 站点列表单列 */
    .site-list-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .site-mini-card {
        flex-direction: row;
        text-align: left;
        padding: 16px;
    }
    
    .site-avatar {
        width: 48px;
        height: 48px;
    }
    
    .site-mini-card strong {
        margin-top: 0;
    }
    
    /* 广告位单列卡片 */
    .promo-slot,
    .strip-vacant {
        min-width: 100%;
    }
    
    /* 轮播图箭头更小 */
    .carousel-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
    
    /* 表单弹窗优化 */
    .frontend-modal-content {
        width: 95%;
        max-width: 400px;
        border-radius: 16px;
    }
    
    /* 公告栏更紧凑 */
    .notice-bar {
        padding: 10px 12px;
    }
}

/* 移动端特定交互优化 */
@media (hover: none) and (pointer: coarse) {
    .site-mini-card:active,
    .promo-slot:active {
        transform: scale(0.98);
    }
    
    .site-mini-card,
    .promo-slot {
        -webkit-tap-highlight-color: transparent;
    }
}

/* 移动端导航菜单样式 */
.mobile-nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 999;
    display: none;
    border-top: 1px solid #f0f0f0;
}

.mobile-nav-menu.active {
    display: block;
}

.mobile-nav-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    background: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    transition: all 0.2s ease;
}

.mobile-nav-item-active {
    background: #1890ff !important;
    color: white !important;
}

.mobile-nav-item:active {
    background: #e5e7eb;
}

.mobile-nav-item-active:active {
    background: #096dd9 !important;
}

.mobile-nav-menu a.home-btn-primary {
    margin: 12px;
    padding: 12px;
    text-align: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #1890ff 0%, #0070f3 100%);
    color: white;
    font-weight: 600;
}

/* 移动端滚动优化 */
html, body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* 移动端详情页适配 */
@media (max-width: 768px) {
    .site-detail-page {
        padding: 15px !important;
        margin: 40px auto !important;
    }
    
    .site-detail-page > div {
        padding: 30px 20px !important;
        border-radius: 12px !important;
    }
    
    .site-detail-page h2 {
        font-size: 22px !important;
    }
    
    .site-detail-page > div > div:last-child {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .site-detail-page > div > div:last-child a {
        width: 100% !important;
        padding: 14px 20px !important;
    }
    
    /* 列表页适配 */
    .site-list-page {
        padding: 15px !important;
    }
    
    .site-list-page .category-tabs {
        display: flex !important;
        overflow-x: auto !important;
        gap: 8px !important;
        padding: 4px 0 !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .site-list-page .category-tabs::-webkit-scrollbar {
        display: none !important;
    }
    
    .site-list-page .category-tabs a {
        flex-shrink: 0 !important;
        padding: 10px 16px !important;
        scroll-snap-align: start !important;
        border-radius: 8px !important;
        font-size: 14px !important;
    }
    
    .site-list-page .site-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    .site-list-page .site-card {
        border-radius: 12px !important;
        padding: 14px !important;
    }
    
    .site-list-page .site-avatar {
        width: 48px !important;
        height: 48px !important;
        border-radius: 10px !important;
    }
    
    /* 提交表单适配 */
    .site-submit-page {
        padding: 15px !important;
    }
    
    .site-submit-page .submit-box {
        padding: 20px !important;
        border-radius: 12px !important;
    }
    
    .site-submit-page h2 {
        font-size: 20px !important;
        margin-bottom: 20px !important;
    }
    
    .site-submit-page input,
    .site-submit-page select,
    .site-submit-page textarea {
        padding: 12px !important;
        font-size: 15px !important;
        border-radius: 8px !important;
    }
    
    .site-submit-page .submit-btn {
        padding: 14px 24px !important;
        font-size: 16px !important;
        width: 100% !important;
        border-radius: 8px !important;
    }
    
    /* 详情页侧边栏适配 */
    .site-detail-content {
        display: block !important;
        gap: 15px !important;
    }
    
    .site-info-sidebar {
        margin-top: 15px !important;
        border-radius: 12px !important;
    }
    
    .site-detail-main {
        border-radius: 12px !important;
    }
    
    /* 优化触摸交互 */
    .site-card,
    .category-tabs a {
        -webkit-tap-highlight-color: transparent !important;
    }
    
    .site-card:active {
        transform: scale(0.98) !important;
    }
}

@media (max-width: 480px) {
    .site-list-page .site-grid {
        grid-template-columns: 1fr !important;
    }
    
    .site-list-page .site-card {
        flex-direction: row !important;
        padding: 16px !important;
    }
}
