/**
 * 小学教学资源平台 - 主样式文件
 * 清新明丽、生动活泼风格
 */

/* ===== 基础样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 主色调 - 清新蓝色 */
    --primary-color: #4facfe;
    --primary-dark: #00f2fe;
    --secondary-color: #667eea;
    --accent-color: #43e97b;
    
    /* 马卡龙色系辅助色 */
    --pink-color: #ff9a9e;
    --peach-color: #ffecd2;
    --mint-color: #a8edea;
    --lavender-color: #d299c2;
    --coral-color: #fda085;
    --sky-blue-color: #89f7fe;
    --yellow-color: #fdfbfb;
    --purple-color: #667eea;
    
    /* 基础色 */
    --success-color: #43e97b;
    --danger-color: #ff6b6b;
    --warning-color: #ffc107;
    --info-color: #4facfe;
    --light-color: #f8faff;
    --dark-color: #2d3748;
    --text-color: #333;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    
    /* 阴影和圆角 */
    --shadow: 0 4px 15px rgba(79, 172, 254, 0.15);
    --shadow-lg: 0 10px 40px rgba(79, 172, 254, 0.2);
    --shadow-hover: 0 8px 25px rgba(79, 172, 254, 0.3);
    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(180deg, #f8faff 0%, #fff 100%);
    min-height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
}

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

/* ===== 按钮样式 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.5);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 16px;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 13px;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #38ef7d 100%);
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #ff8787 100%);
    color: #fff;
}

/* ===== 头部导航 ===== */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(79, 172, 254, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(79, 172, 254, 0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo i {
    font-size: 32px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    gap: 35px;
}

.nav-item {
    color: var(--text-color);
    font-weight: 700;
    padding: 8px 0;
    position: relative;
    font-size: 17px;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

.search-box form {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8faff 0%, #e8f4ff 100%);
    border-radius: 50px;
    padding: 6px 6px 6px 20px;
    border: 2px solid transparent;
    transition: var(--transition);
}

.search-box form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 172, 254, 0.1);
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 200px;
    font-size: 14px;
    color: var(--text-color);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.user-menu {
    position: relative;
}

.user-avatar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px 6px 6px;
    border-radius: 50px;
    background: linear-gradient(135deg, #f8faff 0%, #e8f4ff 100%);
    transition: var(--transition);
}

.user-avatar:hover {
    box-shadow: var(--shadow);
}

.user-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.user-avatar i {
    font-size: 36px;
    color: var(--text-muted);
}

.vip-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    color: #fff;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    margin-top: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    border: 1px solid rgba(79, 172, 254, 0.1);
}

.user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.user-dropdown a:last-child {
    border-bottom: none;
}

.user-dropdown a:hover {
    background: linear-gradient(135deg, #f8faff 0%, #e8f4ff 100%);
    color: var(--primary-color);
}

.user-dropdown a i {
    width: 20px;
    color: var(--primary-color);
}

.auth-links {
    display: flex;
    gap: 12px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 26px;
    color: var(--primary-color);
    cursor: pointer;
}

.mobile-menu {
    display: none;
    background: #fff;
    padding: 20px;
    box-shadow: var(--shadow-lg);
}

.mobile-menu a {
    display: block;
    padding: 14px 0;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
}

/* ===== 首页横幅 ===== */
.hero-section {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 50%, #667eea 100%);
    padding: 100px 0 120px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 52px;
    margin-bottom: 22px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.15);
    font-weight: 800;
    letter-spacing: 2px;
}

.hero-content p {
    font-size: 20px;
    opacity: 0.95;
    margin-bottom: 40px;
    font-weight: 400;
    letter-spacing: 1px;
}

.hero-actions {
    display: flex;
    gap: 22px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 首页横幅按钮 - 更醒目协调 */
.btn-hero-primary {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.45);
    font-size: 18px;
    padding: 18px 42px;
    border-radius: 50px;
    font-weight: 700;
    letter-spacing: 1px;
}

.btn-hero-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.55);
    color: #fff;
}

.btn-hero-outline {
    border-color: #fff;
    color: #fff;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(5px);
    font-size: 18px;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 700;
    letter-spacing: 1px;
    border-width: 2.5px;
}

.btn-hero-outline:hover {
    background: #fff;
    color: #FF6B6B;
}

.hero-actions .btn-outline {
    border-color: #fff;
    color: #fff;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(5px);
}

.hero-actions .btn-outline:hover {
    background: #fff;
    color: var(--primary-color);
}

/* 浮动装饰元素 */
.hero-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-decoration .circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    animation: float 6s ease-in-out infinite;
}

.hero-decoration .circle:nth-child(1) {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.hero-decoration .circle:nth-child(2) {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
    animation-delay: 2s;
}

.hero-decoration .circle:nth-child(3) {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 10%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

/* ===== 区块样式 ===== */
.section {
    padding: 80px 0;
}

.section-gray {
    background: linear-gradient(180deg, #f8faff 0%, #fff 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 36px;
    margin-bottom: 14px;
    color: var(--text-color);
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 17px;
    margin-top: 20px;
}

.view-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    font-weight: 600;
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: 50px;
    background: rgba(79, 172, 254, 0.1);
    transition: var(--transition);
}

.view-more:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateX(5px);
}

/* ===== 年级卡片 ===== */
.grade-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.grade-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 28px 18px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.grade-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.grade-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(79, 172, 254, 0.3);
}

.grade-card:hover::before {
    transform: scaleX(1);
}

.grade-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.grade-card:hover .grade-icon {
    transform: scale(1.15) rotate(5deg);
}

.grade-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.grade-icon svg {
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.1));
    transition: var(--transition);
}

.grade-card:hover .grade-icon svg {
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.15));
}

.grade-icon i {
    font-size: 36px;
    color: var(--primary-color);
    transition: var(--transition);
}

.grade-card:hover .grade-icon i {
    color: #fff;
}

.grade-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 700;
}

.grade-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ===== 学科卡片 ===== */
.subject-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.subject-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 2.5px solid transparent;
}

.subject-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.05) 0%, rgba(102, 126, 234, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.subject-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

/* 学科卡片个性化配色 */
.subject-card-1 { border-color: rgba(255, 107, 107, 0.15); }
.subject-card-1:hover { border-color: #FF6B6B; box-shadow: 0 10px 35px rgba(255, 107, 107, 0.2); }
.subject-card-2 { border-color: rgba(79, 195, 247, 0.15); }
.subject-card-2:hover { border-color: #4FC3F7; box-shadow: 0 10px 35px rgba(79, 195, 247, 0.2); }
.subject-card-3 { border-color: rgba(67, 233, 123, 0.15); }
.subject-card-3:hover { border-color: #43e97b; box-shadow: 0 10px 35px rgba(67, 233, 123, 0.2); }
.subject-card-4 { border-color: rgba(255, 183, 77, 0.15); }
.subject-card-4:hover { border-color: #FFB74D; box-shadow: 0 10px 35px rgba(255, 183, 77, 0.2); }
.subject-card-5 { border-color: rgba(206, 147, 216, 0.15); }
.subject-card-5:hover { border-color: #CE93D8; box-shadow: 0 10px 35px rgba(206, 147, 216, 0.2); }
.subject-card-6 { border-color: rgba(255, 107, 157, 0.15); }
.subject-card-6:hover { border-color: #FF6B9D; box-shadow: 0 10px 35px rgba(255, 107, 157, 0.2); }
.subject-card-7 { border-color: rgba(116, 185, 255, 0.15); }
.subject-card-7:hover { border-color: #74b9ff; box-shadow: 0 10px 35px rgba(116, 185, 255, 0.2); }
.subject-card-8 { border-color: rgba(253, 203, 110, 0.15); }
.subject-card-8:hover { border-color: #fdcb6e; box-shadow: 0 10px 35px rgba(253, 203, 110, 0.2); }

.subject-card:hover::before {
    opacity: 1;
}

.subject-icon-wrapper {
    width: 90px;
    height: 90px;
    margin: 0 auto 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.subject-card:hover .subject-icon-wrapper {
    transform: scale(1.12) rotate(5deg);
}

.subject-icon-wrapper svg {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.subject-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-color);
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.subject-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

/* ===== 资源类型卡片 ===== */
.type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.type-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 35px 28px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 2.5px solid transparent;
}

.type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.type-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

/* 资源类型卡片个性化配色 */
.type-card-1 { border-color: rgba(67, 233, 123, 0.15); }
.type-card-1:hover { border-color: #43e97b; box-shadow: 0 10px 35px rgba(67, 233, 123, 0.2); }
.type-card-1::before { background: linear-gradient(135deg, #43e97b 0%, #38ef7d 100%); }
.type-card-2 { border-color: rgba(255, 152, 0, 0.15); }
.type-card-2:hover { border-color: #FF9800; box-shadow: 0 10px 35px rgba(255, 152, 0, 0.2); }
.type-card-2::before { background: linear-gradient(135deg, #FF9800 0%, #FFB74D 100%); }
.type-card-3 { border-color: rgba(126, 87, 194, 0.15); }
.type-card-3:hover { border-color: #7E57C2; box-shadow: 0 10px 35px rgba(126, 87, 194, 0.2); }
.type-card-3::before { background: linear-gradient(135deg, #7E57C2 0%, #B39DDB 100%); }
.type-card-4 { border-color: rgba(79, 195, 247, 0.15); }
.type-card-4:hover { border-color: #4FC3F7; box-shadow: 0 10px 35px rgba(79, 195, 247, 0.2); }
.type-card-4::before { background: linear-gradient(135deg, #4FC3F7 0%, #81D4FA 100%); }

.type-card:hover::before {
    transform: scaleX(1);
}

.type-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.type-card:hover .type-icon-wrapper {
    transform: scale(1.15);
}

.type-icon-wrapper svg {
    width: 72px;
    height: 72px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.type-card h3 {
    font-size: 19px;
    margin-bottom: 10px;
    color: var(--text-color);
    font-weight: 700;
}

.type-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ===== 资源卡片 ===== */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

.resource-card {
    background: #fff;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid transparent;
}

.resource-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(79, 172, 254, 0.3);
}

.resource-cover {
    display: block;
    position: relative;
    height: 170px;
    overflow: hidden;
}

.resource-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.resource-card:hover .resource-cover img {
    transform: scale(1.1);
}

.resource-cover-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.resource-cover-placeholder i {
    font-size: 55px;
    color: #fff;
    opacity: 0.9;
}

.resource-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(79, 172, 254, 0.4);
}

.resource-info {
    padding: 22px;
}

.resource-info h4 {
    font-size: 17px;
    margin-bottom: 10px;
    line-height: 1.4;
    font-weight: 600;
}

.resource-info h4 a {
    color: var(--text-color);
}

.resource-info h4 a:hover {
    color: var(--primary-color);
}

.resource-info p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.resource-meta {
    display: flex;
    gap: 18px;
    font-size: 13px;
    color: var(--text-muted);
}

.resource-meta i {
    margin-right: 4px;
    color: var(--primary-color);
}

.resource-rating {
    color: #ffc107;
}

/* ===== 统计数据 ===== */
.stats-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    padding: 70px 0;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    pointer-events: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-icon-svg {
    margin-bottom: 12px;
}

.stat-icon-svg svg {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.stat-number {
    font-size: 52px;
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.stat-label {
    font-size: 17px;
    opacity: 0.95;
    font-weight: 500;
}

/* ===== 页脚 ===== */
.footer {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: #fff;
    padding: 70px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-section h3 {
    font-size: 22px;
    margin-bottom: 22px;
    color: #fff;
    font-weight: 700;
}

.footer-section h3 i {
    margin-right: 12px;
    color: var(--primary-color);
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 22px;
    color: #fff;
    font-weight: 600;
}

.footer-section p {
    color: rgba(255,255,255,0.7);
    line-height: 1.8;
    font-size: 14px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-section ul li i {
    margin-right: 10px;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.social-links a {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 25px;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .grade-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .subject-grid,
    .type-grid,
    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu,
    .header-actions .search-box,
    .header-actions .auth-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .mobile-menu.active {
        display: block;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
    
    .hero-content p {
        font-size: 18px;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .grade-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .subject-grid,
    .type-grid,
    .resource-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .stat-number {
        font-size: 40px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .section-title {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .grade-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 24px;
    }
}

/* ===== 表单样式 ===== */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 15px;
    transition: var(--transition);
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 172, 254, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

/* ===== 分页样式 ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 45px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 16px;
    border-radius: 50px;
    font-size: 14px;
    transition: var(--transition);
}

.pagination a {
    background: #fff;
    border: 2px solid var(--border-color);
    color: var(--text-color);
    box-shadow: var(--shadow);
}

.pagination a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.pagination span.current {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.pagination span.ellipsis {
    border: none;
    background: transparent;
}

/* ===== 筛选栏 ===== */
.filter-bar {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 25px;
    margin-bottom: 35px;
    box-shadow: var(--shadow);
    border: 2px solid rgba(79, 172, 254, 0.1);
}

.filter-row {
    display: flex;
    gap: 22px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-weight: 600;
    color: var(--text-muted);
    min-width: 70px;
    display: flex;
    align-items: center;
}

.filter-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-options a {
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 14px;
    background: linear-gradient(135deg, #f8faff 0%, #e8f4ff 100%);
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    border: 2px solid transparent;
}

.filter-options a:hover,
.filter-options a.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    border-color: var(--primary-color);
}

/* ===== 资源详情页 ===== */
.resource-detail {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 35px;
    box-shadow: var(--shadow);
    border: 2px solid rgba(79, 172, 254, 0.1);
}

.resource-header {
    display: flex;
    gap: 35px;
    margin-bottom: 35px;
}

.resource-preview {
    flex: 0 0 320px;
}

.resource-preview img {
    width: 100%;
    border-radius: var(--radius-lg);
}

.resource-info-detail {
    flex: 1;
}

.resource-info-detail h1 {
    font-size: 28px;
    margin-bottom: 18px;
    font-weight: 700;
}

.resource-meta-detail {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.resource-meta-detail span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 15px;
}

.resource-meta-detail span i {
    color: var(--primary-color);
}

.resource-actions {
    display: flex;
    gap: 18px;
    margin-top: 25px;
}

.resource-description {
    border-top: 2px solid var(--border-color);
    padding-top: 35px;
}

.resource-description h3 {
    margin-bottom: 18px;
    font-weight: 700;
}

.resource-description p {
    line-height: 1.9;
    color: var(--text-muted);
}

/* ===== 登录/注册页 ===== */
.auth-section {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4facfe 0%, #667eea 100%);
    padding: 50px 20px;
}

.auth-box {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 50px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 35px;
    font-size: 30px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-links {
    text-align: center;
    margin-top: 25px;
    color: var(--text-muted);
}

.alert {
    padding: 16px 22px;
    border-radius: var(--radius);
    margin-bottom: 22px;
}

.alert-success {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.1) 0%, rgba(56, 239, 125, 0.1) 100%);
    color: #155724;
    border: 1px solid rgba(67, 233, 123, 0.3);
}

.alert-error {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 135, 135, 0.1) 100%);
    color: #721c24;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

/* ===== 后台管理样式 ===== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 270px;
    background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
    color: #fff;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-logo {
    padding: 25px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

.admin-logo a i {
    color: var(--primary-color);
}

.admin-menu {
    padding: 22px 0;
}

.admin-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.admin-menu-item:hover,
.admin-menu-item.active {
    background: rgba(79, 172, 254, 0.15);
    color: #fff;
    border-left: 3px solid var(--primary-color);
}

.admin-menu-item i {
    width: 22px;
    color: var(--primary-color);
}

.admin-main {
    flex: 1;
    margin-left: 270px;
    background: #f5f6fa;
    min-height: 100vh;
}

.admin-header {
    background: #fff;
    padding: 18px 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.admin-content {
    padding: 35px;
}

/* 统计卡片 */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 22px;
    margin-bottom: 35px;
}

.stat-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: rgba(79, 172, 254, 0.3);
    transform: translateY(-3px);
}

.stat-card-title {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 500;
}

.stat-card-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-card-change {
    font-size: 13px;
    margin-top: 8px;
}

.stat-card-change.up {
    color: var(--success-color);
}

.stat-card-change.down {
    color: var(--danger-color);
}

/* 数据表格 */
.data-table {
    width: 100%;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* 辅助函数样式 */
.pink-bg { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); }
.purple-bg { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }
.blue-bg { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.green-bg { background: linear-gradient(135deg, #43e97b 0%, #38ef7d 100%); }
.yellow-bg { background: linear-gradient(135deg, #f6d365 0%, #fda085 100%); }
.coral-bg { background: linear-gradient(135deg, #fda085 0%, #f6d365 100%); }
.mint-bg { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); }
.lavender-bg { background: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%); }
