/* Video Compressor Tool Styles */

.video-compressor {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Upload Section */
.upload-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.upload-section h3 {
    margin: 0 0 20px 0;
    color: #374151;
    font-size: 1.25rem;
    font-weight: 600;
}

.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: #f9fafb;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-style: solid;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.7;
}

.upload-text {
    font-size: 18px;
    color: #374151;
    margin-bottom: 8px;
    font-weight: 500;
}

.upload-hint {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 15px;
}

.supported-formats {
    font-size: 12px;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
}

.file-info {
    display: none;
    margin-top: 20px;
    padding: 15px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
}

.file-info.show {
    display: block;
}

.file-name {
    font-weight: 600;
    color: #166534;
    margin-bottom: 8px;
    word-break: break-all;
}

.file-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #166534;
}

.file-stats span {
    background: #dcfce7;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* Preview Section */
.preview-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.preview-section h3 {
    margin: 0 0 20px 0;
    color: #374151;
    font-size: 1.25rem;
    font-weight: 600;
}

.video-preview {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.video-preview video {
    width: 100%;
    height: auto;
    max-height: 400px;
    display: block;
}

/* Settings Section */
.settings-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.settings-section h3 {
    margin: 0 0 25px 0;
    color: #374151;
    font-size: 1.25rem;
    font-weight: 600;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.setting-group {
    display: flex;
    flex-direction: column;
}

.setting-group.full-width {
    grid-column: 1 / -1;
}

.setting-group label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.setting-group select {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s ease;
}

.setting-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Slider Styles */
.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.slider-container input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-value {
    font-weight: 500;
    color: #374151;
    min-width: 80px;
    text-align: right;
    font-size: 14px;
}

/* Quality Presets */
.quality-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.preset-btn {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #f9fafb;
    color: #374151;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.preset-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Checkbox Styles */
.setting-group input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

/* Compression Info */
.compression-info {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-label {
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.info-value {
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
}

/* Action Section */
.action-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    min-width: 140px;
    justify-content: center;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-icon {
    font-size: 16px;
}

/* Progress Section */
.progress-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.progress-section h3 {
    margin: 0 0 20px 0;
    color: #374151;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-text {
    font-weight: 600;
    color: #374151;
    font-size: 16px;
}

.progress-time {
    color: #6b7280;
    font-size: 14px;
}

.progress-details {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
}

/* Result Section */
.result-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.result-section h3 {
    margin: 0 0 25px 0;
    color: #374151;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
}

.result-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.comparison-item {
    text-align: center;
}

.comparison-item h4 {
    margin: 0 0 15px 0;
    color: #374151;
    font-size: 1rem;
    font-weight: 600;
}

.comparison-arrow {
    font-size: 24px;
    color: #3b82f6;
    font-weight: bold;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid #e5e7eb;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-label {
    font-weight: 500;
    color: #6b7280;
    font-size: 14px;
}

.stat-value {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.stat-value.saved {
    color: #059669;
}

.result-preview {
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.result-preview video {
    width: 100%;
    height: auto;
    max-height: 400px;
    display: block;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Messages */
.message {
    padding: 12px 16px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 14px;
    border: 1px solid;
}

.message.success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.message.error {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.message.info {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.message.warning {
    background: #fffbeb;
    color: #d97706;
    border-color: #fed7aa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .video-compressor {
        padding: 15px;
    }
    
    .upload-section,
    .preview-section,
    .settings-section,
    .action-section,
    .progress-section,
    .result-section {
        padding: 20px;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .upload-icon {
        font-size: 36px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .slider-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .slider-value {
        text-align: left;
        min-width: auto;
    }
    
    .quality-presets {
        justify-content: center;
    }
    
    .action-buttons,
    .result-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
    }
    
    .result-comparison {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }
    
    .comparison-arrow {
        transform: rotate(90deg);
    }
    
    .compression-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .video-compressor {
        padding: 10px;
    }
    
    .upload-section,
    .preview-section,
    .settings-section,
    .action-section,
    .progress-section,
    .result-section {
        padding: 15px;
    }
    
    .upload-area {
        padding: 25px 10px;
    }
    
    .upload-text {
        font-size: 16px;
    }
    
    .file-stats {
        flex-direction: column;
        gap: 8px;
    }
    
    .preset-btn {
        flex: 1;
        min-width: 60px;
    }
    
    .stat-item {
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }
}