/* ========== 基础重置 & 原有样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: #0a0a0a;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

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

.header {
    text-align: center;
    margin-bottom: 60px;
    padding-bottom: 30px;
    border-bottom: 1px solid #333;
}

.site-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #fff, #a0a0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.site-subtitle {
    font-size: 1.2rem;
    color: #b0b0b0;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.tag {
    background-color: #222;
    color: #ccc;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid #444;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.tag:hover {
    background-color: #333;
    transform: translateY(-2px);
    color: #fff;
}

/* 文件网格 */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

.file-card {
    background-color: #151515;
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-card:hover {
    transform: translateY(-5px);
    border-color: #666;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.file-preview {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background-color: #0a0a0a;
}

.video-preview {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background-color: #0a0a0a;
}

.audio-preview {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #aaa;
    font-size: 48px;
}

.file-info {
    padding: 12px;
}

.file-name {
    font-size: 0.9rem;
    color: #e0e0e0;
    word-break: break-all;
    margin-bottom: 5px;
    font-weight: 500;
}

.file-meta {
    font-size: 0.75rem;
    color: #888;
}

/* 页脚 */
.footer {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333;
    color: #777;
    font-size: 0.9rem;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 1000px;
    background-color: #1a1a1a;
    border-radius: 16px;
    border: 1px solid #444;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #aaa;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 1;
}

.modal-close:hover {
    color: #fff;
}

#modalBody {
    margin-top: 10px;
    text-align: center;
}

#modalBody img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
}

#modalBody video {
    width: 100%;
    max-height: 70vh;
    outline: none;
    border-radius: 8px;
}

#modalBody audio {
    width: 100%;
    margin-top: 30px;
}

.modal-title {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.2rem;
    text-align: center;
}

/* 响应式 */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    .site-title {
        font-size: 2rem;
    }
    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    .modal-content {
        width: 95%;
        margin: 15% auto;
        padding: 15px;
    }
}

/* 音乐控件（如果启用） */
.music-player {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    cursor: pointer;
    width: 48px;
    height: 48px;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.music-icon {
    color: #fff;
    font-size: 24px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.music-icon.rotating {
    animation: spin 6s linear infinite;
}