/* ============================================
   ОСНОВНЫЕ ИСПРАВЛЕНИЯ ДЛЯ МОДАЛЬНОГО ОКНА
   ============================================ */

/* Фиксируем body при открытии модального окна */
body.modal-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* ============================================
   КНОПКА "ПОДДЕРЖАТЬ ПРОЕКТ" - АДАПТИРОВАНА ПОД ВАШУ ТЕМУ
   ============================================ */
#support-project-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #5CD9E8, #33FFFF);
    border: none;
    border-radius: 50px;
    width: auto;
    height: 50px;
    cursor: pointer;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1C1D1E;
    font-weight: 700;
    font-size: 14px;
    padding: 0 25px;
    gap: 10px;
    min-width: 50px;
    overflow: hidden;
    font-family: inherit;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(92, 217, 232, 0.3);
}

#support-project-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
}

#support-project-btn:hover::before {
    left: 100%;
}

#support-project-btn i {
    font-size: 18px;
    transition: all 0.4s ease;
    z-index: 1;
}

#support-project-btn .btn-text {
    white-space: nowrap;
    transition: all 0.3s ease;
    z-index: 1;
}

#support-project-btn:hover {
    transform: translateY(-8px) scale(1.05);
    background: linear-gradient(135deg, #33FFFF, #5CD9E8);
    box-shadow: 0 10px 25px rgba(92, 217, 232, 0.4);
}

#support-project-btn:hover i {
    transform: rotate(15deg) scale(1.2);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

#support-project-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    animation: heartBeat 0.6s ease 0.2s both;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.1); }
    30% { transform: scale(1); }
    45% { transform: scale(1.05); }
    60% { transform: scale(1); }
}

/* ============================================
   МОДАЛЬНОЕ ОКНО ПОДДЕРЖКИ - СТИЛИЗОВАНО ПОД ВАШУ ТЕМУ
   ============================================ */
.support-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(23, 23, 23, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    animation: modalFadeIn 0.4s ease;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 20px;
}

@keyframes modalFadeIn {
    from { 
        opacity: 0; 
        backdrop-filter: blur(0);
    }
    to { 
        opacity: 1; 
        backdrop-filter: blur(8px);
    }
}

.support-modal-content {
    position: relative;
    background: linear-gradient(145deg, #1C1D1E, #171717);
    padding: 35px 30px 30px;
    width: 100%;
    max-width: 520px;
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: modalSlideUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(92, 217, 232, 0.2);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transform-origin: center;
    overflow: hidden;
}

.support-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #5CD9E8, transparent);
}

@keyframes modalSlideUp {
    from { 
        transform: translateY(50px) scale(0.9); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0) scale(1); 
        opacity: 1; 
    }
}

/* Кнопка закрытия - адаптирована под тему */
.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(92, 217, 232, 0.1) !important;
    border: 1px solid rgba(92, 217, 232, 0.3);
    border-radius: 50%;
    font-size: 18px;
    color: #5CD9E8;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-close:hover {
    color: #fff;
    background: rgba(92, 217, 232, 0.2) !important;
    border-color: rgba(92, 217, 232, 0.5);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(92, 217, 232, 0.3);
}

.modal-close:active {
    transform: rotate(90deg) scale(0.95);
}

/* Контейнер для содержимого */
.modal-body {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
    margin-right: -8px;
    scrollbar-width: thin;
    scrollbar-color: #5CD9E8 rgba(255, 255, 255, 0.05);
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #5CD9E8, #33FFFF);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #33FFFF, #5CD9E8);
}

/* Заголовок */
.support-modal h2 {
    color: #5CD9E8;
    margin: 0 0 30px 0;
    font-size: 24px;
    text-align: left;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(92, 217, 232, 0.3);
    display: flex;
    align-items: center;
    justify-content: left;
    gap: 12px;
    font-weight: 700;
    flex-shrink: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.support-modal h2 i {
    color: #5CD9E8;
    font-size: 26px;
    text-shadow: 0 0 15px rgba(92, 217, 232, 0.5);
}

/* ============================================
   СПИСОК КОШЕЛЬКОВ - СТИЛИЗОВАНО ПОД ТЕМУ
   ============================================ */
.wallet-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 25px;
    width: 100%;
}

.wallet-item {
    background: linear-gradient(145deg, rgba(92, 217, 232, 0.05), rgba(92, 217, 232, 0.02));
    border-radius: 12px;
    padding: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(92, 217, 232, 0.1);
    position: relative;
    overflow: hidden;
}

.wallet-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #5CD9E8, transparent);
    transition: left 0.6s ease;
}

.wallet-item:hover::before {
    left: 100%;
}

.wallet-item:hover {
    background: linear-gradient(145deg, rgba(92, 217, 232, 0.1), rgba(92, 217, 232, 0.05));
    border-color: rgba(92, 217, 232, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(92, 217, 232, 0.15);
}

.wallet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: nowrap;
    gap: 15px;
    width: 100%;
}

.wallet-currency {
    font-weight: 600;
    color: #FFFFFF;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    white-space: nowrap;
}

.wallet-currency i {
    color: #5CD9E8;
    font-size: 20px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.wallet-item:hover .wallet-currency i {
    transform: scale(1.2);
}

/* Кнопки - адаптированы под тему */
.copy-btn {
    background: linear-gradient(135deg, #5CD9E8, #33FFFF);
    color: #1C1D1E;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: inherit;
    text-decoration: none !important;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 140px;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(92, 217, 232, 0.3);
}

.copy-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.copy-btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(40, 40);
        opacity: 0;
    }
}

.copy-btn:hover {
    background: linear-gradient(135deg, #33FFFF, #5CD9E8);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(92, 217, 232, 0.4);
    color: #1C1D1E;
}

.copy-btn:active {
    transform: translateY(-1px);
}

.copy-btn.copied {
    background: #27ae60;
    transform: scale(0.98);
    animation: copiedPulse 0.5s ease;
}

@keyframes copiedPulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.copy-btn.telegram-btn {
    background: linear-gradient(135deg, #0088cc, #34AADF);
    min-width: 140px;
    color: #FFFFFF;
    border: 1px solid rgba(0, 136, 204, 0.3);
}

.copy-btn.telegram-btn:hover {
    background: linear-gradient(135deg, #34AADF, #0088cc);
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.4);
    color: #FFFFFF;
}

.wallet-address {
    background: rgba(92, 217, 232, 0.05);
    border-radius: 8px;
    padding: 14px;
    font-family: 'SF Mono', 'Roboto Mono', 'Courier New', monospace;
    font-size: 13px;
    word-break: break-all;
    color: #CCCCCC;
    border: 1px solid rgba(92, 217, 232, 0.1);
    line-height: 1.5;
    overflow-wrap: break-word;
    transition: all 0.3s ease;
}

.wallet-item:hover .wallet-address {
    background: rgba(92, 217, 232, 0.08);
    border-color: rgba(92, 217, 232, 0.2);
}

/* ============================================
   ФУТЕР МОДАЛЬНОГО ОКНА
   ============================================ */
.modal-footer {
    text-align: center;
    color: #949494;
    font-size: 14px;
    padding-top: 25px;
    border-top: 1px solid rgba(92, 217, 232, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-shrink: 0;
    margin-top: auto;
    font-weight: 500;
}

.modal-footer i {
    color: #5CD9E8;
    font-size: 16px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ============================================
   АДАПТИВНЫЕ СТИЛИ
   ============================================ */

/* Планшеты */
@media screen and (max-width: 1024px) {
    .support-modal-content {
        padding: 30px 25px 25px;
        max-width: 90%;
        max-height: 90vh;
    }
    
    .support-modal h2 {
        font-size: 22px;
        margin-bottom: 25px;
    }
    
    .wallet-item {
        padding: 18px;
    }
}

/* Мобильные устройства (768px и меньше) */
@media screen and (max-width: 768px) {
    .support-modal {
        padding: 15px;
    }
    
    #support-project-btn {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        padding: 0;
        border-radius: 50%;
    }
    
    #support-project-btn .btn-text {
        display: none;
    }
    
    #support-project-btn i {
        font-size: 22px;
        margin-right: 0;
    }
    
    .support-modal-content {
        padding: 25px 20px 20px;
        max-width: 95%;
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .modal-close {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .support-modal h2 {
        font-size: 20px;
        margin-bottom: 20px;
        padding-bottom: 15px;
        gap: 10px;
    }
    
    .support-modal h2 i {
        font-size: 22px;
    }
    
    .wallet-list {
        gap: 14px;
        margin-bottom: 20px;
    }
    
    .wallet-item {
        padding: 16px;
    }
    
    .wallet-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .wallet-currency {
        justify-content: left;
        text-align: left;
        font-size: 15px;
    }
    
    .copy-btn {
        min-width: 100%;
        padding: 12px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    .copy-btn.telegram-btn {
        min-width: 100%;
    }
    
    .wallet-address {
        font-size: 12px;
        padding: 12px;
    }
    
    .modal-footer {
        padding-top: 20px;
        font-size: 13px;
    }
}

/* Маленькие мобильные устройства (480px и меньше) */
@media screen and (max-width: 480px) {
    #support-project-btn {
        bottom: 16px;
        right: 16px;
        width: 52px;
        height: 52px;
    }
    
    #support-project-btn i {
        font-size: 20px;
    }
    
    .support-modal {
        padding: 10px;
    }
    
    .support-modal-content {
        padding: 22px 16px 18px;
        max-width: 100%;
        margin: 0;
        border-radius: 12px;
        max-height: 85vh;
    }
    
    .modal-close {
        top: 12px;
        right: 12px;
        width: 34px;
        height: 34px;
    }
    
    .support-modal h2 {
        font-size: 18px;
        gap: 8px;
        padding-bottom: 12px;
        margin-bottom: 18px;
    }
    
    .support-modal h2 i {
        font-size: 20px;
    }
    
    .wallet-list {
        gap: 12px;
        margin-bottom: 18px;
    }
    
    .wallet-item {
        padding: 14px;
        border-radius: 10px;
    }
    
    .wallet-header {
        gap: 10px;
        margin-bottom: 12px;
    }
    
    .wallet-currency {
        font-size: 14px;
        gap: 8px;
    }
    
    .wallet-currency i {
        font-size: 18px;
    }
    
    .copy-btn {
        padding: 11px;
        font-size: 13px;
        border-radius: 7px;
    }
    
    .wallet-address {
        font-size: 11px;
        padding: 10px;
        border-radius: 7px;
    }
    
    .modal-footer {
        padding-top: 18px;
        font-size: 12px;
    }
}

/* Очень маленькие устройства (360px и меньше) */
@media screen and (max-width: 360px) {
    .support-modal-content {
        padding: 20px 14px 16px;
        max-height: 90vh;
    }
    
    .support-modal h2 {
        font-size: 17px;
        margin-bottom: 16px;
    }
    
    .wallet-currency {
        font-size: 13px;
    }
    
    .copy-btn {
        padding: 10px;
        font-size: 12px;
    }
    
    .wallet-address {
        font-size: 10px;
        padding: 10px;
    }
}

/* Ландшафтная ориентация на мобильных */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .support-modal-content {
        max-width: 85%;
        max-height: 95vh;
        padding: 20px;
    }
    
    .support-modal h2 {
        font-size: 18px;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .wallet-list {
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .wallet-item {
        padding: 12px;
    }
    
    .wallet-header {
        flex-direction: row;
        margin-bottom: 8px;
    }
    
    .copy-btn {
        padding: 8px 12px;
        font-size: 12px;
        min-width: 120px;
    }
    
    .modal-footer {
        padding-top: 15px;
        font-size: 12px;
    }
}

/* Для высоких экранов */
@media screen and (min-height: 1000px) {
    .support-modal-content {
        max-height: 75vh;
    }
}

/* Анимация появления элементов в модалке */
.wallet-item {
    animation: fadeInUp 0.5s ease backwards;
}

.wallet-item:nth-child(1) { animation-delay: 0.1s; }
.wallet-item:nth-child(2) { animation-delay: 0.2s; }
.wallet-item:nth-child(3) { animation-delay: 0.3s; }
.wallet-item:nth-child(4) { animation-delay: 0.4s; }
.wallet-item:nth-child(5) { animation-delay: 0.5s; }
.wallet-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Убираем горизонтальный скролл на всей странице */
html, body {
    overflow-x: hidden;
    width: 100%;
}

/* Финальные исправления для идеальной адаптивности */
@media screen and (max-width: 768px) {
    .wallet-header {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    
    .copy-btn,
    .copy-btn.telegram-btn {
        display: flex;
        justify-content: center;
        margin-top: 4px;
        width: 100%;
    }
    
    .wallet-currency {
        width: 100%;
        justify-content: left;
        text-align: left;
        margin-bottom: 0;
    }
}