.subscription-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.subscription-popup.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.popup-content {
    background: #1e1e1e;
    border-radius: 15px;
    padding: 30px;
    position: relative;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.popup-form-container {
    text-align: center;
}

.popup-form-container h2 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.popup-form-container p {
    color: #888;
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.popup-subscription-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.popup-subscription-form input {
    padding: 12px 20px;
    border: 1px solid #333;
    border-radius: 25px;
    background: #2a2a2a;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.popup-subscription-form input:focus {
    outline: none;
    border-color: #ff69b4;
    background: #333333;
}

.popup-subscription-form input::placeholder {
    color: #888;
}

.popup-submit-btn {
    padding: 12px 30px;
    background: #ff69b4;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-top: 10px;
}

.popup-submit-btn:hover {
    background: #ff4da6;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
}

.btn-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
    z-index: 1001;
}

.btn-close:hover {
    color: #ff69b4;
}

/* Mobile Styles for Popup */
@media (max-width: 768px) {
    .popup-content {
        padding: 25px;
        margin: 15px;
    }

    .popup-form-container h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .popup-form-container p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .popup-subscription-form {
        gap: 15px;
    }

    .popup-subscription-form input {
        padding: 10px 15px;
        font-size: 14px;
    }

    .popup-submit-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

iframe {
    border-radius: 8px;
    background: white;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Форма подписки для десктопа */
.footer-subscription {
    background: rgba(0, 0, 0, 0.85);
    padding: 20px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.subscription-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

#subscriptionForm {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 800px;
}

#subscriptionForm input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-width: 200px;
}

#subscriptionForm input:focus {
    border-color: #ff69b4;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.footer-subscribe-btn {
    padding: 12px 25px;
    background: #ff69b4;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.footer-subscribe-btn:hover {
    background: #ff4da6;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
}

.footer-subscribe-btn:disabled {
    background: #ff8cc3;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.subscription-response {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.subscription-response.success {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.subscription-response.error {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

/* Мобильные стили */
@media (max-width: 768px) {
    .footer-subscription {
        display: none;
    }

    .subscription-form {
        flex-direction: column;
        gap: 10px;
    }

    #subscriptionForm {
        flex-direction: column;
        width: 100%;
    }

    #subscriptionForm input {
        width: 100%;
    }

    .footer-subscribe-btn {
        width: 100%;
        justify-content: center;
    }

    .subscription-response {
        position: static;
        transform: none;
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }
}

/* Стили для кнопки-указателя */
.show-subscription-btn {
    display: flex;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ff69b4;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 25px;
    font-size: 16px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 40px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.show-subscription-btn i {
    font-size: 18px;
}

.show-subscription-btn:hover {
    background: #ff4da6;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Обновляем стили для мобильной версии */
@media (max-width: 768px) {
    .footer-subscription {
        display: none;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #1e1e1e;
        padding: 15px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        border-radius: 15px 15px 0 0;
        box-sizing: border-box;
    }

    .footer-subscription.show-mobile {
        display: block;
        animation: slideUp 0.3s ease;
    }

    .subscription-form {
        flex-direction: column;
        gap: 20px; /* Увеличенный отступ между полями */
        padding: 0;
        margin: 0;
    }

    .subscription-form input {
        width: 100%;
        min-width: unset;
        height: 40px;
        font-size: 16px;
        padding: 8px 15px;
        margin: 0 0 10px 0; /* Добавляем отступ снизу 20px */
    }

    .subscription-form input:last-child {
        margin-bottom: 0; /* Убираем отступ у последнего поля */
    }

    .footer-subscribe-btn {
        width: 100%;
        height: 40px;
        margin: 0;
        font-size: 14px;
        padding: 8px 15px;
        box-sizing: border-box;
    }

    .show-subscription-btn {
        bottom: 15px;
        right: 15px;
        padding: 10px 20px;
        font-size: 14px;
        transform: none !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    .show-subscription-btn i {
        font-size: 16px;
    }

    /* Ensure button stays visible and doesn't overflow */
    .show-subscription-btn {
        max-width: calc(100% - 30px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Prevent form from being hidden behind other elements */
    .footer-subscription {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }

    /* Adjust message box for better mobile display */
    .custom-message-box {
        width: calc(100% - 30px);
        max-width: 320px;
        padding: 20px;
        margin: 0 15px;
        box-sizing: border-box;
    }

    /* Ensure overlay covers the entire screen */
    .custom-overlay {
        width: 100vw;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
    }
}

/* Ensure proper z-index stacking */
.custom-overlay {
    z-index: 1100;
}

.custom-message-box {
    z-index: 1101;
}

.show-subscription-btn {
    z-index: 1000;
}

.footer-subscription {
    z-index: 999;
}

/* Обновляем анимацию появления */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (min-width: 769px) {
    body {
        padding-bottom: 70px;
    }
}

/* Обновляем стили для всплывающего сообщения */
.thank-you-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1e1e1e;
    padding: 35px; /* Увеличиваем отступы */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
    min-width: 320px; /* Минимальная ширина для мобильных */
}

.thank-you-popup.show {
    opacity: 1;
}

.thank-you-content {
    color: white;
    font-size: 20px; /* Увеличиваем базовый размер шрифта */
}

.thank-you-content p {
    margin: 15px 0; /* Увеличиваем отступы между строками */
    line-height: 1.4; /* Увеличиваем межстрочный интервал */
}

.spam-notice {
    color: #ff69b4;
    font-weight: bold;
    margin-top: 15px;
    font-size: 22px; /* Делаем предупреждение о спаме еще крупнее */
}

.close-thank-you {
    margin-top: 25px; /* Увеличиваем отступ от текста */
    padding: 12px 35px; /* Увеличиваем размер кнопки */
    background: #ff69b4;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px; /* Увеличиваем размер шрифта кнопки */
}

.close-thank-you:hover {
    background: #ff4da6;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
}

.custom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.custom-message-box {
    background-color: #222;
    color: #f5f5f5;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    max-width: 450px;
    width: 90%;
    text-align: center;
    font-family: Arial, sans-serif;
}

.custom-message-icon {
    font-size: 36px;
    margin-bottom: 15px;
}

.custom-message-box p {
    margin-top: 0;
    margin-bottom: 20px;
    line-height: 1.5;
}

.custom-message-box button {
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 20px;
    cursor: pointer;
}

.custom-message-box button:hover {
    background-color: #005ec2;
}

/* Кнопка подписки для мобильных устройств */
.subscribe-button {
    display: none; /* Скрываем по умолчанию */
}

/* Мобильные стили для формы подписки */
@media (max-width: 768px) {
    .footer-subscription {
        display: none;
    }

    .show-subscription-btn {
        display: none;
    }

    /* Показываем кнопку подписки только на мобильных */
    .subscribe-button {
        display: flex;
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #ff69b4;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        font-size: 16px;
        z-index: 1000;
        box-shadow: 0 4px 8px rgba(0,0,0,0.3);
        align-items: center;
        gap: 8px;
    }

    /* Остальные мобильные стили остаются без изменений */
    .modal {
        display: none;
        position: fixed;
        z-index: 2000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: auto;
        background-color: rgba(0,0,0,0.6);
    }

    /* Контент модального окна */
    .modal-content {
        background-color: #1e1e1e;
        margin: 10% auto;
        padding: 20px;
        border-radius: 10px;
        max-width: 90%;
        width: 400px;
        position: relative;
        color: white;
    }

    .modal-content h2 {
        color: white;
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .modal-content form {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .modal-content input {
        padding: 12px 15px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 25px;
        background: rgba(255, 255, 255, 0.05);
        color: white;
        font-size: 0.9rem;
    }

    .modal-content input::placeholder {
        color: rgba(255, 255, 255, 0.5);
    }

    .modal-content button[type="submit"] {
        background: #ff69b4;
        color: white;
        border: none;
        border-radius: 25px;
        padding: 12px 25px;
        font-size: 0.9rem;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .modal-content button[type="submit"]:hover {
        background: #ff4da6;
    }

    /* Крестик закрытия */
    .modal .close {
        position: absolute;
        top: 10px;
        right: 15px;
        font-size: 24px;
        font-weight: bold;
        color: white;
        cursor: pointer;
    }

    #response {
        margin-top: 15px;
        text-align: center;
        font-size: 0.9rem;
    }

    #response p {
        margin: 0;
        padding: 8px 15px;
        border-radius: 20px;
    }

    #response p.success {
        background: rgba(40, 167, 69, 0.2);
        color: #28a745;
    }

    #response p.error {
        background: rgba(220, 53, 69, 0.2);
        color: #dc3545;
    }
}

/* Стили для всплывающих сообщений */
.subscription-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
    z-index: 2000;
    max-width: 400px;
}

.subscription-message.success {
    background: linear-gradient(135deg, #28a745, #218838);
    border-left: 4px solid #1e7e34;
}

.subscription-message.error {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-left: 4px solid #bd2130;
}

.subscription-message.warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    border-left: 4px solid #d39e00;
    color: #212529;
}

.subscription-message i {
    font-size: 1.2rem;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Мобильные стили для сообщений */
@media (max-width: 768px) {
    .subscription-message {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        margin: 0 10px;
    }
}

