* {
    box-sizing: border-box;
    font-family: system-ui, 'Segoe UI', 'Helvetica Neue', sans-serif;
}

body {
    background: #f8f9fa;
    margin: 0;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.navbar {
    height: 80px !important;
}

/* 主容器 */
.video-compressor-container {
    max-width: 1200px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 2rem;
    box-shadow: 0 5px 15px 2px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    padding: 2rem;
    transition: all 0.3s;
    margin-top: 70px;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    color: #333;
    text-align: center;
}

.sub {
    text-align: center;
    color: #6b7280;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* 控制栏 */
.controls-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
    background: #f3f4f6;
    padding: 20px;
    border-radius: 1.5rem;
}

.upload-area {
    flex: 2;
    min-width: 200px;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #0D6EFD;
    color: white;
    padding: 12px 28px;
    border-radius: 60px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 1rem;
}

.upload-btn:hover {
    transform: scale(0.97);
}

#videoInput {
    display: none;
}

.quality-panel {
    flex: 3;
    min-width: 240px;
}

.quality-header {
    display: flex;
    justify-content: space-between;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.quality-value {
    background: #eef2ff;
    padding: 4px 12px;
    border-radius: 40px;
    font-weight: 700;
    color: #0D6EFD;
}

input[type="range"] {
    width: 100%;
    height: 5px;
    border-radius: 10px;
    background: #cbd5e1;
    -webkit-appearance: none;
}

input[type="range"]:focus {
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #0D6EFD;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: 2px solid white;
}

.action-buttons {
    align-items: center;
    margin-top: 14px;
    border-radius: 20px !important;
    gap: 12px;
    justify-content: flex-end;
}

.cleanbtn {
    color: #e74032 !important;
}

.btn {
    border: none;
    padding: 0px 20px;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #cddfe7;
   
    height: 40px;
}

.btn-primary {
    background: #0D6EFD;
    color: white;
    border: none;
    padding: 0 20px;
    height: 40px;
    line-height: 40px;
}

.btn-primary:hover {
    transform: scale(0.97);
}

.btn:hover {
    transform: scale(0.97);
}

/* 高级选项 */
.advanced-options {
    margin-top: 15px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: center;
	
}

.option-item {
    display: flex;
    align-items: center;
    gap: 10px;
	
}

.option-item label {
    font-size: 0.85rem;
    color: #374151;
	

}

.option-item input{
    padding: 6px 10px;
    border-radius: 20px;
    border: 1px solid #d1d5db;
    width: 100px;
    text-align: center;
	
}
 .option-item select {
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #d1d5db;
    width: 100px;
    text-align: center;
	
}
/* 视频网格卡片区 */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.video-card {
    background: white;
    border-radius: 1.2rem;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    border: 1px solid #e5e7eb;
}

.video-card:hover {
    transform: translateY(-4px);
}

.card-header {
    padding: 12px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6b7280;
}

.preview-area {
    background: #1a1a2e;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    padding: 16px;
    position: relative;
}

.preview-video {
    max-width: 100%;
    max-height: 180px;
    border-radius: 8px;
    cursor: pointer;
}

.compress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 8px;
}

.compress-progress-text {
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.progress-bar-container {
    width: 80%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar-fill {
    height: 100%;
    background: #10b981;
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

.compress-stage {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    margin-top: 8px;
}

.info-panel {
    padding: 12px;
    font-size: 0.8rem;
    background: white;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 8px;
}

.compress-status {
    color: #10b981;
    font-weight: 600;
}

.compress-warning {
    color: #f59e0b;
    font-weight: 600;
}

.btnheight {
	padding: 8px 16px !important;
}

.download-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 0px 16px;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    margin: 12px;
    width: calc(100% - 24px);
    transition: 0.2s;
}



.download-btn:hover {
    background: #059669;
    transform: scale(0.98);
}

.download-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    font-size: 1rem;
}

footer {
    margin-top: 30px;
    text-align: center;
    font-size: 0.8rem;
    color: #9ca3af;
}

.ratio-badge {
    background: #eef2ff;
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 0.7rem;
}

.loading-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 40px;
    z-index: 9999;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

@media (max-width: 640px) {
    .video-compressor-container {
        padding: 1rem;
    }
    .controls-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .action-buttons {
        justify-content: stretch;
    }
    .btn {
        text-align: center;
    }
    .videos-grid {
        grid-template-columns: 1fr;
    }
    .advanced-options {
        flex-direction: column;
        align-items: stretch;
    }
    .option-item {
        justify-content: space-between;
    }
}