.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    max-width: 800px;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    font-family: sans-serif;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-content.horizontal {
    flex-direction: row;
}

.modal-image-container {
    flex: 1;
    max-width: 50%;
    background-color: #f4f4f4;
}

.modal-image-vertical {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-text {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.modal-text h2 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.modal-text p {
    margin-bottom: 1rem;
    line-height: 1.5;
    font-size: 1rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 1rem;
}

.modal-primary-button {
    background-color: #d32f2f;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease;
    font-size: 1rem;
}

.modal-primary-button:hover {
    background-color: #b71c1c;
}

.modal-secondary-button {
    background-color: #e0e0e0;
    color: #333;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 1rem;
}

.modal-secondary-button:hover {
    background-color: #d5d5d5;
}

.modal-disclaimer {
    font-size: 0.85rem;
    color: #777;
    margin-top: 1rem;
}

/* 📱 Адаптив */
@media (max-width: 768px) {
    .modal-content.horizontal {
        flex-direction: column;
        max-width: 95%;
    }

    /* прячем картинку */
    .modal-image-container {
        display: none;
    }

    .modal-text {
        padding: 1rem;
    }

    .modal-text h2 {
        font-size: 1.2rem;
    }

    .modal-text p {
        font-size: 0.95rem;
    }

    .modal-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .modal-primary-button,
    .modal-secondary-button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .modal-text h2 {
        font-size: 1rem;
    }

    .modal-text p {
        font-size: 0.9rem;
    }

    .modal-actions {
        gap: 0.5rem;
    }

    .modal-primary-button,
    .modal-secondary-button {
        font-size: 0.9rem;
        padding: 0.65rem 1rem;
    }
}


/* Шестерёнка */
.gear-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 64px;
    height: 64px;
    z-index: 101;
    cursor: pointer;
}

.gear-button img {
    width: 100%;
    height: 100%;
    animation: spin 4s linear infinite;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.gear-button img:hover {
    opacity: 1;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Колокольчик */
.bell-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 64px;
    height: 64px;
    z-index: 9998;
    cursor: pointer;
}

.bell-button img {
    width: 100%;
    height: 100%;
    opacity: 0.7;
    transition: opacity 0.3s;
    animation: bell-shake 3s ease-in-out infinite;
}

.bell-button img:hover {
    opacity: 1;
}

@keyframes bell-shake {
    0%, 100% { transform: rotate(0); }
    15% { transform: rotate(-15deg); }
    30% { transform: rotate(12deg); }
    45% { transform: rotate(-9deg); }
    60% { transform: rotate(6deg); }
    75% { transform: rotate(-3deg); }
}

/* Восклицательный знак */
.alert-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 64px;
    height: 64px;
    z-index: 9998;
    cursor: pointer;
}

.alert-button img {
    width: 100%;
    height: 100%;
    opacity: 0.7;
    transition: opacity 0.3s;
    animation: alert-pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.6));
}

.alert-button img:hover {
    opacity: 1;
}

@keyframes alert-pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.6));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 15px rgba(255, 0, 0, 1));
    }
}

/* 🎉 Праздничная модалка */
.modal-festive {
    background: radial-gradient(circle at top left, #ffe0ec, #fff0f6);
    border: none;
    color: #880e4f;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    box-shadow: 0 0 40px rgba(255, 64, 129, 0.4);
    position: relative;
    overflow: hidden;
}

.modal-festive::before {
    content: "🎊";
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    opacity: 0.1;
    animation: float 6s infinite ease-in-out;
}

.modal-festive h2 {
    font-size: 1.5rem;
    color: #ad1457;
}

.modal-festive .modal-primary-button {
    background-color: #ec407a;
    color: white;
    font-weight: 900;
    border-radius: 20px;
    padding: 0.75rem 2rem;
    text-transform: uppercase;
}

.modal-festive .modal-primary-button:hover {
    background-color: #d81b60;
}

.modal-festive .modal-secondary-button {
    background-color: transparent;
    color: #880e4f;
    border: 2px dashed #880e4f;
    border-radius: 12px;
    font-style: italic;
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(12px); }
    100% { transform: translateY(0); }
}

/* ⚠️ Предупреждающая модалка */
.modal-warning {
    background: linear-gradient(to bottom, #fff3cd, #ffeeba);
    border: 3px solid #ffc107;
    color: #5f370e;
    font-family: 'Segoe UI', sans-serif;
}

.modal-warning h2 {
    color: #c62828;
    font-size: 1.6rem;
    text-transform: uppercase;
    font-weight: bold;
}

.modal-warning .modal-primary-button {
    background-color: #ef6c00;
    color: white;
    text-transform: uppercase;
    border-radius: 0;
    padding: 0.75rem 1.25rem;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}

.modal-warning .modal-primary-button:hover {
    background-color: #e65100;
}

.modal-warning .modal-secondary-button {
    background-color: #f5f5f5;
    color: #8d6e63;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
}
