/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: #ff6b8b;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-block {
    width: 100%;
    justify-content: center;
    margin-top: 20px;
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* 欢迎区域 */
.welcome-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.welcome-content h1 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 2.5rem;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    background: #f8f9fa;
    padding: 15px 25px;
    border-radius: 10px;
    min-width: 180px;
}

.stat-item i {
    color: #667eea;
    font-size: 1.5rem;
}

.stat-item span {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.3rem;
}

/* 媒体区域 */
.media-section {
    margin-bottom: 50px;
}

.media-section h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.media-section h2 i {
    color: #667eea;
}

/* 媒体网格 */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* 媒体卡片 */
.media-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    position: relative;
}

.media-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.media-card.video::before {
    content: '▶';
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 1;
}

.media-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
}

.media-info {
    padding: 20px;
}

.media-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 1.1rem;
}

.media-meta {
    display: flex;
    justify-content: space-between;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.delete-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-card:hover .delete-btn {
    opacity: 1;
}

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

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 900px;
    position: relative;
    animation: modalFade 0.3s;
}

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

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

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
}

/* 上传区域 */
.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.upload-area:hover {
    background: #e9ecef;
    border-color: #764ba2;
}

.upload-area i {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 20px;
}

.upload-area p {
    font-size: 1.2rem;
    color: #495057;
    margin-bottom: 10px;
}

.hint {
    color: #6c757d !important;
    font-size: 0.9rem !important;
}

#fileInput {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.file-list {
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
}

.file-item i {
    color: #667eea;
    font-size: 1.5rem;
}

.file-size {
    color: #6c757d;
    font-size: 0.9rem;
}

/* 视频播放器 */
.video-player {
    width: 95%;
    max-width: 1000px;
}

#videoPlayer {
    width: 100%;
    max-height: 70vh;
    background: #000;
    border-radius: 10px 10px 0 0;
}

.video-info {
    padding: 20px;
}

/* 图片查看器 */
.image-viewer {
    width: 95%;
    max-width: 900px;
}

#imageViewer {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    background: #f8f9fa;
    border-radius: 10px 10px 0 0;
}

.image-info {
    padding: 20px;
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
}

.footer-hint {
    margin-top: 10px;
    color: #bdc3c7;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .stats {
        gap: 20px;
    }
    
    .stat-item {
        min-width: 140px;
        padding: 12px 20px;
    }
    
    .welcome-content h1 {
        font-size: 2rem;
    }
    
    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

@media (max-width: 480px) {
    .media-grid {
        grid-template-columns: 1fr;
    }
    
    .welcome-section {
        padding: 25px;
    }
    
    .stat-item {
        min-width: 100%;
    }
}