/* ============================================
   颜色主题变量
   ============================================ */
:root {
    --primary-color: #4F46E5;
    --primary-light: #6366F1;
    --primary-dark: #4338CA;
    --primary-gradient: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
    --primary-shadow: rgba(79, 70, 229, 0.3);
    --primary-shadow-light: rgba(79, 70, 229, 0.1);
    --primary-shadow-medium: rgba(79, 70, 229, 0.25);
    --primary-bg-light: #EEF2FF;
    --primary-bg-lighter: #F5F3FF;
    --primary-border: #E0E7FF;
    --primary-border-light: #C7D2FE;
}

/* 预设颜色主题 */
[data-theme="purple"] {
    --primary-color: #4F46E5;
    --primary-light: #6366F1;
    --primary-dark: #4338CA;
    --primary-gradient: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
    --primary-shadow: rgba(79, 70, 229, 0.3);
    --primary-shadow-light: rgba(79, 70, 229, 0.1);
    --primary-shadow-medium: rgba(79, 70, 229, 0.25);
    --primary-bg-light: #EEF2FF;
    --primary-bg-lighter: #F5F3FF;
    --primary-border: #E0E7FF;
    --primary-border-light: #C7D2FE;
}

[data-theme="blue"] {
    --primary-color: #1E90FF;
    --primary-light: #00BFFF;
    --primary-dark: #1C7ED6;
    --primary-gradient: linear-gradient(135deg, #1E90FF 0%, #00BFFF 100%);
    --primary-shadow: rgba(30, 144, 255, 0.3);
    --primary-shadow-light: rgba(30, 144, 255, 0.1);
    --primary-shadow-medium: rgba(30, 144, 255, 0.25);
    --primary-bg-light: #E6F3FF;
    --primary-bg-lighter: #F0F8FF;
    --primary-border: #B3D9FF;
    --primary-border-light: #D6E9FF;
}

[data-theme="green"] {
    --primary-color: #10B981;
    --primary-light: #34D399;
    --primary-dark: #059669;
    --primary-gradient: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    --primary-shadow: rgba(16, 185, 129, 0.3);
    --primary-shadow-light: rgba(16, 185, 129, 0.1);
    --primary-shadow-medium: rgba(16, 185, 129, 0.25);
    --primary-bg-light: #D1FAE5;
    --primary-bg-lighter: #ECFDF5;
    --primary-border: #A7F3D0;
    --primary-border-light: #C6F6D5;
}

[data-theme="orange"] {
    --primary-color: #F59E0B;
    --primary-light: #FBBF24;
    --primary-dark: #D97706;
    --primary-gradient: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
    --primary-shadow: rgba(245, 158, 11, 0.3);
    --primary-shadow-light: rgba(245, 158, 11, 0.1);
    --primary-shadow-medium: rgba(245, 158, 11, 0.25);
    --primary-bg-light: #FEF3C7;
    --primary-bg-lighter: #FFFBEB;
    --primary-border: #FCD34D;
    --primary-border-light: #FDE68A;
}

[data-theme="pink"] {
    --primary-color: #EC4899;
    --primary-light: #F472B6;
    --primary-dark: #DB2777;
    --primary-gradient: linear-gradient(135deg, #EC4899 0%, #F472B6 100%);
    --primary-shadow: rgba(236, 72, 153, 0.3);
    --primary-shadow-light: rgba(236, 72, 153, 0.1);
    --primary-shadow-medium: rgba(236, 72, 153, 0.25);
    --primary-bg-light: #FCE7F3;
    --primary-bg-lighter: #FDF2F8;
    --primary-border: #FBCFE8;
    --primary-border-light: #FCE4EC;
}

[data-theme="red"] {
    --primary-color: #EF4444;
    --primary-light: #F87171;
    --primary-dark: #DC2626;
    --primary-gradient: linear-gradient(135deg, #EF4444 0%, #F87171 100%);
    --primary-shadow: rgba(239, 68, 68, 0.3);
    --primary-shadow-light: rgba(239, 68, 68, 0.1);
    --primary-shadow-medium: rgba(239, 68, 68, 0.25);
    --primary-bg-light: #FEE2E2;
    --primary-bg-lighter: #FEF2F2;
    --primary-border: #FECACA;
    --primary-border-light: #FED7D7;
}

[data-theme="cyan"] {
    --primary-color: #06B6D4;
    --primary-light: #22D3EE;
    --primary-dark: #0891B2;
    --primary-gradient: linear-gradient(135deg, #06B6D4 0%, #22D3EE 100%);
    --primary-shadow: rgba(6, 182, 212, 0.3);
    --primary-shadow-light: rgba(6, 182, 212, 0.1);
    --primary-shadow-medium: rgba(6, 182, 212, 0.25);
    --primary-bg-light: #CFFAFE;
    --primary-bg-lighter: #ECFEFF;
    --primary-border: #A5F3FC;
    --primary-border-light: #C7F7F7;
}

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

body { 
    font-family: '微软雅黑', 'Arial', sans-serif; 
    line-height: 1.6;
    background-color: #F5F7FA;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overflow-x: hidden;
}

.header-section {
    background: var(--primary-gradient);
    color: #fff;
    padding: 50px 0 0;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.header-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.05)"/></svg>') repeat;
    background-size: 100px 100px;
    pointer-events: none;
}

.header-section h1 { 
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.header-section p { 
    font-size: 16px;
    opacity: 0.95;
    font-weight: 300;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
}

.announcement-bar {
    background: rgba(255,255,255,0.1);
    padding: 15px 0 20px;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.announcement-content {
    display: flex;
    align-items: center;
}

.announcement-content i {
    font-size: 16px;
    color: #FBBF24;
    flex-shrink: 0;
    margin-right: 15px;
}

.announcement-text {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    visibility: hidden;
}

.announcement-text::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    white-space: nowrap;
    visibility: visible;
    animation: marquee 20s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.file-card {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    padding: 30px;
    max-width: 1000px;
    margin: 0 auto;
    margin-bottom: 50px;
    border: 1px solid #F0F0F0;
}

.file-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #F5F5F5;
}

.file-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--primary-shadow);
}

.file-icon i {
    font-size: 32px;
    color: #fff;
}

.file-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-meta {
    flex: 1;
    min-width: 0;
}

.file-meta h2 {
    font-size: 20px;
    margin-bottom: 6px;
    color: #333;
    font-weight: 600;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    line-height: 1.4;
}

.file-meta .category-wrapper {
    margin-bottom: 8px;
    margin-top: 4px;
}

.file-meta .category-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--primary-gradient);
    color: #fff;
    white-space: nowrap;
    box-shadow: 0 2px 8px var(--primary-shadow);
}

.file-meta .category-badge i {
    margin-right: 4px;
}

.file-meta .file-size {
    font-size: 14px;
    color: #888;
    font-weight: 500;
}

.file-meta .publish-time,
.file-meta .view-count,
.file-meta .publisher-text {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
    display: flex;
    align-items: center;
    line-height: 1.8;
}

.file-meta .publish-time i,
.file-meta .view-count i,
.file-meta .publisher-text i {
    margin-right: 6px;
    color: var(--primary-color);
    font-size: 12px;
    width: 14px;
    min-width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-shrink: 0;
}

.info-module {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, #FAFBFC 0%, #F5F7FA 100%);
    border-radius: 12px;
    border: 1px solid #E8ECF0;
}

.info-module .title {
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-module .title .related-label {
    float: right;
    background: var(--primary-gradient);
    color: #fff;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: 0 2px 6px var(--primary-shadow);
}

.info-module .content {
    font-size: 15px;
    color: #555;
    line-height: 1.8;
    word-wrap: break-word;
}

.user-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #F0F8FF 0%, #E6F3FF 100%);
    border-radius: 20px;
    border: 1px solid #D6E9FF;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px var(--primary-shadow);
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-avatar i {
    font-size: 16px;
    color: #fff;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.status-normal {
    color: #20C997;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: linear-gradient(135deg, #E8F9F3 0%, #D4F1E9 100%);
    border-radius: 20px;
    border: 1px solid #C3E8DB;
}

.status-normal i {
    margin-right: 8px;
    font-size: 16px;
}

.status-error {
    color: #DC3545;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: linear-gradient(135deg, #FDE8E8 0%, #FBD5D5 100%);
    border-radius: 20px;
    border: 1px solid #F5C6C6;
}

.status-error i {
    margin-right: 8px;
    font-size: 16px;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 13px;
    color: #1a1a1a;
    margin-right: 10px;
    margin-bottom: 8px;
    font-weight: 500;
    background: linear-gradient(135deg, var(--primary-bg-lighter) 0%, var(--primary-bg-light) 100%);
    border: 1px solid var(--primary-border);
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px var(--primary-shadow-light);
}

.tag-badge:hover {
    background: var(--primary-gradient);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-shadow-medium);
}

.tag-badge:last-child {
    margin-right: 0;
}

.related-downloads-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-bg-lighter) 0%, var(--primary-bg-light) 100%);
    border: 1px solid var(--primary-border);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px var(--primary-shadow-light);
}

.related-download-item:hover {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-shadow-medium);
}

.related-download-item:hover .related-download-name,
.related-download-item:hover .related-download-size,
.related-download-item:hover .related-download-date,
.related-download-item:hover .related-download-arrow {
    color: #fff;
}

.related-download-info {
    flex: 1;
}

.related-download-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
    transition: color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.related-download-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #666;
    transition: color 0.3s ease;
}

.related-download-size,
.related-download-date {
    display: flex;
    align-items: center;
}

.related-download-arrow {
    color: var(--primary-color);
    font-size: 14px;
    transition: all 0.3s ease;
}

.related-download-item:hover .related-download-arrow {
    transform: translateX(4px);
}

.download-btn {
    width: 100%;
    padding: 16px 24px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px var(--primary-shadow);
    transition: all 0.3s ease;
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--primary-shadow);
}

.download-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-shadow);
}

.download-btn i {
    font-size: 18px;
}

.request-resource-btn {
    width: 100%;
    padding: 14px 24px;
    background: #F0F9FF;
    color: #0284C7;
    border: 2px dashed #7DD3FC;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.request-resource-btn:hover {
    background: #E0F2FE;
    border-color: #0EA5E9;
    color: #0369A1;
    transform: translateY(-2px);
}

.request-resource-btn i {
    font-size: 16px;
    color: #0EA5E9;
}

.stats-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #F0F8FF 0%, #E6F3FF 100%);
    border-radius: 12px;
    border: 1px solid #B3D9FF;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.stat-item i {
    color: var(--primary-color);
    font-size: 16px;
}

.stat-item span {
    color: #666;
}

.ad-section-small {
    margin: 20px 0;
}

.ad-banner-small {
    width: 100%;
    position: relative;
}

.ad-label {
    position: absolute;
    top: 0;
    left: 0;
    background: #FF6B6B;
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 8px 0 8px 0;
    font-weight: 600;
    z-index: 10;
}

.ad-placeholder-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 90px;
    background: linear-gradient(135deg, #F8F9FA 0%, #E9ECEF 100%);
    border: 2px dashed #CED4DA;
    border-radius: 8px;
    color: #6C757D;
}

.ad-placeholder-small i {
    font-size: 24px;
    margin-bottom: 8px;
}

.ad-placeholder-small p {
    font-size: 12px;
    font-weight: 500;
    margin: 0;
}

.ad-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ad-text {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 90px;
    padding: 0 20px;
    background: var(--primary-gradient);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.ad-text:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-shadow);
}

.ad-image {
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f8f9fa;
}

.ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ad-image:hover img {
    transform: scale(1.05);
}

.safety-section {
    text-align: center;
    padding: 30px 0;
    background-color: #F0F8FF;
    border-top: 1px solid #E6F3FF;
}

.safety-section .safety-tags {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-section {
    text-align: center;
    padding: 40px 0;
    background-color: #fff;
    border-top: 1px solid #E8ECF0;
    margin-top: 50px;
}

.footer-section .copyright {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.8;
}

.footer-section .safety-tags {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.safety-tag {
    background-color: #fff;
    color: var(--primary-color);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--primary-border);
    box-shadow: 0 2px 8px var(--primary-shadow-light);
    transition: all 0.3s ease;
}

.safety-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-shadow-light);
}

.safety-tag i {
    margin-right: 6px;
    font-size: 14px;
}

.copyright-section {
    text-align: center;
    padding: 30px 0;
    background-color: #fff;
    border-top: 1px solid #E8ECF0;
}

.copyright-section .copyright-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.copyright-section .copyright-main {
    min-width: 300px;
}

.copyright-section .copyright {
    font-size: 13px;
    color: #666;
    line-height: 1.8;
}

.copyright-section .copyright i {
    margin-right: 5px;
    color: var(--primary-color);
}

.copyright-section .copyright-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.copyright-section .copyright-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--primary-bg-lighter) 0%, var(--primary-bg-light) 100%);
    border: 1px solid var(--primary-border);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copyright-section .copyright-link:hover {
    background: var(--primary-gradient);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-shadow-medium);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 700px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 28px 32px;
    border-bottom: 1px solid #E8ECF0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: #333;
    background: #F5F5F5;
}

.modal-body {
    padding: 20px 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #E8ECF0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.password-form-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    padding: 40px 0;
}

.password-form {
    max-width: 400px;
    width: 100%;
    padding: 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border: 1px solid #F0F0F0;
}

.password-form h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.password-form .input-group {
    position: relative;
    margin-bottom: 16px;
}

.password-form .form-control {
    width: 100%;
    padding: 14px 16px;
    padding-left: 44px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    font-size: 14px;
}

.password-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-shadow-light);
}

.password-form .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 14px;
}

.password-form .btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--primary-shadow);
    transition: all 0.3s ease;
}

.password-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--primary-shadow);
}

.download-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--primary-bg-light);
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--primary-color);
    border: 1px solid var(--primary-border-light);
}

.download-tip i {
    font-size: 14px;
}

.cloud-option {
    display: flex;
    align-items: center;
    padding: 14px;
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.cloud-option:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px var(--primary-shadow-light);
}

.cloud-option:last-child {
    margin-bottom: 0;
}

.cloud-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    margin-right: 14px;
    background: #fff;
    border: 1px solid #E2E8F0;
}

.cloud-icon i {
    font-size: 20px;
    color: #94A3B8;
}

.cloud-info {
    flex: 1;
}

.cloud-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
}

.cloud-info p {
    font-size: 13px;
    color: #666;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-btn {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    font-weight: 500;
}

.copy-btn:hover {
    opacity: 0.9;
}

.cloud-btn {
    padding: 10px 20px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px var(--primary-shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cloud-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-shadow);
}

.cloud-btn:active {
    transform: translateY(0);
}

.cloud-btn.loading {
    pointer-events: none;
    opacity: 0.8;
    color: transparent;
}

.cloud-btn.loading::before {
    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-sweep 0.8s infinite;
}

.cloud-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes loading-sweep {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.copy-success-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-gradient);
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    z-index: 10000;
    box-shadow: 0 4px 16px var(--primary-shadow);
}

.copy-success-toast i {
    color: #4ADE80;
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-danger {
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
    color: #DC2626;
    border: 1px solid #FECACA;
}

.alert-success {
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
    color: #16A34A;
    border: 1px solid #BBF7D0;
}

@media (max-width: 768px) {
    .header-section {
        padding: 40px 0 0;
    }
    
    .header-section h1 { 
        font-size: 24px;
    }
    
    .header-section p { 
        font-size: 14px;
    }
    
    .file-card {
        padding: 20px;
        margin: 0 12px 30px;
        border-radius: 14px;
    }
    
    .file-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .file-icon {
        margin-right: 0;
        margin-bottom: 16px;
        width: 60px;
        height: 60px;
    }
    
    .file-meta {
        text-align: center;
        width: 100%;
    }

    .file-meta h2 {
        font-size: 18px;
        overflow-wrap: break-word;
        word-break: break-word;
        max-width: 100%;
        padding: 0 10px;
    }
    
    .file-meta .category-wrapper {
        padding: 0 10px;
    }
    
    .file-meta .publish-time,
    .file-meta .view-count,
    .file-meta .publisher-text {
        justify-content: center;
    }
    
    .file-meta .publish-time i,
    .file-meta .view-count i,
    .file-meta .publisher-text i {
        width: 14px;
        min-width: 14px;
        height: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .info-module {
        padding: 16px;
    }
    
    .download-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .request-resource-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .safety-section {
        padding: 20px 0;
    }
    
    .safety-tag {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .copyright-section {
        padding: 20px 0;
    }
    
    .copyright-section .copyright {
        font-size: 12px;
    }
    
    .copyright-section .copyright-link {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .password-form-wrapper {
        padding: 20px 0;
        min-height: auto;
    }
    
    .password-form {
        margin: 0;
        padding: 24px;
    }
    
    .password-form h3 {
        font-size: 18px;
    }
    
    .cloud-option {
        flex-wrap: wrap;
    }
    
    .cloud-btn {
        width: 100%;
        margin-top: 12px;
    }
    
    .related-downloads-list {
        gap: 10px;
    }
    
    .related-download-item {
        padding: 12px;
    }
    
    .related-download-name {
        font-size: 14px;
    }
    
    .related-download-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* ============================================
   颜色选择器
   ============================================ */
.theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.theme-toggle-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.theme-toggle-btn i {
    font-size: 18px;
    color: var(--primary-color);
}

.theme-panel {
    position: absolute;
    top: 54px;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 16px;
    display: none;
    min-width: 160px;
}

.theme-panel.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.theme-panel-title {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 12px;
    text-align: center;
}

.theme-colors {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.theme-color-item {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.theme-color-item:hover {
    transform: scale(1.15);
}

.theme-color-item.active {
    border-color: #333;
}

.theme-color-item.active::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.theme-color-purple { background: linear-gradient(135deg, #4F46E5, #6366F1); }
.theme-color-blue { background: linear-gradient(135deg, #1E90FF, #00BFFF); }
.theme-color-green { background: linear-gradient(135deg, #10B981, #34D399); }
.theme-color-orange { background: linear-gradient(135deg, #F59E0B, #FBBF24); }
.theme-color-pink { background: linear-gradient(135deg, #EC4899, #F472B6); }
.theme-color-red { background: linear-gradient(135deg, #EF4444, #F87171); }
.theme-color-cyan { background: linear-gradient(135deg, #06B6D4, #22D3EE); }

@media (max-width: 768px) {
    .theme-switcher {
        top: 15px;
        right: 15px;
    }
    
    .theme-toggle-btn {
        width: 40px;
        height: 40px;
    }
    
    .theme-toggle-btn i {
        font-size: 16px;
    }
    
    .theme-panel {
        top: 50px;
        right: 0;
    }
}
