/*
 * Theme Name: WebStack
 * Theme URI: https://www.iotheme.cn/
 * Description: 移动端响应式样式 - 专门针对移动设备的样式优化
 * Version: 1.0.0
 */

/* ===== PC端隐藏移动端元素 ===== */
/* 默认情况下隐藏所有移动端元素 */
.mobile-menu-toggle,
.mobile-nav-overlay,
.mobile-nav-menu,
.mobile-header-title {
    display: none !important;
}

/* PC端重置间距 - 确保没有额外的顶部空白 */
@media (min-width: 769px) {
    .page-container {
        padding-top: 0 !important;
    }
    
    .hero-section {
        margin-top: 0 !important;
    }
}

/* ===== 移动端基础样式重置 ===== */
@media (max-width: 768px) {
    /* 显示移动端导航元素 */
    .mobile-menu-toggle,
    .mobile-nav-overlay,
    .mobile-nav-menu,
    .mobile-header-title {
        display: block !important;
    }
    
    /* 强制移动端布局 */
    html, body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        position: relative !important;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    /* 基础元素盒模型设置 */
    * {
        box-sizing: border-box !important;
    }
    
    /* 防止内容溢出 */
    .main-content {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* 图片和媒体元素 */
    img, video, iframe, embed, object {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* 表格处理 */
    table {
        max-width: 100% !important;
        overflow-x: auto !important;
        display: block !important;
    }
    
    /* 网格布局的row不需要flex单列处理 */
    /* 让homepage-grid.css的网格布局生效 */
    .sites-list .row,
    .latest-sites-container .row,
    .category-tabs-container .row,
    .taxonomy-favorites .row {
        /* 由homepage-grid.css控制 */
    }
    
    /* 只对非网格布局的通用row应用单列 */
    .row {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: wrap !important;
        margin: 0 !important;
    }
    
    .row > * {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 15px !important;
    }
    
    /* 但是网格容器内的row要恢复grid布局 */
    .sites-list .row,
    .latest-sites-container .row,
    .category-tabs-container .row,
    .taxonomy-favorites .row,
    .fav-content .row,
    .row.sites-row {
        display: grid !important;
        /* grid设置由homepage-grid.css控制 */
        flex-direction: unset !important;
        flex-wrap: unset !important;
    }
    
    /* 网格容器内的元素不应用flex设置 */
    .sites-list .row > *,
    .latest-sites-container .row > *,
    .category-tabs-container .row > *,
    .taxonomy-favorites .row > *,
    .fav-content .row > *,
    .row.sites-row > * {
        flex: unset !important;
        max-width: unset !important;
        margin-bottom: 0 !important;
    }
    
    /* 卡片样式 */
    .xe-card {
        margin-bottom: 15px !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* 容器优化 */
    .container, .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .latest-sites-container {
        padding: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* 侧边栏移动端样式 */
    .sidebar-menu {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 280px !important;
        height: 100% !important;
        z-index: 1001 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
        background: white !important;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1) !important;
        overflow-y: auto !important;
    }
    
    /* 主内容区域全宽 
        padding: 0 15px !important;*/
    .main-content {
        margin-left: 0 !important;
        margin-top: 0 !important;
        width: 100% !important;
    }
    
    /* 移动端显示移动端元素 */
    .mobile-menu-toggle {
        display: flex !important;
        position: fixed !important;
        top: 10px !important; /* 调整到与标题栏内容垂直居中对齐 */
        right: 20px !important;
        z-index: 999 !important; /* 降低z-index，避免挡住其他内容 */
        background: #a27dff !important;
        color: white !important;
        border: none !important;
        border-radius: 50% !important;
        width: 50px !important;
        height: 50px !important;
        font-size: 20px !important;
        cursor: pointer !important;
        box-shadow: 0 4px 12px rgba(162, 125, 255, 0.3) !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* 移动端顶部标题栏 */
    .mobile-header-title {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 70px !important;
        background: #c19ff9 !important;
        border-bottom: 1px solid #e4ecf3 !important;
        z-index: 998 !important;
        align-items: center !important;
        padding: 0 20px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    .mobile-logo {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
    }
    
    .mobile-logo-icon {
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        transition: all 0.3s ease !important;
        filter: drop-shadow(0 2px 6px rgba(139, 92, 246, 0.15)) !important;
    }
    
    .mobile-logo-icon svg {
        width: 100% !important;
        height: 100% !important;
        transition: all 0.3s ease !important;
    }
    
    /* 移动端图标悬停效果 */
    .mobile-logo:hover .mobile-logo-icon {
        filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.3)) !important;
        transform: scale(1.05) !important;
    }
    
    .mobile-logo:hover .mobile-logo-icon svg circle:nth-child(1) {
        transform: scale(1.1) !important;
    }
    
    .mobile-logo:hover .mobile-logo-icon svg line {
        opacity: 0.8 !important;
        stroke-width: 2.5 !important;
    }
    
    .mobile-logo-text {
        font-size: 20px !important;
        font-weight: 700 !important;
        color: #1f2937 !important;
    }
    
    /* 移动端logo链接样式 */
    .mobile-logo-link {
        text-decoration: none !important;
        color: inherit !important;
        display: flex !important;
        align-items: center !important;
        transition: all 0.3s ease !important;
    }
    
    .mobile-logo-link:hover {
        text-decoration: none !important;
        color: inherit !important;
    }
    
    .mobile-logo-link:focus {
        outline: none !important;
        text-decoration: none !important;
        color: inherit !important;
    }
    
    .mobile-logo-link:active {
        text-decoration: none !important;
        color: inherit !important;
    }
    
    /* 调整主内容区域，为移动端header留出空间 */
    .page-container {
        padding-top: 70px !important;
    }
    
    /* 调整hero section的顶部间距 
    
        .hero-section {
        margin-top: 70px !important;
    }
    */

    
    /* 移动端导航遮罩层 */
    .mobile-nav-overlay {
        display: none !important; /* 默认隐藏，不阻止点击 */
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: rgba(0, 0, 0, 0.5) !important;
        z-index: 1000 !important;
        opacity: 0 !important;
        transition: opacity 0.3s ease !important;
        pointer-events: none !important; /* 确保不阻止点击 */
    }
    
    /* 激活时显示遮罩层 */
    .mobile-nav-overlay.active {
        display: block !important;
        opacity: 1 !important;
        pointer-events: auto !important; /* 激活时可以点击 */
    }
    

    
    /* 移动端激活状态 */
    .sidebar-menu.mobile-active {
        transform: translateX(0) !important;
    }
    
    /* 左侧导航栏头部样式 */
    .sidebar-menu .logo-env {
        padding: 15px 20px !important;
        border-bottom: 1px solid #e4ecf3 !important;
        background: #f8f9fa !important;
    }
    
    .sidebar-menu .logo {
        margin-bottom: 10px !important;
    }
    
    .sidebar-menu .logo-expanded {
        display: block !important;
    }
    
    .sidebar-menu .logo-collapsed {
        display: none !important;
    }
    
    /* 调整Logo容器布局 */
    .sidebar-menu .logo-container {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        justify-content: flex-start !important;
    }
    
    /* 调整Logo图片大小 */
    .sidebar-menu .logo-image {
        height: 28px !important;
        width: auto !important;
        flex-shrink: 0 !important;
    }
    
    /* 调整Logo文字大小和样式 */
    .sidebar-menu .logo-text {
        font-size: 16px !important;
        font-weight: 700 !important;
        color: #1f2937 !important;
        line-height: 1.2 !important;
        flex: 1 !important;
    }
    
    /* 左侧导航栏内容样式 */
    .sidebar-menu .sidebar-menu-inner {
        padding: 0 !important;
    }
    
    .sidebar-menu .main-menu {
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
    }
    
    .sidebar-menu .main-menu li {
        border-bottom: 1px solid #f0f0f0 !important;
    }
    
    .sidebar-menu .main-menu a {
        display: flex !important;
        align-items: center !important;
        padding: 16px 20px !important;
        color: #374151 !important;
        text-decoration: none !important;
        font-size: 16px !important;
        transition: all 0.3s ease !important;
        gap: 12px !important;
    }
    
    .sidebar-menu .main-menu a:hover {
        color: #8B5CF6 !important;
        background: #f3f4f6 !important;
    }
    
    .sidebar-menu .main-menu a i {
        width: 20px !important;
        text-align: center !important;
        color: #6b7280 !important;
        font-size: 16px !important;
    }
    
    .sidebar-menu .main-menu a:hover i {
        color: #8B5CF6 !important;
    }
    
    .sidebar-menu .main-menu .title {
        flex: 1 !important;
        font-weight: 500 !important;
    }
    
    /* 下拉菜单样式 */
    .sidebar-menu .main-menu ul {
        background: #f9fafb !important;
        padding-left: 0 !important;
        margin: 0 !important;
        list-style: none !important;
    }
    
    .sidebar-menu .main-menu ul li {
        border-bottom: none !important;
    }
    
    .sidebar-menu .main-menu ul a {
        padding: 12px 20px 12px 52px !important;
        font-size: 14px !important;
        color: #6b7280 !important;
        background: transparent !important;
    }
    
    .sidebar-menu .main-menu ul a:hover {
        color: #8B5CF6 !important;
        background: #f3f4f6 !important;
    }
    
    /* 提交网站按钮特殊样式 */
    .sidebar-menu .submit-tag a {
        background: #8B5CF6 !important;
        color: white !important;
        margin: 20px !important;
        border-radius: 8px !important;
        justify-content: center !important;
    }
    
    .sidebar-menu .submit-tag a:hover {
        background: #7c3aed !important;
        color: white !important;
    }
    
    .sidebar-menu .submit-tag a i {
        color: white !important;
    }
    
    /* 下拉指示器样式 */
    .sidebar-menu .dropdown-indicator {
        color: #9ca3af !important;
        font-size: 12px !important;
        transition: transform 0.3s ease !important;
    }
    
    .sidebar-menu .main-menu a:hover .dropdown-indicator {
        color: #8B5CF6 !important;
    }
    
    /* 移动端底部导航样式 */
    .sidebar-menu .mobile-bottom-nav a {
        background: #f9fafb !important;
        border-top: 1px solid #e5e7eb !important;
        color: #6b7280 !important;
    }
    
    .sidebar-menu .mobile-bottom-nav a:hover {
        background: #f3f4f6 !important;
        color: #8B5CF6 !important;
    }
    
    /* 移动端导航菜单 */
    .mobile-nav-menu {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        right: -280px !important;
        width: 280px !important;
        height: 100% !important;
        background: white !important;
        z-index: 1001 !important;
        transition: right 0.3s ease !important;
        overflow-y: auto !important;
        padding: 20px 0 !important;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1) !important;
    }
    
    .mobile-nav-menu.active {
        right: 0 !important;
    }
    
    .mobile-nav-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0 20px 20px 20px !important;
        border-bottom: 1px solid #f0f0f0 !important;
        margin-bottom: 20px !important;
    }
    
    .mobile-nav-header h3 {
        margin: 0 !important;
        font-size: 18px !important;
        color: #333 !important;
        font-weight: 600 !important;
    }
    
    .mobile-nav-close {
        background: none !important;
        border: none !important;
        font-size: 20px !important;
        color: #666 !important;
        cursor: pointer !important;
        padding: 5px !important;
        border-radius: 4px !important;
        transition: all 0.3s ease !important;
    }
    
    .mobile-nav-close:hover {
        background: #f0f0f0 !important;
        color: #333 !important;
    }
    
    .mobile-nav-content {
        padding: 0 20px !important;
    }
    
    /* 移动端主导航菜单样式 */
    .mobile-nav-menu .mobile-main-menu {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .mobile-nav-menu .mobile-nav-item {
        border-bottom: 1px solid #f0f0f0 !important;
    }
    
    .mobile-nav-menu .mobile-nav-link {
        padding: 15px 0 !important;
        height: auto !important;
        border-bottom: none !important;
        font-size: 16px !important;
        color: #333 !important;
        display: block !important;
        text-decoration: none !important;
        transition: all 0.3s ease !important;
    }
    
    .mobile-nav-menu .mobile-nav-link:hover {
        background: none !important;
        color: #8B5CF6 !important;
    }
    
    .mobile-nav-menu .mobile-nav-link i {
        width: 20px !important;
        text-align: center !important;
        color: #6b7280 !important;
        font-size: 16px !important;
        margin-right: 12px !important;
    }
    
    .mobile-nav-menu .mobile-nav-link:hover i {
        color: #8B5CF6 !important;
    }
    
    /* 移动端下拉菜单样式 */
    .mobile-nav-menu .mobile-main-menu ul {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        background: #f8f9fa !important;
        margin: 0 !important;
        padding: 0 !important;
        display: none !important;
    }
    
    .mobile-nav-menu .mobile-main-menu ul.show {
        display: block !important;
    }
    
    .mobile-nav-menu .mobile-main-menu ul a {
        padding: 12px 20px !important;
        font-size: 14px !important;
        text-decoration: none !important;
        border-bottom: 1px solid #f0f0f0 !important;
        padding-left: 52px !important;
    }
    
    .mobile-nav-menu .mobile-main-menu ul a:hover {
        background: #f0f0f0 !important;
        color: #333 !important;
    }
    
    /* 移动端AI导航区域样式 */
    .mobile-ai-nav-section {
        margin-bottom: 30px !important;
        border-bottom: 2px solid #f0f0f0 !important;
        padding-bottom: 20px !important;
    }
    
    .mobile-ai-nav-header {
        margin-bottom: 15px !important;
        padding: 0 0 10px 0 !important;
        border-bottom: 1px solid #e5e7eb !important;
    }
    
    .mobile-ai-nav-header h4 {
        margin: 0 !important;
        font-size: 18px !important;
        font-weight: 600 !important;
        color: #374151 !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
    
    .mobile-ai-nav-header h4 i {
        color: #8B5CF6 !important;
        font-size: 20px !important;
    }
    
    .mobile-ai-nav-list {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .mobile-ai-nav-item {
        border-bottom: 1px solid #f3f4f6 !important;
        margin-bottom: 0 !important;
    }
    
    .mobile-ai-nav-item:last-child {
        border-bottom: none !important;
    }
    
    .mobile-ai-nav-link {
        display: flex !important;
        align-items: center !important;
        padding: 16px 0 !important;
        text-decoration: none !important;
        color: #4b5563 !important;
        font-size: 16px !important;
        font-weight: 500 !important;
        transition: all 0.3s ease !important;
        position: relative !important;
    }
    
    .mobile-ai-nav-link:hover {
        color: #8B5CF6 !important;
        background: none !important;
        transform: translateX(5px) !important;
    }
    
    .mobile-ai-nav-link i {
        width: 24px !important;
        text-align: center !important;
        margin-right: 12px !important;
        font-size: 18px !important;
        color: #6b7280 !important;
        transition: color 0.3s ease !important;
    }
    
    .mobile-ai-nav-link:hover i {
        color: #8B5CF6 !important;
    }
    
    .mobile-ai-nav-link span {
        flex: 1 !important;
        font-weight: 500 !important;
    }
    
    /* AI导航链接的悬停效果 */
    .mobile-ai-nav-link::after {
        content: '' !important;
        position: absolute !important;
        right: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 0 !important;
        height: 2px !important;
        background: #8B5CF6 !important;
        transition: width 0.3s ease !important;
    }
    
    .mobile-ai-nav-link:hover::after {
        width: 20px !important;
    }
    
    /* 左侧导航栏下拉菜单样式 */
    .sidebar-menu .dropdown-menu {
        display: none !important;
        background: #f8f9fa !important;
        padding-left: 20px !important;
        border-left: 3px solid #a27dff !important;
        margin-left: 10px !important;
        transition: all 0.3s ease !important;
    }
    
    .sidebar-menu .dropdown-menu.show {
        display: block !important;
        animation: slideDown 0.3s ease !important;
    }
    
    .sidebar-menu .dropdown-menu li {
        border-bottom: none !important;
    }
    
    .sidebar-menu .dropdown-menu a {
        padding: 10px 0 !important;
        font-size: 14px !important;
        color: #666 !important;
        transition: color 0.3s ease !important;
    }
    
    .sidebar-menu .dropdown-menu a:hover {
        color: #a27dff !important;
        padding-left: 10px !important;
    }
    
    /* 下拉菜单动画 */
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* 箭头动画 */
    .sidebar-menu .nav-link .fa-chevron-down,
    .sidebar-menu .dropdown-toggle .fa-chevron-down {
        transition: transform 0.3s ease !important;
        margin-left: 5px !important;
    }
    
    /* 移动端隐藏PC端导航元素 */
    .sidebar-menu .mobile-menu-toggle.visible-xs {
        display: none !important;
    }
    
    /* 移动端顶部导航栏 */
    .mobile-top-nav {
        display: none !important;
    }
    

    
    .mobile-nav-content .dropdown.show .nav-link .fa-chevron-down {
        transform: rotate(180deg) !important;
    }
}

/* ===== 移动端头部横幅优化 ===== */
@media (max-width: 768px) {
    .header-banner {
        display: none !important;
    }
    
    /* 确保移动端不显示任何header-banner相关元素 */
    .banner-container,
    .banner-nav,
    .nav-menu,
    .nav-item,
    .nav-link,
    .dropdown-menu {
        display: none !important;
    }
}

/* ===== 移动端英雄区域优化 ===== */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem !important;
        text-align: center !important;
    }
    
    .hero-section h1 {
        font-size: 28px !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-section p {
        font-size: 16px !important;
        line-height: 1.6 !important;
        margin-bottom: 1.5rem !important;
    }
    
    .hero-nav-list {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        gap: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        /* 移除grid布局 */
        grid-template-columns: none !important;
        grid-template-rows: none !important;
        grid-auto-flow: unset !important;
        grid: none !important;
    }
    
    .hero-nav {
        margin-bottom: 60px !important;
    }
    
    .hero-nav-item {
        margin: 0 !important;
        flex: 1 !important;
        min-width: 0 !important;
        text-align: center !important;
        /* 移除grid相关属性 */
        grid-column: unset !important;
        grid-row: unset !important;
        grid-area: unset !important;
    }
    
    .hero-nav-item a {
        padding: 12px 8px !important;
        font-size: 14px !important;
        border-radius: 8px !important;
    }
}

/* ===== 移动端分类标签优化 ===== */
@media (max-width: 768px) {
    .category-tabs {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .category-tabs .nav-tabs {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    
    .category-tabs .nav-tabs .nav-link {
        padding: 8px 12px !important;
        font-size: 14px !important;
        margin-bottom: 8px !important;
    }
}

/* ===== 移动端网站卡片优化 ===== */
@media (max-width: 768px) {
    .site-card {
        margin-bottom: 15px !important;
        border-radius: 12px !important;
        overflow: hidden !important;
    }
    
    .site-card .site-info {
        padding: 15px !important;
    }
    
    .site-card .site-title {
        font-size: 16px !important;
        line-height: 1.4 !important;
        margin-bottom: 8px !important;
    }
    
    .site-card .site-desc {
        font-size: 14px !important;
        line-height: 1.5 !important;
        margin-bottom: 10px !important;
    }
    
    .site-card .site-meta {
        font-size: 12px !important;
    }
}

/* ===== 移动端搜索框优化 ===== */
@media (max-width: 768px) {
    .search-form {
        margin: 1rem 0 !important;
    }
    
    .search-form .form-control {
        font-size: 16px !important;
        padding: 12px 15px !important;
        border-radius: 25px !important;
    }
    
    .search-form .btn {
        padding: 12px 20px !important;
        border-radius: 25px !important;
        font-size: 16px !important;
    }
    
    /* 移动端导航搜索框样式 */
    .mobile-search-section {
        margin-bottom: 20px !important;
        padding: 0 0 20px 0 !important;
        border-bottom: 1px solid #f0f0f0 !important;
    }
    
    .mobile-search-form {
        width: 100% !important;
    }
    
    .mobile-search-input-wrapper {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        background: #f8f9fa !important;
        border-radius: 25px !important;
        border: 1px solid #e9ecef !important;
        overflow: hidden !important;
    }
    
    .mobile-search-icon {
        position: absolute !important;
        left: 15px !important;
        color: #6b7280 !important;
        font-size: 16px !important;
        z-index: 2 !important;
    }
    
    .mobile-search-input {
        flex: 1 !important;
        padding: 12px 15px 12px 45px !important;
        border: none !important;
        background: transparent !important;
        font-size: 16px !important;
        color: #333 !important;
        outline: none !important;
        min-height: 44px !important;
    }
    
    .mobile-search-input::placeholder {
        color: #9ca3af !important;
    }
    
    .mobile-search-btn {
        padding: 12px 15px !important;
        background: #8B5CF6 !important;
        border: none !important;
        color: white !important;
        font-size: 16px !important;
        cursor: pointer !important;
        transition: background-color 0.3s ease !important;
        min-height: 44px !important;
        min-width: 44px !important;
    }
    
    .mobile-search-btn:hover {
        background: #7c3aed !important;
    }
    
    .mobile-search-btn:active {
        background: #6d28d9 !important;
    }
    
    /* 移动端消息提示样式 */
    .mobile-message {
        position: fixed !important;
        top: 20px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        background: white !important;
        color: #333 !important;
        padding: 12px 20px !important;
        border-radius: 8px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
        z-index: 10000 !important;
        font-size: 14px !important;
        max-width: 90% !important;
        text-align: center !important;
        border-left: 4px solid #8B5CF6 !important;
    }
    
    .mobile-message-info {
        border-left-color: #3b82f6 !important;
    }
    
    .mobile-message-warning {
        border-left-color: #f59e0b !important;
    }
    
    .mobile-message-error {
        border-left-color: #ef4444 !important;
    }
}

/* ===== 移动端页脚优化 ===== */
@media (max-width: 768px) {
    .footer {
        padding: 2rem 1rem !important;
        text-align: center !important;
    }
    
    .footer .footer-content {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .footer .footer-section {
        width: 100% !important;
        margin-bottom: 1rem !important;
    }
}

/* ===== 移动端触摸优化 ===== */
@media (max-width: 768px) {
    /* 触摸反馈 */
    .xe-card, .hero-nav-item a, .engine-btn, button, a {
        -webkit-tap-highlight-color: transparent !important;
        touch-action: manipulation !important;
    }
    
    /* 触摸时的视觉反馈 */
    .xe-card:active, .hero-nav-item a:active, .engine-btn:active {
        transform: scale(0.98) !important;
        transition: transform 0.1s ease !important;
    }
    
    /* 滚动优化 */
    .hero-nav-list, .sites-list {
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
    }
    
    /* 按钮触摸优化 */
    button, .btn {
        min-height: 44px !important;
        min-width: 44px !important;
    }
}

/* ===== 移动端字体大小优化 ===== */
@media (max-width: 768px) {
    body {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }
    
    h1 {
        font-size: 24px !important;
        line-height: 1.3 !important;
    }
    
    h2 {
        font-size: 20px !important;
        line-height: 1.4 !important;
    }
    
    h3 {
        font-size: 18px !important;
        line-height: 1.4 !important;
    }
    
    h4 {
        font-size: 16px !important;
        line-height: 1.4 !important;
    }
    
    p {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }
}

/* ===== 移动端间距优化 ===== */
@media (max-width: 768px) {
    .container, .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .section {
        margin-bottom: 2rem !important;
        padding: 1rem !important;
    }
    
    .card, .xe-card {
        margin-bottom: 15px !important;
    }
    
    .btn {
        margin-bottom: 10px !important;
    }
}

/* ===== 移动端AI导航额外优化 ===== */
@media (max-width: 480px) {
    .mobile-ai-nav-section {
        margin-bottom: 25px !important;
        padding-bottom: 15px !important;
    }
    
    .mobile-ai-nav-header h4 {
        font-size: 16px !important;
    }
    
    .mobile-ai-nav-header h4 i {
        font-size: 18px !important;
    }
    
    .mobile-ai-nav-link {
        padding: 14px 0 !important;
        font-size: 15px !important;
    }
    
    .mobile-ai-nav-link i {
        width: 22px !important;
        font-size: 16px !important;
        margin-right: 10px !important;
    }
}

@media (max-width: 360px) {
    .mobile-ai-nav-section {
        margin-bottom: 20px !important;
        padding-bottom: 12px !important;
    }
    
    .mobile-ai-nav-header {
        margin-bottom: 12px !important;
        padding-bottom: 8px !important;
    }
    
    .mobile-ai-nav-header h4 {
        font-size: 15px !important;
    }
    
    .mobile-ai-nav-header h4 i {
        font-size: 16px !important;
    }
    
    .mobile-ai-nav-link {
        padding: 12px 0 !important;
        font-size: 14px !important;
    }
    
    .mobile-ai-nav-link i {
        width: 20px !important;
        font-size: 15px !important;
        margin-right: 8px !important;
    }
}

/* ===== 移动端特殊优化 ===== */
@media (max-width: 480px) {
    /* 超小屏幕优化 */
    .hero-nav-list {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        gap: 0 !important;
        /* 移除grid布局 */
        grid-template-columns: none !important;
        grid-template-rows: none !important;
        grid-auto-flow: unset !important;
        grid: none !important;
    }
    
    .mobile-nav-menu {
        width: 100% !important;
        right: -100% !important;
    }
    

    
    .hero-section h1 {
        font-size: 24px !important;
    }
    
    .container, .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* ===== 移动端动画优化 ===== */
@media (max-width: 768px) {
    /* 减少动画复杂度 */
    * {
        animation-duration: 0.2s !important;
        transition-duration: 0.2s !important;
    }
    
    /* 禁用不必要的动画 */
    .fade, .collapse {
        transition: none !important;
    }
}

/* ===== 移动端打印样式 ===== */
@media print {
    .mobile-menu-toggle,
    .mobile-nav-overlay,
    .mobile-nav-menu {
        display: none !important;
    }
    
    .sidebar-menu {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
} 

/* ===== 移动端侧边栏优化显示 ===== */
@media (max-width: 768px) {
    /* 移动端侧边栏显示优化 */
    .sidebar {
        display: block !important;
        margin-top: 2rem !important;
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    /* 侧边栏小部件在移动端正常显示 */
    .sidebar-widget,
    .tools-widget,
    .latest-widget,
    .latest-articles-widget {
        display: block !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* 热门工具网格在移动端显示 */
    .hot-tools-grid,
    .hot-tool-card,
    .tool-card-link,
    .tool-card-icon,
    .tool-card-title {
        display: block !important;
    }
    
    /* 最新收录网格在移动端显示 */
    .latest-sites-grid,
    .latest-site-card,
    .site-card-link,
    .site-card-icon,
    .site-card-title {
        display: block !important;
    }
    
    /* 最新文章列表在移动端显示 */
    .latest-articles-list,
    .latest-article-item,
    .article-link,
    .article-thumbnail,
    .article-icon,
    .article-info,
    .article-title,
    .article-meta,
    .article-date,
    .article-source {
        display: block !important;
    }
    
    /* 小部件标题在移动端显示 */
    .widget-title {
        display: block !important;
    }
    
    /* 主内容区域在移动端全宽显示 */
    .main-content,
    .col-lg-8,
    .col-md-12 .col-lg-8,
    .single-ai-news .col-lg-8 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    /* 确保内容容器全宽 */
    .container .row > .col-lg-8,
    .container .row > .col-md-12 .col-lg-8,
    .single-ai-news .container .row > .col-lg-8 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    /* 无内容提示在移动端显示 */
    .no-tools,
    .no-sites,
    .no-articles {
        display: block !important;
    }
} 