:root {
    --bg-color: #FFC7EB;
    --card-bg: rgba(255, 255, 255, 0.88);
    --primary: #9b2d72;
    --primary-hover: #7a2258;
    --text-main: #3b142c;
    --text-muted: #6e3d5b;
    --border: rgba(155, 45, 114, 0.25);
    --radius: 16px;
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 1rem;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(rgba(255, 199, 235, 0.82), rgba(255, 199, 235, 0.95)), url('quince.jpg');
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    z-index: -2;
    pointer-events: none;
}

.background-glow {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 2;
    margin-top: auto;
    margin-bottom: auto;
}

.header {
    text-align: center;
}

.subtitle {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: var(--primary);
    font-size: 1.2rem;
    letter-spacing: 1px;
    font-weight: 600;
}

.header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0.2rem 0 0.6rem 0;
    color: var(--text-main);
    text-shadow: 0 2px 12px rgba(255, 255, 255, 0.8);
    animation: float 3s ease-in-out infinite;
}

.header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    padding: 0 0.5rem;
}

.upload-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: 0 20px 40px rgba(155, 45, 114, 0.15);
}

.drop-zone {
    border: 2px dashed var(--primary);
    border-radius: 12px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.5);
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary-hover);
    background: rgba(255, 255, 255, 0.8);
}

.upload-icon {
    width: 42px;
    height: 42px;
    color: var(--primary);
    margin-bottom: 0.8rem;
}

.drop-text {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}

.drop-text span {
    color: var(--primary);
    font-weight: 600;
}

.file-info {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.input-group {
    margin-top: 1rem;
}

.input-group input {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(155, 45, 114, 0.3);
    border-radius: 10px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: var(--primary);
}

/* --- ESTILOS DE LA BARRA DE PROGESO --- */
.progress-container {
    margin-top: 1rem;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(155, 45, 114, 0.15);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.4rem;
    font-weight: 500;
}

.btn-primary {
    width: 100%;
    margin-top: 1rem;
    padding: 0.9rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 1rem;
    width: 100%;
}

.preview-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(155, 45, 114, 0.2);
    background: #000;
}

.preview-item img, .preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-message {
    margin-top: 1rem;
    padding: 0.8rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
}

.status-message.success {
    background: rgba(34, 197, 94, 0.15);
    color: #14532d;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-message.error {
    background: rgba(239, 68, 68, 0.15);
    color: #7f1d1d;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.hidden {
    display: none;
}

footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 2rem;
    text-shadow: 0 1px 4px rgba(255, 255, 255, 0.5);
    z-index: 2;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
