/* Модальные окна */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}
.modal-overlay.show {
    display: flex;
    animation: modalFadeIn 0.2s ease forwards;
}
.modal-overlay.hide {
    display: flex;
    animation: modalFadeOut 0.2s ease forwards;
}
.modal-content {
    background: rgba(0, 0, 0, 0.95);
    padding: 60px 80px;
    border-radius: 30px;
    text-align: center;
    border: 3px solid rgba(255, 215, 0, 0.6);
    min-width: 500px;
    width: auto;
    transform: scale(0.3);
    opacity: 0;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}
.modal-overlay.show .modal-content {
    animation: modalPopIn 0.25s cubic-bezier(0.34, 1.3, 0.55, 1) forwards;
}
.modal-overlay.hide .modal-content {
    animation: modalPopOut 0.2s cubic-bezier(0.55, 0, 1, 0.34) forwards;
}
.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    z-index: 10001;
}
.modal-close-btn .button_3 {
    width: 55px;
    height: 50px;
    font-size: 3em;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-content h2 {
    color: white;
    margin-bottom: 50px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-family: inherit;
}
.modal-buttons {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
}
.modal-content .button {
    width: 300px;
    height: 85px;
    font-size: 1.5em;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}
.modal-content .button_2 {
    width: 180px;
    height: 109px;
    font-size: 2em;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-buttons-vertical {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

/* @keyframes */
@keyframes modalPopIn {
    0% { transform: scale(0.2); opacity: 0; }
    80% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes modalPopOut {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.2); opacity: 0; }
}
@keyframes modalFadeIn {
    0% { background: rgba(0, 0, 0, 0); }
    100% { background: rgba(0, 0, 0, 0.7); }
}
@keyframes modalFadeOut {
    0% { background: rgba(0, 0, 0, 0.7); }
    100% { background: rgba(0, 0, 0, 0); }
}

/* @media */
@media (max-width: 768px) {
    .modal-content { padding: 40px 50px; min-width: 400px; }
    .modal-content h2 { font-size: 2em; margin-bottom: 35px; }
    .modal-content .button { width: 250px; height: 75px; font-size: 1.35em; }
    .modal-content .button_2 { width: 150px; height: 90px; font-size: 1.6em; }
    .modal-close-btn .button_3 { width: 50px; height: 45px; font-size: 2.5em; }
}
@media (max-width: 600px) {
    .modal-content { padding: 40px 30px; min-width: 280px; width: 85%; }
}
@media (max-width: 550px) {
    .modal-content { padding: 30px 25px; min-width: 280px; width: 90%; }
    .modal-content h2 { font-size: 1.4em; margin-bottom: 25px; }
    .modal-content .button,
    .modal-content .button_2 {
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        padding: 0;
        text-align: center;
    }
    .modal-content .button { width: 200px; height: 65px; font-size: 1.05em; }
    .modal-content .button_2 { width: 130px; height: 80px; font-size: 1.3em; }
    .modal-buttons { gap: 20px; }
    .modal-close-btn .button_3 { width: 42.5px; height: 35px; font-size: 2em; top: 10px; right: 10px; }
}
@media (max-width: 480px) {
    .modal-close-btn .button_3 { width: 40px; height: 35px; font-size: 2em; }
    .modal-close-btn { top: 10px; right: 10px; }
}
