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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
    padding: 20px 5px;
    background: linear-gradient(145deg, #d0f0f5, #eaf7fc);
    background-size: 200% 200%;
    animation: moverFondo 15s ease infinite;
    padding-top: 0;
    margin-top: 0;
}

@keyframes moverFondo {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

h1 {
    font-weight: 900;
    font-size: 2.8rem;
    margin-bottom: 10px;
    color: #22577a;
    text-shadow: 1px 1px 5px #9fd3c7;
    user-select: none;
}

.instruccion {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    font-size: 1.2rem;
    color: #444;
    background: linear-gradient(to right, #fdfbfb, #ebedee);
    padding: 0.5rem 1rem;
    border-left: 4px solid #84c784;
    margin-bottom: 1rem;
    display: inline-block;
    border-radius: 10px 0 0 10px;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.1);
    animation: aparecer 1s ease-out;
}

@keyframes aparecer {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

p.subtitle {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #3a5a40;
    max-width: 500px;
    text-align: center;
    font-style: italic;
}

#maniqui-container {
    position: relative;
    width: 320px;
    height: 550px;
    background: #ffffffdd;
    border-radius: 25px;
    box-shadow:
        0 10px 20px rgba(0, 0, 0, 0.1),
        inset 0 0 20px #ade8f4;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    user-select: none;
    overflow: visible;
    animation: fadeInUp 1.2s ease;
}

#maniqui-base {
    max-height: 100%;
    max-width: 370px;
    pointer-events: none;
    filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.15));
}

/* Dropzones */
.dropzone {
    position: absolute;
    background: rgba(255 255 255 / 0.3);
    border: 2px dashed #4caf50aa;
    border-radius: 18px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

.dropzone:hover {
    background: rgba(76, 175, 80, 0.15);
    border-color: #4caf50;
    box-shadow: 0 0 18px #4caf50;
}

/* Posiciones de las zonas */
#zona-top {
    top: 160px;
    left: 25px;
    width: 270px;
    height: 110px;
    z-index: 5;
}

#zona-mid {
    top: 260px;
    left: 50px;
    width: 220px;
    height: 140px;
    z-index: 4;
}

#zona-bottom {
    top: 395px;
    left: 90px;
    width: 130px;
    height: 80px;
    z-index: 3;
}

.dropzone img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

@keyframes dropFade {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Prendas para arrastrar */
#prendas {
    margin-top: 25px;
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 750px;
}

.ropa {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    cursor: grab;
    user-select: none;
    background: #fff;
    padding: 10px;
    object-fit: contain;
    box-shadow:
        0 6px 12px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ropa:hover {
    transform: scale(1.07);
    box-shadow:
        0 12px 20px rgba(0, 0, 0, 0.2);
}

.ropa:active {
    cursor: grabbing;
    box-shadow:
        0 0 15px 4px #4caf50cc;
    transform: scale(1.05);
}

/* Mensaje de estado */
#mensaje {
    margin-top: 25px;
    font-weight: 700;
    font-size: 1.3rem;
    color: #22577a;
    min-height: 1.5em;
    user-select: none;
    background: #e0f7fa;
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid #b2ebf2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Botón reiniciar */
#reiniciar {
    margin-top: 20px;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 12px 28px;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.15s ease;
    user-select: none;
    background: linear-gradient(to top, #4caf50, #66bb6a);
    box-shadow:
        0 8px 14px rgba(76, 175, 80, 0.4);
    border: 2px solid #3c9f40;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

#reiniciar:hover {
    background: #388e3c;
    transform: scale(1.05);
}

#reiniciar:active {
    transform: scale(0.95);
}

/* Barra de progreso */
#barra-container {
    width: 100%;
    max-width: 450px;
    height: 25px;
    background-color: #ddd;
    border-radius: 50px;
    overflow: hidden;
    margin: 30px auto 10px;
    box-shadow: inset 0 0 5px #bbb;
    user-select: none;
}

#barra-progreso {
    height: 100%;
    width: 0%;
    background-color: #4caf50;
    transition: width 0.5s ease;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50px;
    position: relative;
    user-select: none;
    text-shadow: 0 0 3px #2e7d32;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== NAVBAR ===== */
.navbar {
    width: 100%;
    position: sticky;
    top: 0;
    margin-top: 0;
    z-index: 100;
    background: linear-gradient(to right, #22577a, #58b55c);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 12px 12px;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.6rem;
    font-weight: bold;
    color: white;
    gap: 10px;
}

.logo-text {
    font-weight: 800;
}

.nav-logo i {
    font-size: 1.3rem;
}

.nav-boton .btn-volver {
    text-decoration: none;
    background-color: #ed6b5ae1;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    transition: 0.3s ease;
}

.nav-boton .btn-volver:hover {
    background-color: #c74739;
}