/* 视频播放视频播放列表页面样式 */
body {
    font-family: 'Inter', system-ui, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
    color: #1e293b;
    line-height: 1.6;
}

.container {
    width: 92%;
    max-width: 1280px;
    margin: 24px auto;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 24px;
}

/* 上传区域优化 */
.upload-section {
    margin-bottom: 32px;
    padding: 24px;
    background-color: #f8fafc;
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
    transition: all 0.3s ease;
}

.upload-section:hover {
    border-color: #94a3b8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.upload-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-section h3 i {
    color: #3b82f6;
}

.upload-limit {
    font-size: 0.9rem;
    color: #64748b;
    margin: -10px 0 16px 0;
    padding-left: 32px;
}

.upload-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.upload-btn {
    padding: 12px 24px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(59, 130, 246, 0.2);
}

.upload-btn:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background-color: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    max-width: 600px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease;
}

.file-info:hover {
    border-color: #94a3b8;
}

.file-icon {
    color: #3b82f6;
    font-size: 1.8rem;
    padding: 8px;
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 6px;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #1e293b;
}

.file-path {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 4px 0;
    font-style: italic;
}

.file-size {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

.file-actions {
    display: flex;
    gap: 10px;
}

.upload-progress-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-top: 12px;
}

.upload-progress {
    flex: 1;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.progress-bar {
    height: 100%;
    background-color: #10b981;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-percentage {
    min-width: 45px;
    text-align: right;
    color: #334155;
    font-weight: 600;
}

.upload-stats {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    padding: 0 12px;
}

.upload-preview {
    margin-top: 16px;
    max-width: 400px;
    border-radius: 8px;
    overflow: hidden;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.upload-preview video {
    width: 100%;
    border: 1px solid #e2e8f0;
}

.upload-error {
    color: #ef4444;
    margin: 10px 0 0 0;
    font-size: 0.9rem;
    display: none;
    padding: 8px 12px;
    background-color: rgba(239, 68, 68, 0.1);
    border-radius: 6px;
    border-left: 3px solid #ef4444;
}

.upload-status {
    font-size: 0.9rem;
    color: #334155;
    margin-top: 8px;
    padding: 8px 12px;
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 6px;
}

/* 播放控制区域优化 */
.player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
    padding: 24px;
    background-color: #f8fafc;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

#videoPlayer {
    width: 100%;
    max-width: 800px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

#videoPlayer:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.now-playing {
    width: 100%;
    max-width: 800px;
    text-align: center;
    margin-bottom: 20px;
    padding: 12px 16px;
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 6px;
    border-left: 4px solid #3b82f6;
}

.now-playing h3 {
    margin: 0 0 6px 0;
    color: #2563eb;
    font-size: 1.1rem;
    font-weight: 600;
}

.control-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.control-buttons button {
    padding: 12px 24px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(59, 130, 246, 0.2);
}

.control-buttons button:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.control-buttons button:active {
    transform: translateY(0);
}

#volumeControl {
    width: 200px;
    margin-top: 12px;
    accent-color: #3b82f6;
    cursor: pointer;
}

/* 播放列表优化 */
#playlist {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 32px;
}

#playlist h2 {
    margin: 0;
    padding: 16px 24px;
    background-color: #3b82f6;
    color: white;
    font-size: 1.3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.jump-to-page2-btn {
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.jump-to-page2-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

#fileInput {
    display: none;
}

.playlist-header {
    display: grid;
    grid-template-columns: 60px 1fr 150px;
    padding: 12px 24px;
    background-color: #f1f5f9;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
}

.playlist-items {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.playlist-item {
    display: grid;
    grid-template-columns: 60px 1fr 150px;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    cursor: pointer;
}

.playlist-item:hover {
    background-color: #f8fafc;
    transform: translateX(4px);
}

.playlist-item.active {
    background-color: rgba(59, 130, 246, 0.08);
    border-left: 4px solid #3b82f6;
}

.item-number {
    font-weight: 600;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(59, 130, 246, 0.1);
}

.item-title {
    font-weight: 500;
    color: #1e293b;
    transition: color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-item:hover .item-title {
    color: #2563eb;
}

.item-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    transition: all 0.3s ease;
    padding: 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    color: #2563eb;
    background-color: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.play-btn {
    color: #10b981;
}

.play-btn:hover {
    color: #059669;
    background-color: rgba(16, 185, 129, 0.1);
}

/* 跳转按钮区域优化 */
.jump-buttons {
    margin-top: 32px;
    padding: 24px;
    background-color: #f8fafc;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.jump-buttons h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.jump-buttons h3 i {
    color: #3b82f6;
}

.button-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.jump-btn {
    padding: 12px 24px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(59, 130, 246, 0.2);
}

.jump-btn:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

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

.loading {
    text-align: center;
    padding: 30px 20px;
    color: #64748b;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.loading i {
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计优化 - 增强手机适配 */
@media (max-width: 768px) {
    .container {
        width: 96%;
        padding: 16px;
        margin: 12px auto;
    }

    .control-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .control-buttons button {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .playlist-header {
        grid-template-columns: 50px 1fr 120px;
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .playlist-item {
        grid-template-columns: 50px 1fr 120px;
        padding: 12px 16px;
    }

    .item-actions {
        gap: 8px;
    }

    .button-group {
        gap: 12px;
    }

    .jump-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
        flex: 1;
        min-width: 150px;
        justify-content: center;
    }

    .upload-section, .player-controls, .jump-buttons {
        padding: 16px;
    }

    /* 搜索框适配 */
    #playlist h2 {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    #playlist h2 div {
        width: 100%;
    }
    
    #searchInput {
        width: 100% !important;
        box-sizing: border-box;
    }
}

/* 手机小屏幕适配 (360px - 480px) */
@media (max-width: 480px) {
    .container {
        width: 98%;
        padding: 10px;
        margin: 6px auto;
        border-radius: 8px;
    }

    .upload-section h3,
    .jump-buttons h3 {
        font-size: 1.1rem;
        flex-wrap: wrap;
    }

    .upload-limit {
        padding-left: 0;
        font-size: 0.85rem;
        margin: 0 0 12px 0;
    }

    .upload-btn {
        width: 100%;
        justify-content: center;
        padding: 10px;
        font-size: 0.9rem;
    }

    .file-info {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
    }

    .file-icon {
        align-self: center;
        margin-bottom: 8px;
    }

    .upload-progress-container {
        padding: 8px;
    }

    .upload-stats {
        flex-direction: column;
        gap: 4px;
        font-size: 0.8rem;
    }

    #videoPlayer {
        margin-bottom: 12px;
    }

    .now-playing {
        padding: 8px 12px;
        margin-bottom: 12px;
    }

    .now-playing h3 {
        font-size: 1rem;
    }

    .now-playing p {
        font-size: 0.9rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .control-buttons {
        gap: 8px;
        margin-bottom: 12px;
    }

    .control-buttons button {
        padding: 8px 12px;
        font-size: 0.85rem;
        flex: 1;
        min-width: auto;
    }

    .control-buttons button i {
        font-size: 1rem;
    }

    #playbackRate {
        padding: 8px;
        font-size: 0.85rem;
    }

    #volumeControl {
        width: 120px;
    }

    .playlist-header {
        grid-template-columns: 40px 1fr 90px;
        font-size: 0.85rem;
        padding: 10px 12px;
    }

    .playlist-item {
        grid-template-columns: 40px 1fr 90px;
        padding: 10px 12px;
    }

    .item-number {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .item-actions {
        gap: 5px;
    }

    .action-btn {
        padding: 4px;
        font-size: 0.85rem;
    }

    .jump-buttons {
        padding: 12px;
        margin-top: 20px;
    }

    .button-group {
        gap: 8px;
    }

    .jump-btn {
        padding: 10px;
        font-size: 0.85rem;
        flex: 100%;
        justify-content: center;
    }

    .loading {
        padding: 20px 10px;
        font-size: 0.9rem;
    }
}

/* 超小屏幕手机适配 (<360px) */
@media (max-width: 360px) {
    .control-buttons {
        flex-wrap: wrap;
    }

    .control-buttons button {
        flex-basis: calc(50% - 8px);
    }

    .playlist-header,
    .playlist-item {
        grid-template-columns: 35px 1fr 80px;
    }

    .item-title {
        font-size: 0.85rem;
    }

    .jump-btn {
        font-size: 0.8rem;
    }
}