/* ===== Overlay de carregamento (máquina de lavar) ===== */
#loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
}

#loader-overlay.ativo {
    display: flex;
}

#loader-overlay #washingMachine {
    background: #ececf4;
    width: 180px;
    height: 233px;
    border-radius: 15px;
    border-top: 12px solid #80819c;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: inset -10px -10px 0 0 rgba(196, 196, 210, 0.3);
    padding: 52px 0 30px;
}

#loader-overlay #washingMachine:before,
#loader-overlay #washingMachine:after {
    content: "";
    position: absolute;
    border: 4px solid transparent;
    width: 150%;
}

#loader-overlay #washingMachine:before {
    border-bottom-color: #c4c4d2;
    height: 42px;
    top: 0;
    border-radius: 50%;
    box-shadow: inset 0 -10px 0 0 rgba(196, 196, 210, 0.3);
}

#loader-overlay #washingMachine:after {
    border-top-color: #c4c4d2;
    height: 20px;
    bottom: 0;
}

#loader-overlay #controls {
    position: absolute;
    top: 11px;
    right: 22px;
    text-align: center;
    background: #242527;
    color: lightgreen;
    border-radius: 5px;
    padding: 2px 8px;
    font-weight: 500;
    font-size: 0.7em;
    font-family: 'Nova Mono', monospace, monospace;
    height: 15px;
    min-width: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#loader-overlay #controls:before {
    content: "━━";
    position: absolute;
    font-size: 10px;
    color: #80819c;
    box-shadow: inset 0px -8px 0px 0px rgba(196, 196, 210, 0.3);
    height: 20px;
    width: 20px;
    border: 2px solid #c4c4d2;
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(45deg);
    left: -34px;
}

#loader-overlay #washingMachine #door,
#loader-overlay #washingMachine #tub {
    transition: all 0.2s ease-in-out;
}

#loader-overlay #door {
    width: 120px;
    height: 120px;
    border: 16px solid #80819c;
    border-radius: 50%;
    position: absolute;
    z-index: 1;
    box-shadow: inset 5px 10px 0 0 rgba(0, 0, 0, 0.1), 5px -1px 0 0 transparent;
    transform-origin: 0% 0%;
}

#loader-overlay #door:before,
#loader-overlay #door:after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

#loader-overlay #door:after {
    background: #6a6b84;
    height: 50%;
    width: 17%;
    right: 0;
    border-radius: 40% 30% 30% 40% / 50% 45% 45% 50%;
    z-index: 3;
}

#loader-overlay #door:before {
    width: 60%;
    height: 60%;
    left: 0;
    right: 0;
    margin: auto;
    border: 5px solid transparent;
    border-left: 10px solid white;
    transform: translateY(-50%) rotate(45deg);
    opacity: 0.2;
    box-shadow: inset -8px 8px 0 0 rgba(255, 255, 255, 0.2);
    border-radius: 40% 30% 30% 40% / 50%;
    z-index: 2;
}

#loader-overlay #tub {
    width: 104px;
    height: 104px;
    background: #453e57;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    z-index: 0;
    box-shadow: 0 0 0 7px rgba(196, 196, 210, 0.3);
    animation: loader-rotate 0.6s linear infinite;
}

#loader-overlay .clothes {
    position: absolute;
    opacity: 1;
}

#loader-overlay .clothes:nth-child(1) {
    background: linear-gradient(#48873e, #7b9f17);
    width: 70%;
    height: 25%;
    bottom: 10%;
    right: -20%;
    transform: rotate(-20deg);
    border-radius: 49% 38% 65% 8% / 30% 12% 51% 36%;
}

#loader-overlay .clothes:nth-child(2) {
    background: linear-gradient(#c22323, #e15050);
    width: 100%;
    height: 20%;
    border-radius: 64% 40% 27% 47% / 63% 63% 32% 36%;
    bottom: 0;
}

#loader-overlay .clothes:nth-child(3) {
    background: linear-gradient(#5a5589, #4f46b4);
    width: 70%;
    height: 25%;
    transform: rotate(40deg);
    border-radius: 41% 38% 71% 8% / 51% 36% 51% 24%;
    bottom: 0;
    left: -10%;
}

#loader-overlay #washingMachine {
    animation: loader-shake 100ms ease-in-out infinite;
}

@keyframes loader-shake {
    0%, 100% { transform: translate(0, 0) rotate(0); }
    25%      { transform: translate(-1.5px, 1.5px) rotate(0.5deg); }
    50%      { transform: translate(-0.5px, -0.5px) rotate(0.5deg); }
}

@keyframes loader-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}