/* 
 * 导航网站样式 - 完全按照参考图片设计
 * 紫色渐变主题
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 顶部紫色区域 ========== */
.top-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px 0 40px;
    text-align: center;
    color: white;
}

.site-header {
    margin-bottom: 20px;
}

.site-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
}

.site-logo svg {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.site-tagline {
    font-size: 14px;
    opacity: 0.9;
}

/* 搜索框 */
.search-container {
    max-width: 600px;
    margin: 0 auto 15px;
    display: flex;
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.search-container input {
    flex: 1;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    outline: none;
}

.search-container button {
    border: none;
    background: transparent;
    padding: 0 20px;
    cursor: pointer;
    color: #667eea;
    transition: background 0.3s;
}

.search-container button:hover {
    background: #f5f5f5;
}

.login-link {
    color: white;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.login-link:hover {
    opacity: 1;
}

/* ========== 欢迎横幅 ========== */
.welcome-banner {
    background: linear-gradient(135deg, #7c8ff0 0%, #8b6bb8 100%);
    padding: 40px 20px;
    text-align: center;
    color: white;
    margin: 0 20px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.welcome-banner h1 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 600;
}

.welcome-banner p {
    font-size: 15px;
    opacity: 0.95;
}

/* ========== 分类标签栏 ========== */
.category-bar {
    background: white;
    padding: 15px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #e5e7eb;
}

.category-bar .container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.category-bar .container::-webkit-scrollbar {
    height: 4px;
}

.category-bar .container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: transparent;
    color: #667eea;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.category-tag:hover {
    background: #f0f4ff;
    border-color: #667eea;
}

.category-tag.active {
    background: #667eea;
    color: white;
    font-weight: 500;
}

/* ========== 主内容区 ========== */
.main-container {
    min-height: 400px;
    padding-bottom: 60px;
}

/* 链接分组 */
.link-section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #667eea;
}

/* 链接网格 */
.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

/* 链接卡片 */
.link-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    transition: all 0.3s ease;
    position: relative;
    min-height: 44px;
}

.link-card:hover {
    background: white;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.link-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 4px;
}

.link-icon-placeholder {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-title {
    flex: 1;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

/* 徽章 */
.hot-badge,
.new-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: bold;
    color: white;
    line-height: 1;
}

.hot-badge {
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
}

.new-badge {
    background: linear-gradient(135deg, #5352ed, #3742fa);
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 10px;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    color: #6b7280;
    font-size: 16px;
    margin: 10px 0;
}

.empty-hint {
    font-size: 14px;
}

/* ========== 底部 ========== */
.footer {
    background: #1f2937;
    color: #9ca3af;
    padding: 30px 0;
    text-align: center;
    font-size: 14px;
}

.footer p {
    margin: 8px 0;
}

.footer strong {
    color: #667eea;
    font-weight: 600;
}

/* ========== 响应式设计 ========== */

/* 大屏 */
@media (min-width: 1200px) {
    .link-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* 中屏 */
@media (min-width: 768px) and (max-width: 1199px) {
    .link-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 平板 */
@media (min-width: 576px) and (max-width: 767px) {
    .link-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .welcome-banner h1 {
        font-size: 22px;
    }
    
    .welcome-banner p {
        font-size: 14px;
    }
}

/* 手机 */
@media (max-width: 575px) {
    .link-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .top-section {
        padding: 20px 0 30px;
    }
    
    .site-logo {
        font-size: 20px;
    }
    
    .site-logo svg {
        width: 30px;
        height: 30px;
    }
    
    .welcome-banner {
        padding: 30px 15px;
        margin: 0 10px 20px;
    }
    
    .welcome-banner h1 {
        font-size: 20px;
    }
    
    .welcome-banner p {
        font-size: 13px;
    }
    
    .link-section {
        padding: 15px;
    }
    
    .section-title {
        font-size: 16px;
    }
    
    .link-card {
        padding: 8px 10px;
        min-height: 38px;
    }
    
    .link-title {
        font-size: 13px;
    }
    
    .category-bar {
        padding: 10px 0;
    }
}

/* ========== 打印样式 ========== */
@media print {
    .top-section,
    .welcome-banner,
    .category-bar,
    .footer {
        display: none;
    }
    
    .link-section {
        box-shadow: none;
        page-break-inside: avoid;
    }
}
