* {
    box-sizing: border-box;
}

body {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 90vh;
    background-color: #f0c0d4;
}

[hidden] {
    display: none !important;
}

.device-notice {
    display: none;
}

.message-container {
    display: flex;
    justify-content: center;
}

.message {
    font-family: "Iskra bold";
    color: rgb(176, 48, 72);
    font-size: 40px;
    margin: 0;
    text-align: center;
}

.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 160px;
}

.buttons-container {
    margin-top: 50px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.button {
    background-color: rgb(166, 73, 224);
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 28px;
    margin: 14px -20px;
    cursor: pointer;
    border: none;
    border-radius: 12px;
    transition: background-color 0.3s ease;
}

.password-gate {
    width: min(100%, 480px);
    text-align: center;
}

.password-image {
    margin-top: 18px;
}

.password-image img {
    max-width: 55vw;
    height: auto;
}

.password-form {
    width: min(100%, 340px);
    margin: 22px auto 0;
    display: grid;
    gap: 12px;
}

.password-form.is-shaking {
    animation: password-shake 380ms ease-in-out;
}

.password-gate.is-unlocking {
    pointer-events: none;
    animation: secret-unlock 360ms ease-in forwards;
}

#date-content.is-revealed {
    animation: date-reveal 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.password-label {
    font-family: "Iskra bold";
    color: rgb(176, 48, 72);
    font-size: 24px;
    text-align: left;
}

.password-input {
    width: 100%;
    padding: 14px 18px;
    border: 3px solid rgba(176, 48, 72, 0.35);
    border-radius: 16px;
    outline: none;
    background-color: rgba(255, 255, 255, 0.78);
    box-shadow: 0 8px 24px rgba(176, 48, 72, 0.12);
    color: rgb(176, 48, 72);
    font-family: "Iskra bold";
    font-size: 24px;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.password-input:focus {
    border-color: rgb(166, 73, 224);
    box-shadow: 0 0 0 5px rgba(166, 73, 224, 0.14);
}

.password-input[aria-invalid="true"] {
    border-color: rgb(176, 48, 72);
}

.password-button {
    position: static;
    margin: 4px auto 0;
    font-family: "Iskra bold";
}

.password-button:disabled {
    cursor: default;
    opacity: 0.72;
}

.password-error {
    min-height: 24px;
    margin: 0;
    color: rgb(176, 48, 72);
    font-family: "Iskra bold";
    font-size: 18px;
}

#no-button {
    position: absolute;
    margin-left: 150px;
    transition: 0.5s;
}

#yes-button {
    position: absolute;
    margin-right: 150px;
}

@keyframes password-shake {
    0%, 100% {
        transform: translateX(0) rotate(0);
    }
    25% {
        transform: translateX(-7px) rotate(-1deg);
    }
    50% {
        transform: translateX(6px) rotate(1deg);
    }
    75% {
        transform: translateX(-3px) rotate(-0.5deg);
    }
}

@keyframes secret-unlock {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-12px) scale(0.97);
    }
}

@keyframes date-reveal {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@font-face {
    font-family: 'Iskra bold';
    src: url('fonts/\ IskraCYR-Bold.otf');
}

@media (orientation: portrait), (pointer: coarse) and (max-width: 1024px) {
    body > .container {
        display: none !important;
    }

    .device-notice {
        position: fixed;
        inset: 0;
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 24px;
        background-color: #f0c0d4;
    }

    .device-notice-card {
        width: min(100%, 430px);
        padding: 28px 22px 32px;
        border: 3px solid rgba(176, 48, 72, 0.28);
        border-radius: 28px;
        background-color: rgba(255, 255, 255, 0.5);
        box-shadow: 0 16px 44px rgba(176, 48, 72, 0.18);
        text-align: center;
    }

    .device-notice-image {
        width: min(180px, 58vw);
        height: auto;
    }

    .device-notice-title {
        margin: 12px 0 0;
        color: rgb(176, 48, 72);
        font-family: "Iskra bold";
        font-size: clamp(28px, 7vw, 42px);
        line-height: 1.08;
    }
}

@media (max-width: 480px) {
    body {
        min-height: 100vh;
        height: auto;
        margin-top: 0;
        padding: 24px 16px;
    }

    .message {
        font-size: 32px;
    }

    .password-label {
        font-size: 22px;
    }

    .password-input {
        font-size: 22px;
    }

    .password-button {
        padding: 13px 28px;
        font-size: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .password-form.is-shaking,
    .password-gate.is-unlocking,
    #date-content.is-revealed {
        animation-duration: 1ms;
    }
}
