/* ========== 淡蓝清爽风格 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #5b9bd5;
    --primary-dark: #4a89c4;
    --primary-light: #e8f4fc;
    --secondary: #7ec8e3;
    --accent: #3a8bc2;
    --text-dark: #2c3e50;
    --text-gray: #6b8299;
    --text-light: #95a5a6;
    --border-color: #d4e5f0;
    --bg-light: #f0f7fc;
    --bg-card: #ffffff;
    --shadow: 0 4px 20px rgba(91, 155, 213, 0.08);
    --shadow-hover: 0 8px 30px rgba(91, 155, 213, 0.15);
}

html { font-size: 16px; }

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f0f7fc !important;
    color: #2c3e50 !important;
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body {
    background: linear-gradient(180deg, #f5f9fc 0%, #e8f2fa 100%);
    background-attachment: fixed;
}

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

a { color: #5b9bd5; text-decoration: none; transition: color 0.2s; }
a:hover { color: #4a89c4; }

/* ========== 导航栏 ========== */
.navbar {
    background: #ffffff !important;
    box-shadow: 0 2px 12px rgba(91, 155, 213, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #e8f4fc;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #5b9bd5 !important;
    text-decoration: none;
    white-space: nowrap;
}

.nav-links { 
    display: flex; 
    gap: 8px;
    flex-wrap: wrap;
}

.nav-links a {
    color: #6b8299 !important;
    font-size: 0.9rem;
    transition: all 0.2s;
    padding: 6px 12px;
    border-radius: 6px;
}

.nav-links a:hover { 
    color: #5b9bd5 !important;
    background: #e8f4fc;
}

/* ========== Hero区域 ========== */
.hero {
    padding: 40px 0;
    text-align: center;
    background: linear-gradient(180deg, #ffffff 0%, #f0f7fc 100%);
}

.hero h1 {
    font-size: 1.75rem;
    color: #3a8bc2 !important;
    margin-bottom: 12px;
    font-weight: 700;
}

.hero p {
    color: #6b8299 !important;
    margin-bottom: 24px;
    font-size: 1rem;
}

/* 搜索框 */
.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.search-box input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #d4e5f0;
    background: #ffffff !important;
    border-radius: 10px 0 0 10px;
    color: #2c3e50 !important;
    font-size: 1rem;
    min-width: 0;
}

.search-box input:focus {
    outline: none;
    border-color: #5b9bd5;
}

.search-box input::placeholder { color: #95a5a6; }

.search-box button {
    padding: 14px 24px;
    background: linear-gradient(135deg, #5b9bd5, #4a89c4);
    border: none;
    border-radius: 0 10px 10px 0;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    white-space: nowrap;
}

.search-box button:hover { 
    background: linear-gradient(135deg, #4a89c4, #3a8bc2);
}

/* ========== 分类区域 ========== */
.categories { padding: 40px 0; }

.categories h2, .documents h2, .videos-section h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: #3a8bc2 !important;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.categories h2::before, .documents h2::before, .videos-section h2::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, #5b9bd5, #7ec8e3);
    border-radius: 2px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.category-card {
    background: #ffffff !important;
    border: 1px solid #d4e5f0;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s;
    text-decoration: none;
}

.category-card:hover {
    border-color: #5b9bd5;
    box-shadow: 0 8px 30px rgba(91, 155, 213, 0.15);
    transform: translateY(-2px);
    background: linear-gradient(135deg, #ffffff 0%, #f5f9fc 100%);
}

.category-card h3 {
    color: #3a8bc2 !important;
    margin-bottom: 6px;
    font-size: 1.05rem;
}

.category-card p { color: #6b8299 !important; font-size: 0.85rem; }

/* ========== 文档列表 ========== */
.documents { padding: 40px 0; }

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

.doc-card {
    background: #ffffff !important;
    border: 1px solid #d4e5f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 14px;
    position: relative;
    transition: all 0.3s;
}

.doc-card:hover {
    border-color: #5b9bd5;
    box-shadow: 0 8px 30px rgba(91, 155, 213, 0.12);
}

.doc-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.7rem;
    color: #ffffff !important;
    flex-shrink: 0;
}

.doc-icon.pdf, .doc-icon.PDF { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.doc-icon.word, .doc-icon.docx, .doc-icon.DOCX { background: linear-gradient(135deg, #5b9bd5, #4a89c4); }
.doc-icon.ppt, .doc-icon.PPT { background: linear-gradient(135deg, #f39c12, #d68910); }

.doc-info { flex: 1; min-width: 0; }
.doc-info h3 { font-size: 0.95rem; margin-bottom: 6px; line-height: 1.4; }
.doc-info h3 a { color: #2c3e50 !important; }
.doc-info h3 a:hover { color: #5b9bd5 !important; }

.doc-meta {
    display: flex;
    gap: 12px;
    color: #95a5a6 !important;
    font-size: 0.8rem;
    flex-wrap: wrap;
}

.doc-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.doc-badge.free {
    background: #e8f4fc;
    color: #5b9bd5 !important;
}
.doc-badge.vip {
    background: #fff5e6;
    color: #f39c12 !important;
}

/* ========== 视频区域 ========== */
.videos-section { padding: 40px 0; }

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

.video-card {
    background: #ffffff !important;
    border: 1px solid #d4e5f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    text-decoration: none;
}

.video-card:hover {
    box-shadow: 0 8px 30px rgba(91, 155, 213, 0.15);
    transform: translateY(-2px);
}

.video-thumb {
    position: relative;
    padding-top: 56.25%;
    background: linear-gradient(135deg, #5b9bd5, #7ec8e3);
}

.video-thumb::after {
    content: '▶';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: rgba(255,255,255,0.9);
}

.video-info { padding: 16px; }
.video-info h3 { font-size: 0.95rem; margin-bottom: 6px; color: #2c3e50 !important; line-height: 1.4; }
.video-info p { color: #6b8299 !important; font-size: 0.8rem; }

/* ========== VIP区域 ========== */
.vip-banner {
    padding: 40px 20px;
    text-align: center;
    background: linear-gradient(135deg, #e8f4fc 0%, #d4e9f7 100%);
    border-radius: 16px;
    margin: 30px 0;
    border: 1px solid #c4dff0;
}

.vip-banner h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #5b9bd5 !important;
}

.vip-banner p { color: #6b8299 !important; margin-bottom: 20px; font-size: 1rem; }

/* ========== 按钮 ========== */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #5b9bd5, #4a89c4);
    color: #ffffff !important;
}

.btn-primary:hover { 
    background: linear-gradient(135deg, #4a89c4, #3a8bc2);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #5b9bd5, #7ec8e3);
    color: #ffffff !important;
}

/* ========== 表单 ========== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; color: #6b8299; font-size: 0.9rem; }

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: #ffffff !important;
    border: 2px solid #d4e5f0;
    border-radius: 8px;
    color: #2c3e50 !important;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #5b9bd5;
    box-shadow: 0 0 0 3px rgba(91, 155, 213, 0.1);
}

/* ========== Footer ========== */
footer {
    padding: 30px 0;
    border-top: 1px solid #d4e5f0;
    text-align: center;
    color: #95a5a6;
    background: #ffffff;
    margin-top: 40px;
    font-size: 0.9rem;
}

footer a { color: #6b8299; }
footer a:hover { color: #5b9bd5; }

/* ========== 其他 ========== */
.empty-state { text-align: center; padding: 40px 20px; color: #95a5a6; }

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(180deg, #f5f9fc 0%, #e8f2fa 100%);
}

.auth-box {
    width: 100%;
    max-width: 400px;
    padding: 30px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(91, 155, 213, 0.1);
    border: 1px solid #d4e5f0;
}

.auth-box h2 { text-align: center; margin-bottom: 24px; color: #3a8bc2 !important; font-size: 1.3rem; }
.auth-link { text-align: center; margin-top: 16px; color: #6b8299; font-size: 0.9rem; }
.error { color: #e74c3c; margin-bottom: 12px; text-align: center; font-size: 0.9rem; }

/* 文档详情 */
.doc-detail { padding: 40px 0; }

.doc-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
    padding: 24px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(91, 155, 213, 0.08);
    border: 1px solid #d4e5f0;
}

.doc-title-info h1 { font-size: 1.4rem; margin-bottom: 12px; color: #3a8bc2 !important; line-height: 1.4; }
.doc-title-info .doc-meta { color: #6b8299; font-size: 0.9rem; }

.doc-desc {
    padding: 24px;
    background: #ffffff;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(91, 155, 213, 0.08);
    border: 1px solid #d4e5f0;
}

.doc-desc h3 { margin-bottom: 12px; color: #6b8299; font-size: 0.95rem; }
.doc-desc p { color: #2c3e50; line-height: 1.8; font-size: 0.95rem; }

.doc-actions { text-align: center; padding: 20px; }
.vip-tip { color: #f39c12; margin-bottom: 12px; font-size: 0.95rem; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 30px; flex-wrap: wrap; }
.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: 6px;
    color: #6b8299;
    background: #ffffff;
    border: 1px solid #d4e5f0;
    font-size: 0.9rem;
}
.pagination a:hover { border-color: #5b9bd5; color: #5b9bd5; }
.pagination .active { background: #5b9bd5; color: #ffffff !important; border-color: #5b9bd5; }

/* 页面标题 */
.page-header {
    padding: 30px 0;
    text-align: center;
    background: linear-gradient(180deg, #ffffff 0%, #f5f9fc 100%);
    margin-bottom: 24px;
    border-bottom: 1px solid #d4e5f0;
}
.page-header h1 { font-size: 1.4rem; color: #3a8bc2 !important; margin-bottom: 6px; }
.page-header p { color: #6b8299; font-size: 0.9rem; }

/* 后台管理 */
body:has(.admin) { background: #f0f7fc !important; }

.admin { max-width: 1200px; margin: 0 auto; padding: 20px; }
.admin h1 { color: #3a8bc2; margin-bottom: 20px; font-size: 1.4rem; }

.admin-nav { 
    margin-bottom: 20px; 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px;
    padding: 12px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #d4e5f0;
}
.admin-nav a { 
    padding: 8px 14px; 
    background: #f5f9fc;
    border-radius: 6px; 
    color: #6b8299 !important;
    font-size: 0.85rem;
}
.admin-nav a:hover, .admin-nav a.active { background: #5b9bd5; color: #fff !important; }

.stat-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px; 
    margin-bottom: 20px; 
}
.stat-card { 
    background: #fff;
    border-radius: 12px; 
    padding: 20px; 
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid #d4e5f0;
}
.stat-card h3 { font-size: 1.8rem; color: #5b9bd5; margin-bottom: 6px; }
.stat-card p { color: #6b8299; font-size: 0.85rem; }

.quick-actions, .upload-section, .video-list { 
    background: #fff;
    border-radius: 12px; 
    padding: 20px; 
    box-shadow: var(--shadow);
    border: 1px solid #d4e5f0;
}
.quick-actions h2 { color: #3a8bc2; margin-bottom: 16px; font-size: 1.1rem; }
.action-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px; 
}
.action-btn { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 8px; 
    padding: 20px;
    background: #f5f9fc;
    border: 2px solid #d4e5f0;
    border-radius: 10px; 
    color: #3a8bc2 !important;
    font-size: 0.9rem;
}
.action-btn:hover { border-color: #5b9bd5; background: #e8f4fc; }
.action-btn .icon { font-size: 24px; }

/* 表格 */
.video-table, .doc-table { width: 100%; border-collapse: collapse; }
.video-table th, .doc-table th { 
    text-align: left; padding: 12px; 
    background: #f5f9fc; color: #6b8299; 
    border-bottom: 1px solid #d4e5f0;
}
.video-table td, .doc-table td { 
    padding: 14px 12px; 
    border-bottom: 1px solid #d4e5f0;
    color: #2c3e50;
}

/* 文件上传区域 */
.file-upload {
    border: 2px dashed #d4e5f0;
    border-radius: 12px; padding: 40px;
    text-align: center; cursor: pointer;
    background: #f5f9fc; transition: all 0.2s;
}
.file-upload:hover { border-color: #5b9bd5; background: #e8f4fc; }
.file-upload .icon { font-size: 36px; margin-bottom: 10px; }
.file-upload p { color: #6b8299; margin: 4px 0; font-size: 0.9rem; }

/* 标签 */
.badge {
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}
.badge-free { background: #e8f4fc; color: #5b9bd5 !important; }
.badge-vip { background: #fff5e6; color: #f39c12 !important; }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f0f7fc; }
::-webkit-scrollbar-thumb { background: #c4dff0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #5b9bd5; }

/* ========== 响应式 - 平板 ========== */
@media (min-width: 768px) {
    .navbar .container { height: 68px; }
    .logo { font-size: 1.35rem; }
    .nav-links { gap: 12px; }
    .nav-links a { font-size: 0.95rem; }
    
    .hero { padding: 60px 0; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1.1rem; }
    
    .category-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
    .doc-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
    .video-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
    
    .doc-header { flex-direction: row; gap: 30px; padding: 36px; }
    .doc-title-info h1 { font-size: 1.6rem; }
    
    .stat-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
    .action-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}

/* ========== 响应式 - 桌面 ========== */
@media (min-width: 1024px) {
    .hero { padding: 80px 0; }
    .hero h1 { font-size: 2.5rem; }
    
    .categories h2, .documents h2, .videos-section h2 { font-size: 1.5rem; }
    
    .category-card { padding: 28px; }
    .category-card h3 { font-size: 1.15rem; }
    
    .doc-card { padding: 24px; gap: 18px; }
    .doc-icon { width: 52px; height: 52px; font-size: 0.8rem; }
    
    .doc-title-info h1 { font-size: 1.8rem; }
    
    .page-header { padding: 50px 0; }
    .page-header h1 { font-size: 1.8rem; }
}

/* ========== 响应式 - 小手机 ========== */
@media (max-width: 480px) {
    .navbar .container { height: 56px; }
    .logo { font-size: 1.1rem; }
    .nav-links a { padding: 5px 8px; font-size: 0.85rem; }
    
    .hero { padding: 30px 0; }
    .hero h1 { font-size: 1.5rem; }
    .hero p { font-size: 0.95rem; margin-bottom: 20px; }
    
    .search-box { flex-direction: column; }
    .search-box input { border-radius: 10px 10px 0 0; }
    .search-box button { border-radius: 0 0 10px 10px; }
    
    .categories, .documents, .videos-section { padding: 30px 0; }
    .categories h2, .documents h2, .videos-section h2 { font-size: 1.1rem; }
    
    .category-grid { grid-template-columns: 1fr; gap: 12px; }
    .doc-grid { grid-template-columns: 1fr; gap: 12px; }
    .video-grid { grid-template-columns: 1fr; gap: 16px; }
    
    .category-card { padding: 20px; }
    .doc-card { padding: 16px; gap: 12px; }
    .doc-icon { width: 44px; height: 44px; font-size: 0.65rem; }
    .doc-info h3 { font-size: 0.9rem; }
    .doc-badge { top: 10px; right: 10px; }
    
    .btn { padding: 10px 20px; font-size: 0.85rem; }
    
    .auth-box { padding: 24px 20px; }
    .auth-box h2 { font-size: 1.2rem; }
    
    .stat-card { padding: 16px; }
    .stat-card h3 { font-size: 1.5rem; }
    .action-btn { padding: 16px; }
    .action-btn .icon { font-size: 20px; }
}
