/* 基础样式重置 */
* {
    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;
}

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;
    color: var(--text-primary);
    white-space: nowrap;
}

/* 导航菜单 */
.main-nav {
    flex: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 8px;
    min-width: max-content;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(255, 107, 53, 0.1);
}

/* 搜索框 */
.search-box {
    position: relative;
    width: 240px;
    flex-shrink: 0;
}

.search-box input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: 24px;
    font-size: 14px;
    transition: var(--transition);
    background-color: var(--bg-secondary);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--bg-primary);
}

.search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.6;
    transition: var(--transition);
}

.search-btn:hover {
    opacity: 1;
}

/* 手机版菜单按钮 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition);
    border-radius: 2px;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* 手机版侧边菜单 */
.mobile-menu-panel {
    display: none;
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--bg-primary);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-menu-panel.active {
    right: 0;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
}

.mobile-menu-list {
    list-style: none;
    padding: 16px 0;
    margin: 0;
}

.mobile-menu-list li {
    margin: 0;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 16px;
    transition: var(--transition);
}

.mobile-menu-link:hover {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
}

.mobile-menu-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.mobile-menu-apply {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.mobile-menu-apply:hover {
    background: #E55A2B;
}

.mobile-nav-list {
    list-style: none;
    padding: 16px 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 16px;
    transition: var(--transition);
}

.mobile-nav-link:hover {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
}

.mobile-nav-icon {
    font-size: 20px;
    width: 28px;
    text-align: center;
}

/* Hero区域 */
.hero {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    padding: 80px 0;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 20px;
    opacity: 0.95;
    margin-bottom: 32px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-bottom: 32px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.stat-label a {
    color: white;
    text-decoration: underline;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: #4A90E2;
    padding: 14px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* 主要内容区域 */
.main-content {
    padding: 40px 0 60px;
}

/* 分类区块 */
.category-section {
    margin-bottom: 48px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.section-icon {
    font-size: 28px;
}

.sub-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sub-tag {
    padding: 6px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.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);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.site-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 107, 53, 0.2);
}

.site-card.hidden {
    display: none;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.site-favicon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.site-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.site-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.site-tag.tag-wall {
    background: rgba(231, 76, 60, 0.1);
    color: #E74C3C;
    margin-left: 4px;
}

.site-tag.tag-free {
    background: rgba(39, 174, 96, 0.1);
    color: #27AE60;
    margin-left: 4px;
}

.site-tag.tag-open {
    background: rgba(52, 152, 219, 0.1);
    color: #3498DB;
    margin-left: 4px;
}

.visit-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--primary-color);
    color: white;
    border-radius: 16px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.visit-btn:hover {
    background: #E55A2B;
    transform: scale(1.05);
}

/* 更多分类卡片 */
.more-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.more-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}

.more-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.more-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.more-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.more-card p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 页脚 */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 48px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-section p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

/* 热门搜索样式 */
.hot-searches {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.08) 0%, rgba(247, 197, 159, 0.08) 100%);
    border: 1px solid rgba(255, 107, 53, 0.15);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.hot-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.hot-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hot-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: white;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.hot-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

.hot-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: white;
}

.hot-rank.rank-1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.hot-rank.rank-2 {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
}

.hot-rank.rank-3 {
    background: linear-gradient(135deg, #CD7F32, #B87333);
}

.hot-rank.rank-other {
    background: linear-gradient(135deg, #95A5A6, #7F8C8D);
}

.hot-count {
    font-size: 11px;
    color: var(--text-muted);
}

.hot-item:hover .hot-count {
    color: rgba(255, 255, 255, 0.8);
}

/* 失效网站标记样式 */
.site-dead {
    opacity: 0.6;
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%) !important;
    border-color: #ef9a9a !important;
}

.site-dead .site-name {
    color: #c62828;
    text-decoration: line-through;
}

.site-dead .site-desc {
    color: #e57373;
}

.site-dead .visit-btn {
    background: #bdbdbd;
    cursor: not-allowed;
    pointer-events: none;
}

.dead-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
    animation: pulse 2s infinite;
}

.report-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.report-btn:hover {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    transform: scale(1.05);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* 搜索匹配高亮样式 */
.search-match {
    border: 2px solid var(--primary-color) !important;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.4) !important;
    animation: searchPulse 2s infinite;
}

@keyframes searchPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 107, 53, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 107, 53, 0.6);
    }
}

/* 申请收录弹窗样式 */
.submit-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.submit-modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.submit-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.submit-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.submit-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.submit-modal-close:hover {
    color: var(--text-primary);
}

.submit-modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    background: #E55A2B;
    transform: translateY(-1px);
}

/* Toast提示样式 */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: white;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: #27AE60;
}

.toast.error {
    background: #E74C3C;
}

.toast.warning {
    background: #F39C12;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .header .container {
        gap: 12px;
    }
    
    .search-box {
        flex: 1;
        max-width: 200px;
    }
}

@media (max-width: 992px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-menu-panel {
        display: block;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (max-width: 768px) {
    .header .container {
        height: 60px;
        gap: 8px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .search-box {
        flex: 1;
        max-width: none;
        min-width: 120px;
    }
    
    .search-box input {
        width: 100%;
        min-width: 0;
        padding: 8px 32px 8px 12px;
        font-size: 14px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-stats {
        gap: 24px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .more-categories {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hot-searches {
        padding: 12px 16px;
        margin-bottom: 16px;
    }
    
    .hot-list {
        gap: 8px;
    }
    
    .hot-item {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .hot-rank {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .more-categories {
        grid-template-columns: 1fr;
    }
    
    .hot-searches {
        padding: 10px 12px;
    }
    
    .hot-title {
        font-size: 13px;
    }
    
    .hot-item {
        padding: 5px 8px;
        font-size: 11px;
    }
}

/* 滚动条样式 */
::-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);
}
