@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');

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

body {
    font-family: 'Tajawal', sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 0.3rem;
    color: #38bdf8;
}

.subtitle {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.upload-area {
    border: 2px dashed #334155;
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #1e293b;
}

.upload-area:hover {
    border-color: #38bdf8;
    background: #1e293b;
}

.upload-area.dragover {
    border-color: #38bdf8;
    background: #0f172a;
}

.upload-content svg {
    color: #64748b;
    margin-bottom: 1rem;
}

.upload-content p {
    font-size: 1.2rem;
    color: #cbd5e1;
    margin-bottom: 0.5rem;
}

.upload-content span {
    color: #64748b;
    font-size: 0.9rem;
}

.editor {
    margin-top: 1.5rem;
}

.video-section video {
    width: 100%;
    border-radius: 12px;
    background: #000;
}

.controls {
    background: #1e293b;
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.time-inputs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-group {
    flex: 1;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #334155;
    border-radius: 10px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 1rem;
    font-family: inherit;
    text-align: center;
}

.input-group input:focus {
    outline: none;
    border-color: #38bdf8;
}

.slider-container {
    margin-bottom: 1.5rem;
}

.range-slider {
    position: relative;
    height: 8px;
    background: #334155;
    border-radius: 4px;
    cursor: pointer;
}

.slider-track {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

.slider-range {
    position: absolute;
    height: 100%;
    background: #38bdf8;
    border-radius: 4px;
}

.thumb {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #38bdf8;
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    cursor: grab;
    border: 3px solid #0f172a;
    box-shadow: 0 2px 8px rgba(56,189,248,0.4);
}

.thumb:active { cursor: grabbing; }

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    color: #64748b;
    font-size: 0.85rem;
}

.actions {
    display: flex;
    gap: 1rem;
}

.btn {
    flex: 1;
    padding: 0.9rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn.primary {
    background: #38bdf8;
    color: #0f172a;
    font-weight: 700;
}

.btn.primary:hover { background: #7dd3fc; }

.btn.secondary {
    background: #334155;
    color: #e2e8f0;
}

.btn.secondary:hover { background: #475569; }

.progress {
    text-align: center;
    margin-top: 2rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #334155;
    border-top-color: #38bdf8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

.result {
    text-align: center;
    margin-top: 2rem;
    background: #1e293b;
    border-radius: 16px;
    padding: 2rem;
}

.result h3 {
    color: #4ade80;
    margin-bottom: 1rem;
}

.result video {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 1rem;
    background: #000;
}
