:root {
    --bg-color: #0f111a;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-primary: #8b5cf6;
    --accent-secondary: #ec4899;
    --glass-bg: rgba(30, 41, 59, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
    --success: #10b981;
    --error: #ef4444;
    /* Variables faltantes referenciadas en el HTML */
    --primary: #8b5cf6;
    --radius: 1rem;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
}

/* Background Animations */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--accent-primary);
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--accent-secondary);
    animation-delay: -10s;
}

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

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Glassmorphism Utilities */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
}

.glass-header {
    text-align: center;
    padding: 2rem 0;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.glass-header p {
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

.btn-action {
    background: var(--success);
    color: white;
    width: 100%;
    margin-top: 1rem;
    font-size: 1.2rem;
    padding: 1rem;
}

.btn-action:hover {
    background: #0ea5e9;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: white;
}

.btn-outline:hover {
    background: rgba(139, 92, 246, 0.2);
}

/* Upload Section */
.upload-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.upload-section.dragover {
    border-color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.1);
    transform: scale(1.02);
}

.upload-content {
    text-align: center;
    padding: 3rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-icon {
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.upload-content h2 {
    font-size: 1.5rem;
}

.upload-content p {
    color: var(--text-secondary);
}

.file-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
}

.remove-file {
    color: var(--error);
    cursor: pointer;
    background: transparent;
    border: none;
    font-size: 1.2rem;
}

/* Progress */
.progress-section {
    animation: fadeIn 0.5s ease forwards;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    width: 0%;
    transition: width 0.3s ease;
}

/* Results Section */
.results-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    animation: fadeIn 0.5s ease forwards;
}

@media (min-width: 992px) {
    .results-section {
        grid-template-columns: 1fr 1fr;
    }
}

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

.results-content {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 1rem;
    padding: 1.5rem;
    overflow-x: auto;
}

pre {
    color: #a78bfa;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.preview-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    max-height: 600px;
    overflow-y: auto;
}

.preview-container img {
    max-width: 100%;
    border-radius: 0.5rem;
    border: 1px solid var(--glass-border);
}

.hidden {
    display: none !important;
}

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

/* Comparison Section */
.comparison-section {
    animation: fadeIn 0.5s ease forwards;
}

.comparison-header {
    margin-bottom: 0.5rem;
}

.comparison-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.comparison-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.upload-box {
    flex: 1;
    min-width: 200px;
    border: 2px dashed var(--primary);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    transition: border-color 0.3s ease, background 0.3s ease;
}

.upload-box:hover {
    border-color: var(--accent-secondary);
    background: rgba(255, 255, 255, 0.08);
}

/* Main grows to push footer down */
main.container {
    flex: 1;
}

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem 1rem;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.85rem;
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
    letter-spacing: 0.02em;
}

footer strong {
    color: rgba(255, 255, 255, 0.85);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}
