@charset "UTF-8";

/* 弹窗样式 */
.modal-overlay {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.modal-content {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
}

.modal-overlay input,
.modal-overlay select,
.modal-overlay textarea {
    font-size: 16px !important;
}

.modal-overlay input:focus,
.modal-overlay select:focus,
.modal-overlay textarea:focus {
    outline: none;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FF6B35;
    --secondary-color: #F7C59F;
    --accent-color: #2EC4B6;
    --text-primary: #2D3436;
    --text-secondary: #636E72;
    --text-muted: #B2BEC3;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-card: #FFFFFF;
    --border-color: #E9ECEF;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

/* 弹窗样式 v2.8.2 */
.modal-overlay {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.modal-overlay .modal-content {
    margin: auto !important;
    transform: none !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
}

.modal-overlay .form-group label {
    font-size: 14px;
}

.modal-overlay input:focus,
.modal-overlay select:focus,
.modal-overlay textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 顶部导航栏 */
.header {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 16px;
}

.logo-section {
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.logo:hover {
    opacity: 0.8;
}

.logo-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    object-fit: contain;
    background: white;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #4A90E2, #357ABD);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #1a5490, #3d7ab8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 导航菜单 */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-link {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: rgba(255, 107, 53, 0.08);
}

/* 搜索框 */
.search-box {
    position: relative;
    width: 280px;
    flex-shrink: 0;
}

.search-box input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: var(--transition);
    background: var(--bg-primary);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.search-btn:hover {
    opacity: 1;
}

/* Hero区域 */
.hero {
    background: linear-gradient(135deg, #1a5490 0%, #3d7ab8 100%);
    padding: 60px 0;
    text-align: center;
    color: white;
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 32px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
}

/* 主内容区 */
.main-content {
    padding: 40px 0;
}

/* 分类区块 */
.category-section {
    margin-bottom: 48px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    font-size: 24px;
}

.section-count {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
}

/* 子分类标签 */
.sub-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sub-tag {
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-primary);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.sub-tag:hover,
.sub-tag.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 卡片网格 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* 网站卡片 */
.site-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.site-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.site-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.site-card:hover::before {
    transform: scaleX(1);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.site-favicon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.site-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.site-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.site-tag {
    padding: 3px 8px;
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.visit-btn {
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--primary-color), #ff8555);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}

.visit-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* 页脚 */
.footer {
    background: #2d3436;
    color: white;
    padding: 48px 0 24px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}

.footer-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: white;
}

.footer-section p,
.footer-section a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    line-height: 1.8;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-wrap: nowrap;
        height: 60px;
        padding: 0 12px;
    }
    
    .logo-section {
        flex-shrink: 0;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .logo-img {
        width: 28px;
        height: 28px;
    }
    
    .search-box {
        flex: 1;
        max-width: none;
        margin: 0 12px;
        width: auto;
    }
    
    .search-box input {
        padding: 8px 36px 8px 12px;
        font-size: 16px;  /* 必须16px防止iOS自动放大 */
    }
    
    .search-btn {
        font-size: 16px;
        right: 4px;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        flex-shrink: 0;
        order: 99;
    }
    
    .hero {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .hero-stats {
        gap: 24px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}

/* 搜索高亮 */
.highlight {
    background: rgba(255, 107, 53, 0.2);
    padding: 0 2px;
    border-radius: 2px;
}

/* 无结果提示 */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-results-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.no-results-text {
    font-size: 16px;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 107, 53, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 分类折叠功能 */
.category-section {
    transition: opacity 0.3s ease;
}

.category-section.hidden {
    display: none;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 申请弹窗样式 */
.apply-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.apply-modal-overlay.show,
.apply-modal-overlay[style*="flex"] {
    display: flex !important;
}

/* 确保弹窗内容可见 */
.apply-modal-overlay > div {
    background: white;
    border-radius: 16px;
    width: 480px;
    max-width: 95vw;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 2001;
}

.apply-modal {
    background: white;
    border-radius: 16px;
    width: 480px;
    max-width: 95vw;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2001;
    max-height: 90vh;
    overflow-y: auto;
}

.apply-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.apply-modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.apply-modal-close {
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apply-modal-close:hover {
    background: #e0e0e0;
}

.apply-form-group {
    margin-bottom: 16px;
}

.apply-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.apply-form-group input,
.apply-form-group textarea,
.apply-form-group select {
    width: 100%;
    padding: 10px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    background: white;
    color: var(--text-primary);
}

.apply-form-group input:focus,
.apply-form-group textarea:focus,
.apply-form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.apply-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.apply-submit-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(to right, #1a5490, #3d7ab8);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.apply-submit-btn:hover {
    opacity: 0.9;
}

.apply-success-msg {
    text-align: center;
    padding: 20px;
    color: #27ae60;
    font-size: 16px;
}

/* 手机菜单按钮 - V4.2修复 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    order: 2;
    z-index: 1001;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
    position: relative;
}

.mobile-menu-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-menu-btn:focus {
    outline: none;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: 0.3s;
}

/* 手机菜单遮罩 */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1998;
}

.mobile-menu-overlay.show,
.mobile-menu-overlay.active {
    display: block;
}

/* 手机侧边菜单 */
.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: white;
    z-index: 1999;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.mobile-menu-panel.show,
.mobile-menu-panel.active {
    right: 0;
}

.mobile-menu-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-menu-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-menu-close {
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
}

.mobile-menu-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.mobile-menu-list {
    list-style: none;
}

.mobile-menu-link {
    display: block;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.mobile-menu-link:hover {
    background: var(--bg-secondary);
}

.mobile-menu-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.mobile-menu-apply {
    display: block;
    text-align: center;
    padding: 12px;
    background: linear-gradient(to right, #1a5490, #3d7ab8);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
}

/* Hero CTA按钮样式 */
.hero-cta-wrapper {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.hero-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #FF6B35, #E55A2B);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.35);
}

.hero-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.45);
    color: white;
}

.hero-cta-btn:active {
    transform: translateY(0);
}

/* 模态框样式 - v2.8.2 修复居中 */
.modal-overlay {
    pointer-events: auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.modal-overlay .modal-content {
    pointer-events: auto !important;
    margin: auto !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
}

.modal-overlay input,
.modal-overlay select,
.modal-overlay textarea,
.modal-overlay button {
    pointer-events: auto !important;
}

/* 表单样式优化 */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color, #FF6B35) !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-cta-wrapper {
        margin-top: 20px;
    }
    
    .hero-cta-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}
