* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    color: #7f8c8d;
}

/* Upload Section */
.upload-section {
    margin-bottom: 40px;
}

.upload-area {
    border: 2px dashed #3498db;
    border-radius: 10px;
    padding: 60px;
    text-align: center;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-area.loading {
    cursor: not-allowed;
}

.upload-area.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    z-index: 1;
}

.upload-area:hover {
    border-color: #2980b9;
    background-color: #f8f9fa;
}

.upload-area.dragover {
    border-color: #27ae60;
    background-color: #e8f5e9;
}

.upload-area svg {
    color: #3498db;
    margin-bottom: 20px;
}

.upload-area p {
    font-size: 1.1rem;
    color: #7f8c8d;
}

/* Editor Section */
.editor-section {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.video-preview {
    margin-bottom: 30px;
}

.video-preview video {
    width: 100%;
    max-height: 500px;
    border-radius: 8px;
    background-color: #000;
}

.video-info {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.video-info span {
    color: #555;
    font-size: 0.9rem;
}

/* Controls Section */
.controls-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.controls-section > div {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.controls-section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.2rem;
}

/* Trim Controls */
.time-inputs {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.time-input {
    flex: 1;
}

.time-input label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-size: 0.9rem;
}

.time-input input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.time-input span {
    display: inline-block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 0.85rem;
}

/* Effects */
.effects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.effect-btn {
    padding: 12px;
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.effect-btn:hover {
    background-color: #3498db;
    color: #fff;
    border-color: #3498db;
}

.effect-btn.active {
    background-color: #2980b9;
    color: #fff;
    border-color: #2980b9;
}

/* Resize & Format Controls */
.resize-options,
.format-options {
    display: flex;
    gap: 10px;
    align-items: center;
}

select {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background-color: #fff;
}

/* Audio Controls */
.audio-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-control label {
    color: #555;
    font-size: 0.9rem;
}

.volume-control input[type="range"] {
    flex: 1;
}

#volumeValue {
    min-width: 50px;
    text-align: right;
    color: #555;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #3498db;
    color: #fff;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-success {
    background-color: #27ae60;
    color: #fff;
}

.btn-success:hover {
    background-color: #229954;
}

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

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

/* Export Section */
.export-section {
    display: flex;
    gap: 20px;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    min-width: 400px;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-bar-fill {
    height: 100%;
    background-color: #3498db;
    width: 0%;
    transition: width 0.3s ease;
}

#progressText {
    color: #7f8c8d;
}

/* Output Section */
.output-section {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 40px;
}

.output-section h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.output-section video {
    width: 100%;
    max-height: 500px;
    border-radius: 8px;
    background-color: #000;
    margin-bottom: 20px;
}

.output-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 60px;
    padding: 20px;
    color: #7f8c8d;
}

/* Responsive */
@media (max-width: 768px) {
    .controls-section {
        grid-template-columns: 1fr;
    }
    
    .time-inputs {
        flex-direction: column;
    }
    
    .export-section {
        flex-direction: column;
    }
    
    .output-actions {
        flex-direction: column;
    }
    
    .modal-content {
        min-width: 90%;
        padding: 20px;
    }
}
