:root {
    --bg-color: #09090b;
    --card-bg: #18181b;
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --accent: #f43f5e;
    /* Rose color */
    --accent-hover: #e11d48;
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: #8b5cf6;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: var(--accent);
}

/* Navbar */
.navbar {
    padding: 1.5rem 5%;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(9, 9, 11, 0.5);
    backdrop-filter: blur(10px);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    color: var(--accent);
}

.logo span {
    color: var(--accent);
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, #f43f5e 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Workspace Card */
.glass-card {
    background: rgba(24, 24, 27, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Upload Zone */
.upload-zone {
    text-align: center;
    border: 2px dashed var(--glass-border);
    padding: 4rem;
    border-radius: 16px;
    width: 100%;
    transition: all 0.3s;
}

.upload-zone:hover {
    border-color: var(--accent);
    background: rgba(244, 63, 94, 0.05);
}

.upload-zone i {
    font-size: 4rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.upload-zone h3 {
    margin-bottom: 1.5rem;
}

/* Editor Interface */
.editor-interface {
    width: 100%;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
}

.video-preview-container {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 500px;
}

video {
    max-width: 100%;
    max-height: 100%;
}

.controls-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.control-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.range-inputs {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.input-wrapper {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.input-wrapper span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.input-wrapper input {
    width: 100%;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    outline: none;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.setting span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.setting input,
.setting select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 8px;
    border-radius: 6px;
    outline: none;
}

.btn-small {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    margin-right: 5px;
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.action-area {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Buttons */
.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

.btn-ghost:hover {
    color: white;
}

/* Result Interface */
.result-interface {
    width: 100%;
    text-align: center;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.progress-bar {
    width: 100%;
    max-width: 400px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.3s;
}

.gif-container {
    margin: 2rem 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    display: inline-block;
    max-width: 100%;
}

.gif-container img {
    max-width: 100%;
    border-radius: 8px;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

@media (max-width: 768px) {
    .editor-interface {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2rem;
    }
}