/* Блок с фоном */
.exchange-container {
    padding: 20px 0;
    background-image: url('../assets/img/backgroundcrypto.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    margin: 0;
}

.main-exchange-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.titlemain {
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: left;
    line-height: 1.3; /* Чтобы строки не были слишком сжаты */
}

.exchange-panel {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    align-items: stretch; /* Выравнивает элементы по высоте */
}

.currency-container {
    background: #1c1c1c;
    padding: 15px;
    border-radius: 5px;
    width: 30%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 480px; /* Увеличили на 20% с 400px до 480px */
}

.currency-container h2 {
    margin-bottom: 10px;
}

.currency-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.currency-header h2 {
    margin: 0;
    font-size: 18px;
}

.arrow-icon {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.currency-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1; /* Занимает всю доступную высоту */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Элементы начинаются сверху */
    overflow-y: auto; /* Добавляем вертикальный скроллинг */
}

.currency-list li {
    display: flex;
    align-items: center;
    padding: 8px 0; /* Уменьшаем отступы для компактности */
    cursor: pointer;
    transition: background 0.3s;
    flex: 0 0 auto; /* Не растягивается, сохраняет естественный размер */
    min-height: 40px; /* Уменьшаем минимальную высоту */
}

.currency-list li img {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

.currency-list li:hover {
    background: #292929;
}

.currency-list li a {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    width: 100%;
    padding: 8px 0; /* Уменьшаем отступы для компактности */
    transition: background 0.3s, color 0.3s;
    min-height: 40px; /* Уменьшаем минимальную высоту */
}

/* Стили для скроллбара */
.currency-list::-webkit-scrollbar {
    width: 6px;
}

.currency-list::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 3px;
}

.currency-list::-webkit-scrollbar-thumb {
    background: #f5a800;
    border-radius: 3px;
}

.currency-list::-webkit-scrollbar-thumb:hover {
    background: #e69500;
}

.currency-list li a:hover {
    background: #292929;
    border-radius: 4px; /* Скругленные углы при наведении */
}
    color: white;
}

.currency-list li a img {
    width: 35px;
    height: 35px;
    margin-right: 10px;
}

.scrollable-list {
    max-height: 360px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #8cc63f #1c1c1c;
}

.scrollable-list::-webkit-scrollbar {
    width: 8px;
}

.scrollable-list::-webkit-scrollbar-track {
    background: #1c1c1c;
}

.scrollable-list::-webkit-scrollbar-thumb {
    background-color: #8cc63f;
    border-radius: 4px;
}

.scrollable-list::-webkit-scrollbar-thumb:hover {
    background-color: #76b52f;
}

.calculator-container {
    background: #1c1c1c;
    padding: 20px;
    border-radius: 5px;
    width: 30%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-self: flex-start;
}

.calculator-container h3 {
    color: orange;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 15px;
}

.calculator-section {
    margin-top: 15px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    padding: 10px 40px 10px 10px;
    width: 100%;
    box-sizing: border-box;
}

.input-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
}

.calculator-container button {
    margin-top: 20px;
    padding: 12px;
    background-color: orange;
    border: none;
    color: rgb(0, 0, 0);
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.calculator-container button:hover {
    background-color: #e69500;
}

.calculator-note {
    margin-top: 15px;
    color: #ccc;
    font-size: 12px;
    line-height: 1.4;
}

/* Адаптация планшеты */
@media (max-width: 1024px) {
    .exchange-panel {
        flex-direction: column;
        align-items: center;
    }

    .currency-container,
    .calculator-container {
        width: 80%;
    }

    .titlemain {
        text-align: left; /* Исправить обратно на left */
        font-size: 24px;
    }
}

/* Адаптация мобильные */
@media (max-width: 600px) {
    .exchange-panel {
        flex-direction: column;
        align-items: center;
    }

    .currency-container,
    .calculator-container {
        width: 100%;
    }

    .calculator-container h3 {
        font-size: 16px;
    }

    .main-content {
        padding: 0 10px;
    }

    .currency-list li a {
        font-size: 14px;
    }

    .titlemain {
        text-align: left; /* Убрать center, поставить left */
        font-size: 20px;
    }
}

/* Стили для кликабельных иконок Telegram */
.contact-list img[onclick] {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.contact-list img[onclick]:hover {
    transform: scale(1.1);
}

.contact-list img[onclick]:active {
    transform: scale(0.95);
}

/* Стили для ссылок Telegram */
.contact-list a[href*="t.me"] {
    color: #0088cc;
    text-decoration: none;
    font-weight: 500;
}

.contact-list a[href*="t.me"]:hover {
    text-decoration: underline;
}
