/* Стили для попапа */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.popup-content {
    background: #1A1A1A; /* Темный фон */
    padding: 30px;
    border-radius: 10px;
    max-width: 95%; /* Уменьшен отступ от краев */
    max-height: 95%; /* Уменьшен отступ от краев */
    text-align: center;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-in-out;
}

.popup-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3); /* Общая полупрозрачная подложка */
    border-radius: 10px;
    z-index: 0;
}

.popup-content > *:not(.close-popup) {
    position: relative;
    z-index: 1;
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
    font-family: 'Geologica', sans-serif;
    z-index: 2;
    transition: color 0.3s;
}

.close-popup:hover {
    color: #FFFFFF;
}

.popup-content.aspect-16-9 {
    width: 600px; /* Увеличено в 1.25 раза */
    aspect-ratio: 16 / 9;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.popup-content.aspect-9-16 {
    width: 405px; /* Увеличено в 1.5 раза */
    aspect-ratio: 9 / 16;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.popup-content.aspect-1-1 {
    width: 540px; /* Увеличено в 1.5 раза */
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.popup-content h2 {
    margin: 0 0 15px;
    font-size: 28px; /* Увеличено для пропорциональности */
    font-weight: bold;
    font-family: 'Geologica', sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    animation: titlePop 0.5s ease-in-out;
    display: inline-block;
    position: relative;
    padding: 5px 15px;
    border-radius: 8px;
}

.popup-content h2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7); /* Более темная подложка для заголовка */
    border-radius: 8px;
    z-index: -1;
}

.popup-content p {
    margin: 0 0 20px;
    font-size: 18px; /* Увеличено для пропорциональности */
    font-family: 'Geologica', sans-serif;
    animation: contentFade 0.5s ease-in-out 0.3s;
    animation-fill-mode: both;
    display: inline-block;
    position: relative;
    padding: 5px 15px;
    border-radius: 8px;
}

.popup-content p::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7); /* Более темная подложка для текста */
    border-radius: 8px;
    z-index: -1;
}

.popup-content .btn {
    color: #fff;
    background: #00cc66;
    padding: 12px 24px; /* Увеличено для пропорциональности */
    border-radius: 5px;
    text-decoration: none;
    font-size: 18px; /* Увеличено для пропорциональности */
    font-family: 'Geologica', sans-serif;
    transition: background 0.3s;
    animation: contentFade 0.5s ease-in-out 0.3s;
    animation-fill-mode: both;
    display: inline-block; /* Кнопка подстраивается под ширину текста */
    margin: 0 auto; /* Центрирование */
}

.popup-content .btn:hover {
    background: #00b359;
    color: #fff;
}

/* Анимация для заголовка */
@keyframes titlePop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Анимация для текста и кнопки */
@keyframes contentFade {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Анимация появления попапа */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Адаптивность */
@media (max-width: 600px) {
    .popup-content.aspect-16-9 {
        width: 540px; /* Увеличено в 1.5 раза (300px * 1.5), менее сжато */
    }
    .popup-content.aspect-9-16 {
        width: 304px; /* Увеличено в 1.5 раза (200px * 1.5), менее сжато */
    }
    .popup-content.aspect-1-1 {
        width: 405px; /* Увеличено в 1.5 раза (250px * 1.5), менее сжато */
    }
    .popup-content h2 {
        font-size: 24px; /* Чуть больше для читаемости */
    }
    .popup-content p {
        font-size: 16px; /* Чуть больше для читаемости */
    }
    .popup-content .btn {
        font-size: 16px; /* Чуть больше для читаемости */
        padding: 10px 20px; /* Пропорционально */
        display: inline-block; /* Сохранение ширины по тексту */
        margin: 0 auto; /* Центрирование */
    }
}