body {
    background-color: #f8f9fa;
}

/* ---------------------------------------------------------------------- */
/* Fondo con gradiente animado (usado en las páginas de bienvenida)        */
/* ---------------------------------------------------------------------- */

.gradient-backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 35%, #9d174d 70%, #c2410c 100%);
}

.gradient-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    will-change: transform;
}

.blob-1 {
    width: 480px;
    height: 480px;
    top: -120px;
    left: -100px;
    background: radial-gradient(circle at 30% 30%, #f472b6, transparent 70%);
    animation: floatBlob1 7s ease-in-out infinite;
}

.blob-2 {
    width: 520px;
    height: 520px;
    bottom: -160px;
    right: -140px;
    background: radial-gradient(circle at 60% 40%, #818cf8, transparent 70%);
    animation: floatBlob2 9s ease-in-out infinite;
}

.blob-3 {
    width: 380px;
    height: 380px;
    top: 40%;
    left: 55%;
    background: radial-gradient(circle at 50% 50%, #fb923c, transparent 70%);
    animation: floatBlob3 11s ease-in-out infinite;
}

@keyframes floatBlob1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, 40px) scale(1.1); }
}

@keyframes floatBlob2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-50px, -30px) scale(1.05); }
}

@keyframes floatBlob3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-40px, 50px) scale(0.95); }
}

/* ---------------------------------------------------------------------- */
/* Tarjeta "frosted glass"                                                 */
/* ---------------------------------------------------------------------- */

.glass-card-wrapper {
    position: relative;
    max-width: 480px;
    width: 100%;
}

.glass-card {
    position: relative;
    z-index: 1;
    overflow: hidden;
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 24px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.glass-card .form-label {
    color: rgba(255, 255, 255, 0.85);
}

.glass-card .form-control {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

.glass-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.glass-card .form-control:focus {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.15);
    color: #fff;
}

.glass-card .alert-danger {
    background: rgba(220, 53, 69, 0.25);
    border-color: rgba(220, 53, 69, 0.4);
    color: #fff;
}

.glass-card .text-muted {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* Feedback de validación por campo (ver .field-error más abajo) */
.glass-card .form-control.is-invalid {
    border-color: #ff8a8a;
}

.glass-card .form-control.is-invalid:focus {
    border-color: #ff8a8a;
    box-shadow: 0 0 0 0.2rem rgba(255, 138, 138, 0.25);
}

/* Texto de error chico debajo del campo. Único mecanismo usado para todos
   los tipos de campo (inputs normales, grupo de radios, dropzone) para que
   se comporten igual. Se muestra/oculta con la utilidad .d-none de Bootstrap. */
.field-error {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8125rem;
    color: #ffd7d7;
}

/* Descripción breve debajo del título de cada campo, arriba del input. */
.field-hint {
    margin: 0 0 0.4rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
}

@media (prefers-reduced-motion: reduce) {
    .gradient-blob {
        animation: none;
    }

    .wizard-card-enter,
    .wizard-card-exit,
    .wizard-section-enter-right,
    .wizard-section-enter-left {
        animation: none;
    }
}

/* ---------------------------------------------------------------------- */
/* Wizard: barra de progreso (paso actual) y transición entre pasos        */
/* ---------------------------------------------------------------------- */

.wizard-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 1.75rem;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    color: rgba(255, 255, 255, 0.55);
}

.wizard-step-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.wizard-step-label {
    font-size: 0.7rem;
    text-align: center;
    max-width: 90px;
    color: inherit;
}

.wizard-step-active .wizard-step-circle {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.15);
}

.wizard-step-active .wizard-step-label,
.wizard-step-done .wizard-step-label {
    color: rgba(255, 255, 255, 0.95);
}

.wizard-step-done .wizard-step-circle {
    border-color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.9);
    color: #4c1d95;
}

.wizard-step-line {
    width: 32px;
    height: 2px;
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.25);
}

.wizard-step-line-done {
    background: rgba(255, 255, 255, 0.9);
}

@keyframes wizardSlideIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes wizardSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-40px);
    }
}

.wizard-card-enter {
    animation: wizardSlideIn 0.35s ease-out;
}

.wizard-card-exit {
    animation: wizardSlideOut 0.22s ease-in forwards;
}

/* Transición entre las 3 secciones del formulario único (in-page, sin
   recargar), ver initWizard() en app.js. Solo se anima la sección que
   entra; la saliente simplemente se oculta (.d-none), más simple y sin
   saltos de altura por superposición. */

@keyframes wizardSectionInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes wizardSectionInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.wizard-section-enter-right {
    animation: wizardSectionInRight 0.3s ease-out;
}

.wizard-section-enter-left {
    animation: wizardSectionInLeft 0.3s ease-out;
}

/* ---------------------------------------------------------------------- */
/* Paso 2: radios de estilo con imagen                                     */
/* ---------------------------------------------------------------------- */

.style-radio-input {
    /*
     * Oculto visualmente pero con tamaño real (no width/height:0): si el
     * input queda con caja de 0x0, Chrome/Firefox no pueden anclar el globo
     * de validación nativa del "required" y el submit se bloquea en
     * silencio (bug reportado: "aprieto continuar y no pasa nada").
     */
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.style-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    height: 100%;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.style-option:hover {
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.style-radio-input:checked + .style-option {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.style-radio-input:focus-visible + .style-option {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.style-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
}

.style-caption {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}

/* Grupo de radios "tema" (paso 2): mismas pastillas de texto, sin imagen */
.theme-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.theme-option {
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.theme-option:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.style-radio-input:checked + .theme-option {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.25);
    font-weight: 600;
}

/* Borde rojo compartido para cualquier grupo de radios "custom" con error
   (estilo con imagen o tema en pastillas) */
.options-invalid .style-option,
.options-invalid .theme-option {
    border-color: #ff8a8a;
}

/* ---------------------------------------------------------------------- */
/* Paso 2: dropzone de imagen (drag & drop, ver app.js)                    */
/* ---------------------------------------------------------------------- */

.dropzone {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    padding: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.06);
    border: 2px dashed rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.dropzone.is-invalid {
    border-color: #ff8a8a;
}

.dropzone.is-dragover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

.dropzone.is-full {
    opacity: 0.7;
}

.dropzone-icon {
    font-size: 2rem;
    line-height: 1;
}

.dropzone-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.dropzone-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.dropzone-thumb {
    position: relative;
    width: 84px;
    height: 84px;
}

.dropzone-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dropzone-thumb-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    padding: 0;
    line-height: 1;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
}
