/* ====================================
   MATLAB Code Hub - Categories Page Styles
   Modern, SEO-optimized design
   ==================================== */

/* CSS Variables */
:root {
    /* MATLAB主题配色 - 经典蓝橙组合 */
    --primary-gradient: linear-gradient(135deg, #0076a8 0%, #004d6d 100%);
    --secondary-gradient: linear-gradient(135deg, #ff7f00 0%, #cc6600 100%);
    --accent-gradient: linear-gradient(135deg, #00a9ce 0%, #0086a8 100%);
    --dark-gradient: linear-gradient(135deg, #1a2332 0%, #0f1419 100%);
    --matlab-gradient: linear-gradient(135deg, #0076a8 0%, #ff7f00 100%);
    --success-gradient: linear-gradient(135deg, #00b894 0%, #00a085 100%);
    
    --primary-color: #0076a8;
    --primary-hover: #005a82;
    --secondary-color: #ff7f00;
    --secondary-hover: #e67300;
    --accent-color: #00a9ce;
    --accent-hover: #0086a8;
    --success-color: #00b894;
    --warning-color: #ff7f00;
    --error-color: #d63031;
    
    --text-primary: #1a2332;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --text-white: #ffffff;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf3f7;
    --bg-dark: #1a2332;
    --bg-glass: rgba(255, 255, 255, 0.1);
    --bg-code: #f8f9fa;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(0, 118, 168, 0.3);
    
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    --blur-sm: blur(4px);
    --blur-md: blur(8px);
    --blur-lg: blur(16px);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #f7fafc 0%, #e8eff5 100%);
    overflow-x: hidden;
    position: relative;
}

/* MATLAB代码背景装饰 */
body::before {
    content: '% MATLAB Code\nfunction result = analyze(data)\n    [m, n] = size(data);\n    result = mean(data);\nend\n\n>> plot(x, y)\n>> xlabel("Time")\n>> ylabel("Value")';
    position: fixed;
    top: 20%;
    right: -5%;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: rgba(0, 118, 168, 0.03);
    white-space: pre;
    line-height: 1.8;
    z-index: 0;
    pointer-events: none;
    transform: rotate(-15deg);
}

body::after {
    content: 'A = [1 2 3; 4 5 6];\nB = A * 2;\nC = inv(A);\n\nfor i = 1:10\n    disp(i)\nend';
    position: fixed;
    bottom: 15%;
    left: -3%;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: rgba(255, 127, 0, 0.03);
    white-space: pre;
    line-height: 1.8;
    z-index: 0;
    pointer-events: none;
    transform: rotate(12deg);
}

/* Glassmorphism utility */
.glass {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Modern Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: var(--blur-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition-normal);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-lg);
}

.headerb {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 80px;
}

.logo {
    flex-shrink: 0;
    z-index: 10;
}

.login_title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 32px;
    font-weight: 800;
    background: var(--matlab-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition-normal);
    position: relative;
}

.login_title::before {
    content: '⚡';
    font-size: 36px;
    background: var(--matlab-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s infinite;
    filter: drop-shadow(0 0 10px rgba(0, 118, 168, 0.5));
}

.login_title:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Modern Navigation */
.topright {
    display: flex;
    align-items: center;
    gap: 40px;
    flex: 1;
    justify-content: flex-end;
}

.nav {
    display: flex;
    justify-content: center;
    flex: 1;
}

.navlist {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}

.navlist > li {
    position: relative;
}

.navlist > li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    color: #2d3748;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: var(--blur-sm);
    border: 1px solid rgba(0, 118, 168, 0.2);
    box-shadow: var(--shadow-xs);
}

.navlist > li > a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    border-radius: var(--radius-md);
}

.navlist > li > a i {
    color: #4a5568;
    font-size: 16px;
    flex-shrink: 0;
}

.navlist > li > a:hover::before,
.navlist > li.hover > a::before {
    left: 0;
}

.navlist > li > a:hover,
.navlist > li.hover > a {
    color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.navlist > li > a:hover i,
.navlist > li.hover > a i {
    color: var(--text-white);
}

/* Modern Submenu - 修复hover间隙问题 */
.subnav {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 280px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: var(--blur-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 16px 0;
    margin-top: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: var(--transition-normal);
    z-index: 100;
    border: 1px solid rgba(0, 118, 168, 0.15);
}

/* 添加桥接区域，填补父元素和子菜单之间的间隙 */
.subnav::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
    background: transparent;
}

.subnav::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 118, 168, 0.15);
    border-bottom: none;
    border-right: none;
    transform: translateX(-50%) rotate(45deg);
    backdrop-filter: var(--blur-lg);
    z-index: 1;
}

.navlist > li:hover .subnav,
.navlist > li.submenu-hover .subnav {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.subnav a {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
    gap: 12px;
}

.subnav a::before {
    content: '→';
    opacity: 0;
    transform: translateX(-10px);
    transition: var(--transition-fast);
    color: var(--primary-color);
}

.subnav a:hover {
    background: rgba(0, 118, 168, 0.08);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    padding-left: 28px;
}

.subnav a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* Modern User Menu */
.user {
    flex-shrink: 0;
}

.user ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 12px;
    align-items: center;
}

.user li a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user li a:hover {
    background: rgba(0, 118, 168, 0.08);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.user .log a,
.user .reg a {
    background: var(--primary-gradient);
    color: var(--text-white);
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.user .log a:hover,
.user .reg a:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--primary-gradient);
    filter: brightness(1.1);
}

/* Hero Section */
.hero-section {
    position: relative;
    background: var(--primary-gradient);
    padding: 140px 0 100px;
    overflow: hidden;
    margin-top: 80px;
}

.hero-section::before {
    content: 'function [X, Y] = meshgrid(x, y)\n>> A = magic(5)\n>> plot3(X, Y, Z)\n>> surf(peaks)\n\nfor i = 1:n\n    result(i) = sqrt(i);\nend\n\n% Signal Processing\nFs = 1000;\nt = 0:1/Fs:1;\nx = sin(2*pi*50*t);';
    position: absolute;
    top: 10%;
    left: 5%;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.08);
    white-space: pre;
    line-height: 2;
    z-index: 1;
    pointer-events: none;
}

.hero-section::after {
    content: '>> load data.mat\n>> [U,S,V] = svd(A)\n>> fft(signal)\n>> filter(b, a, x)\n\nwhile condition\n    iterate();\nend\n\n% Matrix Operations\nC = A * B;\nD = A \\ B;';
    position: absolute;
    bottom: 10%;
    right: 5%;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: rgba(255, 127, 0, 0.08);
    white-space: pre;
    line-height: 2;
    z-index: 1;
    pointer-events: none;
    text-align: right;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.hero-title {
    font-size: 64px;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 24px;
    font-family: 'JetBrains Mono', monospace;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 48px;
    font-weight: 400;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-search {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.search-form {
    display: flex;
    gap: 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: var(--blur-md);
    border-radius: var(--radius-full);
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-input {
    flex: 1;
    padding: 20px 32px;
    font-size: 18px;
    border: none;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    transition: var(--transition-normal);
    font-weight: 500;
}

.search-input:focus {
    outline: none;
    background: var(--bg-primary);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-btn {
    padding: 20px 40px;
    background: var(--primary-gradient);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-full);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    filter: brightness(1.1);
}

/* Categories Page */
.categories-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 24px;
}

.page-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}

.page-header::before {
    content: '>>_';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: var(--primary-gradient);
    border-radius: 50%;
    opacity: 0.08;
    z-index: -1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 48px;
    color: var(--text-white);
    font-weight: 700;
}

.page-title {
    font-size: 56px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    font-family: 'JetBrains Mono', monospace;
    position: relative;
}

.page-description {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 400;
}

/* Category Filter */
.category-filter {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 40px;
    margin-bottom: 60px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.category-filter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.filter-label {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'JetBrains Mono', monospace;
}

.filter-label::before {
    content: '>>';
    font-size: 20px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary-color);
    font-weight: 700;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-tab {
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.9);
    color: #2d3748;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(0, 118, 168, 0.2);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-tab i {
    color: #4a5568;
}

.filter-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.filter-tab:hover::before,
.filter-tab.active::before {
    left: 0;
}

.filter-tab:hover,
.filter-tab.active {
    color: var(--text-white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.filter-tab:hover i,
.filter-tab.active i {
    color: var(--text-white);
}

/* Category Sections */
.category-section {
    background: linear-gradient(to bottom right, var(--bg-primary), rgba(0, 118, 168, 0.015));
    border-radius: var(--radius-xl);
    padding: 48px;
    margin-bottom: 48px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    border-left: 2px solid transparent;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.category-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left;
}

.category-section:hover::before {
    transform: scaleX(1);
}

.category-section:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
    border-left-color: var(--primary-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--bg-tertiary);
}

.section-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    align-items: center;
    gap: 16px;
}

.section-title::before {
    content: '»';
    font-size: 36px;
    color: var(--primary-color);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    font-weight: 900;
}

.section-more {
    background: var(--primary-gradient);
    color: var(--text-white);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-more:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--text-white);
    filter: brightness(1.1);
}

/* Resource Grid */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 32px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.resource-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 32px;
    border: 1px solid var(--border-light);
    transition: var(--transition-normal);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    cursor: pointer;
}

.resource-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.resource-card:hover::before {
    transform: scaleX(1);
}

/* 代码行号装饰 */
.resource-card::after {
    content: '1\A2\A3\A4\A5';
    position: absolute;
    left: 8px;
    top: 50px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    line-height: 1.8;
    color: rgba(0, 118, 168, 0.06);
    white-space: pre;
    pointer-events: none;
    opacity: 0;
    transition: var(--transition-normal);
}

.resource-card:hover::after {
    opacity: 1;
}

.resource-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(0, 118, 168, 0.3);
}

.resource-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.resource-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    min-height: 50px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding-left: 0;
}

.resource-title::before {
    content: '.m';
    display: inline-flex;
    width: 26px;
    height: 26px;
    background: var(--primary-gradient);
    border-radius: var(--radius-xs);
    color: var(--text-white);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    position: relative;
}

.resource-card:hover .resource-title::before {
    transform: rotate(-5deg);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
}

.resource-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
    flex: 1;
}

.resource-title a:hover {
    color: var(--primary-color);
}

.resource-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    flex: 1;
}

.resource-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-light);
    padding-top: 18px;
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(0, 118, 168, 0.06) 0%, rgba(0, 118, 168, 0.04) 100%);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid rgba(0, 118, 168, 0.12);
    transition: var(--transition-fast);
}

.meta-item:hover {
    background: linear-gradient(135deg, rgba(0, 118, 168, 0.1) 0%, rgba(0, 118, 168, 0.08) 100%);
    border-color: rgba(0, 118, 168, 0.2);
    transform: translateY(-1px);
}

.meta-icon {
    font-size: 12px;
}

.resource-action {
    margin-top: 20px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 28px;
    background: var(--primary-gradient);
    color: var(--text-white);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-normal);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: var(--transition-normal);
    transform: translate(-50%, -50%);
}

.download-btn:hover::before {
    width: 300px;
    height: 300px;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--text-white);
    filter: brightness(1.1);
}

.btn-icon {
    font-size: 16px;
    transition: var(--transition-fast);
}

.download-btn:hover .btn-icon {
    transform: translateY(-2px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 100px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 32px;
    opacity: 0.3;
    font-family: 'JetBrains Mono', monospace;
}

.empty-icon::before {
    content: '{ }';
    color: var(--text-light);
}

.empty-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.empty-description {
    font-size: 18px;
    color: var(--text-light);
    max-width: 400px;
    margin: 0 auto;
}

/* Modern Footer */
.footer {
    background: var(--dark-gradient);
    color: var(--text-white);
    padding: 60px 0 40px;
    margin-top: 120px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
    padding: 8px 16px;
    border-radius: var(--radius-md);
}

.footer-links a:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.1);
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.mobile-menu-toggle:hover {
    background: rgba(0, 118, 168, 0.1);
}

.mobile-menu-toggle span {
    width: 24px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Scroll animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-gradient);
    filter: brightness(1.1);
}

/* 增强导航菜单的hover桥接区域 */
.navlist > li::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    right: 0;
    height: 12px;
    background: transparent;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .headerb {
        padding: 0 20px;
    }
    
    .categories-page {
        padding: 60px 20px;
    }
    
    .resource-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 1024px) {
    .topright {
        gap: 24px;
    }
    
    .navlist {
        gap: 2px;
        padding: 6px;
    }
    
    .navlist > li > a {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .hero-title {
        font-size: 48px;
    }
    
    .hero-subtitle {
        font-size: 20px;
    }
    
    .page-title {
        font-size: 42px;
    }
    
    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .headerb {
        height: 70px;
    }
    
    .topright {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: var(--blur-lg);
        flex-direction: column;
        padding: 24px;
        gap: 24px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-normal);
        border-bottom: 1px solid var(--border-light);
        box-shadow: var(--shadow-lg);
    }
    
    .topright.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav {
        order: 2;
        width: 100%;
    }
    
    .navlist {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .navlist > li > a {
        justify-content: center;
        padding: 16px 24px;
        border-radius: var(--radius-md);
        background: rgba(255, 255, 255, 0.95);
        color: #2d3748;
    }
    
    .subnav {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        background: var(--bg-secondary);
        margin-top: 8px;
        border-radius: var(--radius-md);
    }
    
    .subnav::before {
        display: none;
    }
    
    .user {
        order: 1;
        width: 100%;
    }
    
    .user ul {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero-section {
        padding: 120px 0 80px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .search-form {
        flex-direction: column;
        gap: 12px;
    }
    
    .search-input {
        padding: 16px 24px;
        font-size: 16px;
    }
    
    .search-btn {
        padding: 16px 32px;
        font-size: 16px;
    }
    
    .categories-page {
        padding: 40px 16px;
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .page-description {
        font-size: 18px;
    }
    
    .category-filter {
        padding: 24px;
    }
    
    .filter-tabs {
        gap: 12px;
    }
    
    .filter-tab {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .category-section {
        padding: 32px 24px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .resource-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .login_title {
        font-size: 24px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .page-title {
        font-size: 28px;
    }
    
    .resource-card {
        padding: 20px;
    }
    
    .resource-title {
        font-size: 16px;
        min-height: 45px;
    }
    
    .resource-title::before {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
    
    .download-btn {
        padding: 14px 24px;
        font-size: 14px;
    }
}

