/* 自定义样式 - hao123风格 */
* {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f5f5;
}

/* 导航栏 */
.nav-link {
    position: relative;
    color: #4b5563;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #2563eb;
}

/* 地区切换标签 - 简化版 */
.region-tab {
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    background: white;
    color: #666;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid #ddd;
    transition: all 0.2s;
    cursor: pointer;
}

.region-tab:hover {
    border-color: #4a90e2;
    color: #4a90e2;
}

.region-tab.active {
    background: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

/* 分类导航 */
.category-nav {
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-btn {
    padding: 0.4rem 1rem;
    border-radius: 3px;
    background: #f5f5f5;
    color: #666;
    font-size: 0.875rem;
    border: none;
    transition: all 0.2s;
    cursor: pointer;
}

.category-btn:hover {
    background: #e8f2ff;
    color: #4a90e2;
}

.category-btn.active {
    background: #4a90e2;
    color: white;
}

/* 内容盒子 */
.content-box {
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: #fafafa;
}

.box-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
}

.box-title i {
    color: #4a90e2;
}

.more-link {
    color: #999;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s;
}

.more-link:hover {
    color: #4a90e2;
}

/* 链接网格 - hao123风格 */
.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0;
    padding: 0.5rem;
}

.link-item {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.link-item:hover {
    background: #f8f9fa;
}

.link-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.link-content {
    flex: 1;
    min-width: 0;
}

.link-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-desc {
    font-size: 0.75rem;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.125rem;
}

.link-badge {
    font-size: 0.7rem;
    padding: 0.125rem 0.375rem;
    border-radius: 2px;
    font-weight: 500;
    flex-shrink: 0;
}

.badge-hot {
    background: #ff4d4f;
    color: white;
}

.badge-new {
    background: #52c41a;
    color: white;
}

.badge-free {
    background: #1890ff;
    color: white;
}

/* 资讯列表 */
.news-list {
    padding: 0.5rem;
}

.news-item {
    padding: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.news-item:hover {
    background: #f8f9fa;
}

.news-item:last-child {
    border-bottom: none;
}

.news-title {
    font-size: 0.875rem;
    color: #333;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #999;
}

/* 统计盒子 */
.stats-box {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4a90e2;
}

.stat-label {
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.25rem;
}

/* 搜索模态框 */
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 100;
    padding: 2rem;
}

.search-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}

.search-modal-content {
    background: white;
    border-radius: 4px;
    padding: 1.5rem;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-result-item {
    padding: 0.75rem;
    border-radius: 3px;
    transition: background 0.2s;
    cursor: pointer;
}

.search-result-item:hover {
    background: #f3f4f6;
}

/* 社交图标 */
.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.3s;
}

.social-icon:hover {
    background: #4a90e2;
    color: white;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .link-grid {
        grid-template-columns: 1fr;
    }
    
    .category-nav {
        justify-content: center;
    }
    
    .stats-box {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-modal-content {
        max-width: 90%;
    }
}

@media (max-width: 1024px) {
    .link-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* 配置管理样式 */
.icon-option {
    transition: all 0.2s;
    border: 2px solid transparent;
}

.icon-option:hover {
    border-color: #4a90e2;
    background-color: #e8f2ff !important;
}

.icon-option.bg-blue-100 {
    background-color: #e8f2ff !important;
    border-color: #4a90e2;
}
