/* body 和 header 基础样式 */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: #2563eb;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-logo {
    width: 32px;
    height: 32px;
}

.header h1 {
    margin: 0;
    font-size: 20px;
    color: white;
    font-weight: 600;
}

.sub-nav {
    background: #f8fafc;
    padding: 12px 32px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 16px;
    margin-top: 64px;
}

.sub-nav a {
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #64748b;
    transition: all 0.3s;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sub-nav a:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.sub-nav a.active {
    background: #2563eb;
    color: white;
}

.main-container {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
}

.footer {
    background: white;
    padding: 24px 32px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-separator {
    margin: 0 8px;
    color: #cbd5e1;
}

.page-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header-left h2 {
    margin: 0;
    font-size: 28px;
    color: #333;
}

.page-header-right {
    display: flex;
    gap: 12px;
}

.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.filter-section {
    margin-bottom: 30px;
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    color: #666;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.link-item {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.link-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
}

.link-item-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.link-item-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
    flex-shrink: 0;
}

.link-item-icon img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

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

.link-item-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-item-url {
    font-size: 13px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-item-category {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 18px;
}

/* 响应式 */
@media (max-width: 768px) {
    .links-grid {
        grid-template-columns: 1fr;
    }

    .filter-section {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }

    .filter-btn {
        white-space: nowrap;
    }
}

/* ==================== 页面特定样式调整 ==================== */
/* 抽屉导航样式已在 common-page.css 中定义 */
