* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--tg-theme-bg-color, #0a0a0a);
    /* Геометричні золоті лінії на фоні (патерн) */
    background-image: 
        linear-gradient(30deg, rgba(212, 175, 55, 0.04) 1px, transparent 1px),
        linear-gradient(-30deg, rgba(212, 175, 55, 0.04) 1px, transparent 1px);
    background-size: 60px 104px;
    background-position: center center;
    color: var(--tg-theme-text-color, #ffffff);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #222;
    padding-bottom: 15px;
    /* Плавне з'явлення шапки */
    opacity: 0;
    animation: headerFadeIn 1s ease-out forwards;
}

.header-title {
    font-size: 24px;
    font-weight: 700;
    /* Золотий градієнт для відблиску (замість звичайного кольору) */
    background: linear-gradient(90deg, #d4af37 0%, #d4af37 45%, #fffae6 50%, #d4af37 55%, #d4af37 100%);
    background-size: 200% auto;
    color: #000;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    /* Анімація появи та відблиску (кожні 6 секунд) */
    animation: titleTracking 1.2s ease-out forwards, goldShimmer 6s infinite 2s;
}

.header-subtitle {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    /* Анімація появи для підзаголовка */
    animation: subtitleTracking 1.5s ease-out forwards;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.vip-badge {
    display: inline-block; /* Дозволяє застосовувати вертикальні відступи */
    margin-top: 12px; /* Опускаємо бейдж вниз (ефект натискання Enter) */
    font-size: 14px; /* Робимо текст трохи більшим */
    color: #00ffff; /* Чистий кіберпанк неон */
    font-weight: 900;
    letter-spacing: 2px;
    padding: 6px 14px; /* Збільшуємо рамку навколо тексту */
    border: 2px solid #00ffff;
    border-radius: 6px;
    background-color: transparent;
    /* Потужне неонове світіння */
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.4), inset 0 0 10px rgba(0, 255, 255, 0.2);
    text-shadow: 0 0 6px #00ffff;
    animation: vipGlow 2s infinite alternate;
}

/* --- АНІМАЦІЇ ДЛЯ МОДАЛЬНОГО ВІКНА VIP --- */
@keyframes modalPopIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Нова анімація зникнення (інверсія появи) */
@keyframes modalPopOut {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0; }
}

/* Клас, який застосовує анімацію зникнення */
.modal-content.closing {
    animation: modalPopOut 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    pointer-events: none; /* Убираем клики во время анимации */
}

/* --- ЕКСКЛЮЗИВНА ЗОЛОТА ПЛАШКА --- */
.gold-plaque {
    margin-bottom: 30px;
    padding: 4px;
    border-radius: 10px;
    /* Масивний золотий градієнт-злиток */
    background: linear-gradient(135deg, #bf953f 0%, #fcf6ba 25%, #b38728 50%, #fbf5b7 75%, #aa771c 100%);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(212, 175, 55, 0.2);
    /* Анімація появи */
    opacity: 0;
    animation: headerFadeIn 1s ease-out 0.3s forwards;
}

.plaque-inner-border {
    border: 1px solid rgba(139, 90, 43, 0.6);
    border-radius: 6px;
    /* Збільшили нижній відступ з 22px до 45px, щоб текст не наліз на іконку */
    padding: 22px 15px 45px 15px; 
    text-align: center;
    /* Легкий внутрішній градієнт для об'єму (ефект тиснення) */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.1) 100%);
    position: relative; /* Додано для можливості перемістити карту в кут */
}

.plaque-text-large {
    color: #2b1d03;
    font-size: 22px; /* Збільшений шрифт */
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.6);
}

.plaque-text-medium {
    color: #3d2a04;
    font-size: 18px; 
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 15px; /* Збільшили відступ до іконки */
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

/* --- ІКОНКА КЛЮЧА ТА VIP КАРТА --- */
.vip-access-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute; /* Відв'язуємо від тексту і робимо вільним */
    bottom: 12px; /* Притискаємо до нижнього краю */
    right: 15px; /* Притискаємо до правого краю */
    padding-left: 20px; 
}

.vip-key {
    width: 45px;
    height: 45px;
    color: #d4af37; /* Преміальне золото */
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-45%) rotate(15deg);
    z-index: 2;
    /* 3D тінь для ключа, щоб він виглядав об'ємно */
    filter: drop-shadow(3px 4px 4px rgba(0, 0, 0, 0.6)) drop-shadow(-1px -1px 1px rgba(255, 255, 255, 0.2));
}

.vip-card-prop {
    background: linear-gradient(135deg, #4a3018 0%, #2b1a0b 100%); /* Шоколадно-кавовий колір картки */
    border: 1px solid rgba(212, 175, 55, 0.8);
    border-radius: 6px;
    padding: 6px 12px 6px 25px; /* Відступ зліва під жало ключа */
    display: flex;
    flex-direction: column;
    transform: rotate(-6deg); /* Нахил карти як на референсі */
    box-shadow: 4px 6px 10px rgba(0, 0, 0, 0.5), inset 0 0 8px rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 1;
}

.vip-card-title {
    color: #f7d670;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 2px;
    line-height: 1;
    /* Об'ємний 3D текст (тиснення) */
    text-shadow: 1px 1px 0px #8a641c, 2px 2px 0px #5c410e, 0 0 8px rgba(212, 175, 55, 0.4); 
}

.vip-card-subtitle {
    color: #d4af37;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-top: 3px;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.9);
}

@keyframes vipGlow {
    0% { 
        text-shadow: 0 0 4px rgba(0, 229, 255, 0.2);
        box-shadow: 0 0 2px rgba(0, 229, 255, 0.1);
    }
    100% { 
        text-shadow: 0 0 10px rgba(0, 229, 255, 0.8), 0 0 15px rgba(0, 229, 255, 0.4);
        box-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
    }
}

/* --- KEYFRAMES ДЛЯ АНІМАЦІЙ --- */
@keyframes headerFadeIn {
    0% { opacity: 0; transform: translateY(-15px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes titleTracking {
    0% { letter-spacing: -2px; opacity: 0; }
    100% { letter-spacing: 2px; opacity: 1; }
}

@keyframes subtitleTracking {
    0% { letter-spacing: 0px; opacity: 0; }
    100% { letter-spacing: 4px; opacity: 1; }
}

@keyframes goldShimmer {
    0%, 80% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

.exchange-section {
    background-color: var(--tg-theme-secondary-bg-color, #141414);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid #2a2a2a;
}

.loading-text {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #999);
}

/* --- ФОРМА ОБМІНУ --- */
.exchange-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.input-group label {
    font-size: 13px;
    color: #a0a0a0;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Спільні стилі для полів вводу та вибору */
.premium-input,
.premium-select {
    background-color: #0d0d0d;
    border: 1px solid #333;
    color: #fff;
    font-size: 16px;
    padding: 14px 15px;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
    /* Внутрішня тінь для глибини */
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}

.premium-input::placeholder {
    color: #444;
}

/* Ефект при кліку на поле (фокус) */
.premium-input:focus,
.premium-select:focus {
    border-color: #d4af37;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5), 0 0 8px rgba(212, 175, 55, 0.3);
}

/* Кастомізація поля Select (Вибір банку) */
.premium-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    cursor: pointer;
}

/* Поле, доступне тільки для читання (Отримую USDT) */
.premium-input[readonly] {
    background-color: #1a1a1a;
    color: #d4af37;
    font-weight: 700;
    border-color: #2a2a2a;
    cursor: not-allowed;
}

/* --- ГОЛОВНА КНОПКА --- */
.exchange-btn {
    background: linear-gradient(90deg, #b38728 0%, #fcf6ba 50%, #b38728 100%);
    background-size: 200% auto;
    color: #111;
    border: none;
    padding: 16px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 2px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    text-transform: uppercase;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* Ефекти наведення ТІЛЬКИ для активної кнопки */
.exchange-btn:not(:disabled):hover {
    background-position: right center;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
    transform: translateY(-2px);
}

.exchange-btn:not(:disabled):active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

/* Стан вимкненої кнопки (коли поля не заповнені) */
.exchange-btn:disabled {
    background: #1a1a1a;
    color: #444;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
    border: 1px solid #2a2a2a;
    cursor: not-allowed;
    transform: none; /* Забороняємо рух при кліку */
}

/* --- ДАШБОРД КОРИСТУВАЧА --- */
.dashboard-section {
    background-color: var(--tg-theme-secondary-bg-color, #141414);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #2a2a2a;
    position: relative; /* Додано: тепер історія буде "випадати" відносно цього блоку */
}

.user-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-avatar-wrap {
    margin-right: 12px;
}

.avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b38728 0%, #2b1d03 100%);
    color: #f7d670;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    border: 2px solid #d4af37;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
}

.user-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.user-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3px;
    letter-spacing: 0.5px;
}

.user-status {
    font-size: 11px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Зелена неонова крапка статусу */
.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #00ff00;
    box-shadow: 0 0 6px #00ff00;
}

/* Кнопка відкриття історії */
.history-toggle-btn {
    background: transparent;
    border: none;
    color: #d4af37;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, color 0.3s ease;
}

.history-toggle-btn:hover {
    color: #fff;
    transform: scale(1.1);
}

/* --- ІСТОРІЯ ОБМІНІВ --- */
.history-container {
    position: absolute; /* Відриваємо від основного потоку */
    top: calc(100% + 5px); /* Розміщуємо рівно під дашбордом з невеликим відступом */
    left: 0;
    right: 0;
    z-index: 1000; /* Піднімаємо шар поверх форми обміну */
    background-color: #111111; /* Темний преміальний фон */
    border: 1px solid #333;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.9); /* Глибока 3D-тінь, щоб візуально відокремити від форми */
}

/* Універсальний клас для приховування будь-яких елементів */
.hidden {
    display: none !important;
}

/* --- ФІЛЬТРИ ТА ЗАГОЛОВОК ІСТОРІЇ --- */
.history-header-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.history-title {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
    margin: 0;
}

.history-filters {
    display: flex;
    gap: 8px;
}

.filter-input {
    background-color: #1a1a1a;
    border: 1px solid #333;
    color: #ccc;
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 4px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.filter-input:focus {
    border-color: #d4af37;
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.2);
}

.search-filter {
    flex-grow: 1; /* Рядок пошуку займає весь вільний простір */
}

.date-filter {
    width: 110px;
    color-scheme: dark; /* Робить іконку календаря світлою на темному фоні */
    cursor: pointer;
}

/* Стиль для унікального ID транзакції */
.history-id {
    color: #b38728;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 280px; /* Обмежуємо висоту для появи скролу */
    overflow-y: auto; /* Вмикаємо вертикальний скрол */
    padding-right: 5px; /* Відступ, щоб повзунок не прилипав до тексту */
}

/* --- КАСТОМНИЙ СКРОЛБАР --- */
.history-list::-webkit-scrollbar {
    width: 4px; /* Тонкий та елегантний */
}

.history-list::-webkit-scrollbar-track {
    background: #1a1a1a; /* Темний фон доріжки */
    border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #b38728; /* Золотий повзунок */
    border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #d4af37; /* Світлішає при наведенні */
}

/* Картка транзакції */
.history-card {
    background-color: #0d0d0d;
    border: 1px solid #1f1f1f;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.history-date {
    color: #777;
}

.history-bank {
    color: #d4af37;
    font-weight: 600;
}

.history-amounts {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.give-amount {
    color: #ff4d4d; /* Червоний колір для віддачі (мінус) */
}

.get-amount {
    color: #00e676; /* Зелений колір для отримання (плюс) */
}

.history-details {
    font-size: 11px;
    color: #555;
}

/* --- КВИТАНЦІЯ ПРО ОПЛАТУ --- */
.history-receipt {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #222; /* Ефект відривного чека */
    display: flex;
    justify-content: flex-end; /* Вирівнюємо кнопку по правому краю */
}

.receipt-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #b38728; /* Спокійне золото */
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease, text-shadow 0.3s ease, transform 0.2s ease;
}

.receipt-link:hover {
    color: #f7d670; /* Яскраве золото при наведенні */
    text-shadow: 0 0 5px rgba(247, 214, 112, 0.4);
    transform: translateX(-2px); /* Легкий зсув для динаміки */
}

/* --- АНІМАЦІЯ КЛІКУ ДЛЯ VIP-КАРТКИ --- */
#vipCardTrigger {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

/* Легке підсвічування при наведенні (більше для ПК) */
#vipCardTrigger:hover {
    filter: brightness(1.05);
}

/* Ефект фізичного натискання (вдавлювання) */
#vipCardTrigger:active {
    transform: scale(0.97);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.9);
}

/* --- МОДАЛЬНЕ ВІКНО VIP-КЛУБУ --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Темний фон */
    backdrop-filter: blur(8px); /* Розмиття заднього фону (ефект скла) */
    z-index: 9999; /* Поверх усього додатку */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background-color: #111111;
    border: 1px solid #b38728; /* Золота рамка */
    border-radius: 16px;
    padding: 30px 20px;
    width: 100%;
    max-width: 340px;
    position: relative;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 20px rgba(179, 135, 40, 0.15); /* Глибока тінь + легке світіння */
    animation: modalPopIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Пружна анімація появи */
}

@keyframes modalPopIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close-btn:hover {
    color: #d4af37; /* Загоряється золотим при наведенні */
}

.modal-title {
    margin-bottom: 15px;
    line-height: 1.4;
    text-align: center;
}

.club-text {
    color: #a0a5aa; /* Шляхетний платиновий (срібний) відтінок для клубу */
    font-size: 11px;
    letter-spacing: 4px; /* Широка відстань між літерами для статусності */
    font-weight: 600;
    text-transform: uppercase;
}

.brand-text {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1.5px;
    display: inline-block;
    margin-top: 4px;
    /* Ефект сяючого переливающегося золота */
    background: linear-gradient(to right, #b38728 0%, #fef1a7 50%, #b38728 100%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: brandGoldShimmer 3s linear infinite;
}

/* Анімація для руху золотого відблиску по тексту */
@keyframes brandGoldShimmer {
    to { background-position: 200% center; }
}

/* Колір та стиль для статусу Platinum у модальному вікні */
.platinum-status {
    color: #b38728;
    font-weight: 700;
}

/* Акцент на важливих словах у тексті (від третіх осіб) */
.highlight-text {
    color: #ffffff; /* Робимо текст яскраво-білим на фоні сірого тексту */
    font-weight: 700; /* Робимо шрифт жирним */
}

.modal-body p {
    color: #aaaaaa;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

/* --- КНОПКА ТА АНКЕТА МЕРЧАНТА --- */
.merchant-btn-wrapper {
    text-align: center;
    margin: 15px 0 25px 0; /* Відступи від VIP бейджа до золотої плашки */
}

.merchant-apply-btn {
    background: transparent;
    border: 1px solid #b38728; /* Золота тонка рамка */
    color: #b38728;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(179, 135, 40, 0.1);
}

.merchant-apply-btn:hover {
    background: rgba(179, 135, 40, 0.15); /* Легке золоте підсвічування при наведенні */
    box-shadow: 0 0 15px rgba(179, 135, 40, 0.3);
}

/* Стилі самої анкети всередині модального вікна */
.merchant-desc {
    color: #aaaaaa;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    color: #d4af37; /* Шляхетний золотий акцент для назв полів */
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.premium-input {
    width: 100%;
    background-color: #111111;
    border: 1px solid #333333;
    color: #ffffff;
    padding: 14px 15px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.premium-input:focus {
    border-color: #b38728; /* Золота рамка при введенні тексту */
    box-shadow: 0 0 10px rgba(179, 135, 40, 0.2);
}

.premium-input::placeholder {
    color: #555555;
}

.submit-merchant-btn {
    width: 100%;
    /* Переносимо магію переливання з головної кнопки обміну */
    background: linear-gradient(90deg, #b38728 0%, #fcf6ba 50%, #b38728 100%);
    background-size: 200% auto;
    color: #111111;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.4s ease; /* Такий самий плавний перехід */
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* Ефект переливання та підняття при наведенні (точнісінько як у .exchange-btn) */
.submit-merchant-btn:not(:disabled):hover {
    background-position: right center;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
    transform: translateY(-2px);
}

/* Ефект натискання */
.submit-merchant-btn:not(:disabled):active {
    transform: scale(0.97) translateY(0);
}

/* --- КНОПКИ КУПІВЛІ ТА ПРОДАЖУ USDT --- */
.trade-actions-wrapper {
    display: flex;
    flex-direction: column; /* Змінено на колонку для меню методів */
    margin: 20px 0;
}

.trade-buttons-container {
    display: flex;
    gap: 15px;
    width: 100%;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    justify-content: center;
}

.trade-btn {
    flex: 1;
    padding: 14px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #111111;
}

/* Кнопка КУПИТИ (Кіберпанк Зелений) */
.buy-btn {
    color: #00ff66;
    border: 1px solid rgba(0, 255, 102, 0.3);
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.05);
}

.buy-btn:not(.pulsing):hover {
    background-color: rgba(0, 255, 102, 0.1);
    border-color: #00ff66;
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.3);
    transform: translateY(-2px);
}

.buy-btn:not(.pulsing):active {
    transform: scale(0.97) translateY(0);
}

/* Кнопка ПРОДАТИ (Кіберпанк Червоний) */
.sell-btn {
    color: #ff3366;
    border: 1px solid rgba(255, 51, 102, 0.3);
    box-shadow: 0 0 10px rgba(255, 51, 102, 0.05);
}

.sell-btn:hover {
    background-color: rgba(255, 51, 102, 0.1);
    border-color: #ff3366;
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.3);
    transform: translateY(-2px);
}

.sell-btn:active {
    transform: scale(0.97) translateY(0);
}

/* --- АНІМАЦІЯ КНОПОК ТА МЕНЮ МЕТОДІВ (ЭТАП 2) --- */
.trade-buttons-container.centered .buy-btn {
    flex: 0 1 250px; /* Кнопка звужується і стає по центру */
    margin: 0 auto;
}

/* Анімація м'якої пульсації (раз на 3 секунди) */
@keyframes pulseBuyBtn {
    0% { box-shadow: 0 0 10px rgba(0, 255, 102, 0.2); transform: scale(1); }
    50% { box-shadow: 0 0 25px rgba(0, 255, 102, 0.6); transform: scale(1.02); }
    100% { box-shadow: 0 0 10px rgba(0, 255, 102, 0.2); transform: scale(1); }
}

.buy-btn.pulsing {
    animation: pulseBuyBtn 3s infinite;
    background-color: rgba(0, 255, 102, 0.1);
    border-color: #00ff66;
    cursor: default; /* Вимикаємо клікабельність під час пульсації */
}

/* --- МЕНЮ НАПРЯМКІВ ОБМІНУ --- */
.trade-methods-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.method-btn {
    background-color: #111111;
    border: 1px solid #333;
    color: #888;
    padding: 14px;
    border-radius: 8px;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.method-btn:hover {
    background-color: #1a1a1a;
    border-color: #555;
    color: #ccc;
    transform: translateX(5px);
}

/* Активний сценарій (Згенероване посилання) */
.method-btn.active-scenario {
    border-color: #d4af37;
    color: #f7d670;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.1) 0%, transparent 100%);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
    font-weight: 600;
}

.method-btn.active-scenario:hover {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.2) 0%, transparent 100%);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    transform: translateX(5px);
}

/* Плавні появи та зникнення */
.fade-in {
    animation: fadeInAnim 0.4s ease-out forwards;
}

.fade-out {
    animation: fadeOutAnim 0.3s ease-in forwards;
}

@keyframes fadeInAnim {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOutAnim {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-15px); }
}