/* Затемненный фон (Оверлей) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
}

/* Островной блок модального окна */
.modal-card {
    background-color: #ffffff;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    position: relative;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-sizing: border-box;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

/* Кнопка-крестик в углу */
.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.modal-close-btn:hover {
    opacity: 1;
}

.modal-close-icon {
    width: 20px;
    height: 20px;
}

/* Контент внутри */
.modal-badge {
    width: 64px;
    height: 64px;
    background-color: #fff9e6;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 16px auto;
}

.modal-badge.modal-badge-hint {
    background-color: #eff6ff;
}

.modal-crown-icon {
    width: 36px;
    height: 36px;
}

.modal-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px 0;
}

.modal-card p {
    font-size: 14px;
    color: #666666;
    line-height: 1.5;
    margin: 0 0 24px 0;
}

/* Целевая кнопка */
.btn-modal-premium {
    display: inline-block;
    width: 100%;
    padding: 14px;
    background-color: #f5a623;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-sizing: border-box;
}

.btn-modal-premium:hover {
    background-color: #e09216;
}

.btn-modal-premium:active {
    transform: scale(0.98);
}

.btn-modal-premium.btn-hint {
    background-color: var(--primary, #3b82f6);
}

.btn-modal-premium.btn-hint:hover {
    background-color: var(--primary-hover, #2563eb);
}

/* ====================== АДАПТИВНОСТЬ ====================== */
@media (max-width: 576px) {
    .modal-overlay {
        padding: 16px;
        align-items: center;
        overflow-y: auto;
    }

    .modal-card {
        padding: 32px 20px 24px 20px;
        border-radius: 20px;
        max-width: 100%;
        margin: auto 0;
    }

    .modal-close-btn {
        top: 8px;
        right: 8px;
        padding: 12px;
        opacity: 0.7;
    }

    .modal-close-icon {
        width: 22px;
        height: 22px;
    }

    .btn-modal-premium:hover,
    .btn-modal-premium:active {
        transform: none;
        background-color: #f5a623;
    }

    .modal-card h3 {
        font-size: 18px;
    }

    .modal-card p {
        font-size: 13.5px;
        margin: 0 0 20px 0;
    }
}