:root {
    --bg-color: #0f1115;
    --panel-bg: rgba(22, 25, 33, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f0f2;
    --text-secondary: #9499a8;
    --accent: #7c3aed;
    --accent-hover: #8b5cf6;
    --danger: #ef4444;
    --input-bg: rgba(0, 0, 0, 0.2);
    
    --radius-lg: 24px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    --font-main: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Decoración de fondo suave (Estilo Millennial/GenZ) */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

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

.blob-1 {
    width: 400px;
    height: 400px;
    background: #7c3aed;
    top: -100px;
    left: -100px;
    animation: float 10s ease-in-out infinite alternate;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: #ec4899;
    bottom: -50px;
    right: -100px;
    animation: float 8s ease-in-out infinite alternate-reverse;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 50px); }
}

/* Layout Principal */
.app-container {
    width: 100%;
    max-width: 1100px;
    padding: 2rem;
    z-index: 1;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

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

.sparkle {
    font-size: 1.2rem;
}

.badge {
    background: rgba(124, 58, 237, 0.2);
    color: #c4b5fd;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(124, 58, 237, 0.3);
}

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

/* Paneles (Glassmorphism sutil) */
.panel {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Inputs */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

textarea, select {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    resize: none;
}

textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.hint {
    font-size: 0.75rem;
    color: var(--accent-hover);
    margin-top: -4px;
}

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

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.02);
}

.upload-area:hover {
    border-color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
}

.upload-area span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Botón Principal */
.generate-btn {
    background: linear-gradient(135deg, var(--accent), #9333ea);
    color: white;
    border: none;
    padding: 16px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: auto;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--accent);
}

.generate-btn:active {
    transform: translateY(0);
}

/* Área de Video (Derecha) */
.video-preview-container {
    flex-grow: 1;
    background: #000;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 350px;
}

.placeholder-state {
    text-align: center;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.play-icon-mock {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.play-icon-mock::after {
    content: '';
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 16px solid var(--text-secondary);
    margin-left: 6px;
}

.script-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.script-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

#generated-script {
    background: rgba(0, 0, 0, 0.3);
    border-color: transparent;
    color: #a78bfa;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .workspace {
        grid-template-columns: 1fr;
    }
}
