:root {
    --primary: #3498db;
    --primary-dark: #2980b9;
    --secondary: #95a5a6;
    --success: #2ecc71;
    --bg: #f5f7fa;
    --card: #ffffff;
    --text: #2c3e50;
    --border: #e0e0e0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; padding: 20px; }
.container { max-width: 800px; margin: 0 auto; }

header { text-align: center; margin-bottom: 30px; }
h1 { color: var(--text); margin-bottom: 10px; }

/* Upload */
.upload-area {
    background: var(--card); border: 2px dashed var(--border); border-radius: 12px;
    padding: 40px; text-align: center; cursor: pointer; transition: 0.3s;
}
.upload-area:hover { border-color: var(--primary); background: #f8fbff; }
.upload-area svg { color: var(--secondary); margin-bottom: 15px; }

/* Editor */
.editor-section { margin-top: 30px; }
.video-preview { margin-bottom: 25px; background: #000; border-radius: 8px; overflow: hidden; }
video { width: 100%; display: block; max-height: 400px; }
.video-info { background: var(--card); padding: 10px 15px; font-size: 0.9rem; display: flex; justify-content: space-between; border-bottom: 1px solid var(--border); }

/* Controls Grid */
.controls-section { display: grid; gap: 20px; }
.control-group { background: var(--card); padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.control-group h3 { margin-bottom: 15px; font-size: 1.1rem; border-bottom: 2px solid var(--bg); padding-bottom: 10px; }
.hint { font-size: 0.8rem; color: #7f8c8d; margin-bottom: 10px; }

/* Inputs & Buttons */
.btn {
    padding: 10px 20px; border: none; border-radius: 6px; font-size: 0.95rem; cursor: pointer;
    transition: 0.2s; display: inline-block; text-align: center; text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; width: 100%; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--secondary); color: white; }
.btn-success { background: var(--success); color: white; }
input, select {
    width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 4px; font-size: 0.9rem;
}

/* Specific Layouts */
.time-inputs, .resize-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }
.crop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px; }
.input-wrapper label { display: block; font-size: 0.8rem; margin-bottom: 4px; color: #7f8c8d; }
.resize-options .preset-wrapper { margin-bottom: 15px; }
.format-options { display: flex; gap: 10px; }
.audio-options { display: flex; gap: 10px; align-items: center; }

/* Output */
.output-section { margin-top: 30px; background: var(--card); padding: 20px; border-radius: 8px; animation: fadeIn 0.5s; }
.output-actions { display: flex; gap: 10px; margin-top: 15px; }

/* Modal */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.modal-content { background: white; padding: 30px; border-radius: 12px; width: 90%; max-width: 400px; text-align: center; }
.progress-bar { width: 100%; height: 10px; background: #eee; border-radius: 5px; margin: 20px 0; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--primary); width: 0%; transition: width 0.3s; }

footer { text-align: center; margin-top: 40px; color: #95a5a6; font-size: 0.9rem; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }