:root {
    --primary: #ff3e00;
    --primary-glow: rgba(255, 62, 0, 0.3);
    --bg: #0a0a0c;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text: #ffffff;
    --text-dim: #a0a0a0;
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    overflow-x: hidden;
}

.glass-container {
    width: 100%;
    max-width: 500px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

h1 span {
    color: var(--primary);
    text-shadow: 0 0 20px var(--primary-glow);
}

header p {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.drop-zone {
    border: 2px dashed var(--glass-border);
    border-radius: 1.5rem;
    padding: 3rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.drop-zone:hover {
    border-color: var(--primary);
    background: rgba(255, 62, 0, 0.05);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hidden {
    display: none !important;
}

.video-preview-wrapper {
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    background: #000;
    margin-bottom: 1.5rem;
    aspect-ratio: 16/9;
    border: 1px solid var(--glass-border);
}

video {
    width: 100%;
    height: 100%;
    display: block;
}

.controls-card {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 1.5rem;
    border: 1px solid var(--glass-border);
}

.range-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.time-block label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.2rem;
}

.time-block span {
    font-weight: 600;
    font-size: 1.2rem;
}

.slider-container {
    position: relative;
    height: 40px;
    margin-bottom: 2rem;
}

input[type="range"] {
    position: absolute;
    width: 100%;
    pointer-events: none;
    appearance: none;
    background: none;
    z-index: 2;
}

input[type="range"]::-webkit-slider-thumb {
    pointer-events: auto;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--primary-glow);
    border: 2px solid white;
}

.slider-track {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    z-index: 1;
}

.primary-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1.2rem;
    border-radius: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 20px -5px var(--primary-glow);
}

.primary-btn:active {
    transform: scale(0.95);
}

.primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.secondary-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 1rem;
    font-size: 1rem;
    margin-top: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.result-preview {
    border: 2px solid var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.download-btn {
    text-decoration: none;
    background: #00c853;
    box-shadow: 0 10px 20px -5px rgba(0, 200, 83, 0.3);
}

.download-btn:hover {
    background: #00e676;
}

.status-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 1rem;
    text-align: center;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
}

footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
}

@media (max-width: 480px) {
    .glass-container {
        padding: 1.5rem;
        border-radius: 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }
}