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

:root {
    --color-bg: #0f172a;
    --color-surface: #1e293b;
    --color-border: #334155;
    --color-text: #f1f5f9;
    --color-muted: #94a3b8;
    --color-accent: #38bdf8;
    --color-accent-hover: #7dd3fc;
    --color-success: #4ade80;
    --color-error: #f87171;
}

body {
    font-family: "Segoe UI", system-ui, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.container {
    width: 100%;
    max-width: 420px;
    background: var(--color-surface);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--color-muted);
}

.upload-section {
    margin-bottom: 1rem;
}

.file-input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border: 2px dashed var(--color-border);
    border-radius: 8px;
    background: rgba(51, 65, 85, 0.3);
    transition: border-color 0.2s, background 0.2s;
}

.file-input-wrapper:hover .file-label,
.file-input-wrapper input:focus + .file-label,
.file-input-wrapper.dragover .file-label {
    border-color: var(--color-accent);
    background: rgba(56, 189, 248, 0.08);
}

.file-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.file-text {
    font-weight: 500;
}

.file-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-accent);
    margin-top: 0.5rem;
    word-break: break-all;
    max-width: 100%;
    text-align: center;
}

.file-name:not(.visible) {
    display: none;
}

.file-status {
    font-size: 0.85rem;
    color: var(--color-success);
    margin-top: 0.35rem;
    font-weight: 500;
}

.file-status:empty {
    display: none;
}

.file-input-wrapper.has-file .file-label {
    border-color: var(--color-success);
    background: rgba(74, 222, 128, 0.08);
}

.file-hint {
    font-size: 0.8rem;
    color: var(--color-muted);
    margin-top: 0.25rem;
}

button[type="submit"] {
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-bg);
    background: var(--color-accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

button[type="submit"]:hover:not(:disabled) {
    background: var(--color-accent-hover);
}

button[type="submit"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mensaje {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.mensaje.error {
    background: rgba(248, 113, 113, 0.15);
    color: var(--color-error);
}

.mensaje.success {
    background: rgba(74, 222, 128, 0.15);
    color: var(--color-success);
}

.progress-section {
    margin-top: 1.25rem;
    padding: 1rem;
    background: rgba(51, 65, 85, 0.4);
    border-radius: 8px;
}

.progress-status {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.progress-bar {
    height: 8px;
    background: var(--color-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-accent), var(--color-success));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-percent {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-accent);
    text-align: right;
}
