:root {
    --bg-color: #111827;
    --bg-block-color: #232e3c;
    --bg-inside-color: #374151;
    --text-color: #fff; 
    --button-color: #2563eb; 
    --button-text-color: #ffffff; 
    --subtitle-text-color: #9ca3af;
    --accent-text-color: #6ab2f2;
    --bg-error: #a82323;
    --section-separator-color: #111921;
    --theme-section-header-text-color: #6ab3f3;
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", Segoe UI Symbol, "Noto Color Emoji";
}
body{
    color: var(--text-color);
    background: var(--bg-color);
    overflow-x: hidden;
}
/* Preloader */
#content{
    display: none;
}
#content {
    opacity: 0;
    transition: opacity 0.3s ease;
}
  
#content[style*="display: block"] {
    opacity: 1;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--bg-color);
    border-top: 5px solid var(--button-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
  
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Fonts */
.text-gray-400{
    color: var(--subtitle-text-color);
}
.text-green-500 {
    color: #22c55e;
}
.font-medium{
    font-weight: 500;
}
h2.title{
    font-size: 1rem;
    line-height: 2rem;
    color: var(--theme-section-header-text-color);
}
h3.title{
    font-size: 1.125rem;
    line-height: 1.75rem;
    color: var(--text-color);
    display: flex;
    gap: 6px;
}
h3.title.center{
    justify-content: center;
}
.center{
    text-align: center;
}
.text-ssm{
    font-size: 0.75rem;
}
.text-sm {
    font-size: .875rem;
    line-height: 1rem;
}
.text-xl {
    font-size: 1.25rem;
    line-height: 1.5rem;
}
.text-3xl {
    font-size: 1.875rem;
    line-height: 2rem;
}
.text-4xl {
    font-size: 3rem;
    line-height: 3rem;
}
.font-bold {
    font-weight: 700;
}
.capitalize {
    text-transform: capitalize;
}
.text-sub{
    color: var(--subtitle-text-color);
}
.text-green-400 {
    color: #4ade80;
}
.text-blue-400 {
    color: #60a5fa;
}
.mt-1{
    margin-top: 0.25rem;
}
.mt-15{
    margin-top: 0.35rem;
}
.mt-4 {
    margin-top: 1rem;
}
.mb-1 {
    margin-bottom: .25rem;
}
.mb-2 {
    margin-bottom: .5rem;
}
.mb-4 {
    margin-bottom: 1rem;
}
.mb-6 {
    margin-bottom: 1.5rem;
}
.mb-8 {
    margin-bottom: 3rem;
}
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Other */

.none{
    display: none !important;
}

#languageSwitcher{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
    border: none;
}
#languageSwitcher span{
    font-size: .875rem;
    line-height: 1.25rem;
}
#languageSwitcher svg{
    stroke: var(--button-text-color);
}

section.section{
    padding-bottom: 4.5rem;
    transition: all .3s ease;
}
section:not(.home__section){
    display: none;
}
#order-number{
    word-break: break-all;
}
.min-h-screen{
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.container{
    max-width: 450px;
    width: 100%;
    margin: 0 auto;
    padding: .75rem;
}
.content-box{
    padding: 1.5rem;
    border-radius: .75rem;
    margin-bottom: 1.5rem;
    background: var(--bg-block-color);
    width: 100%;
}
.content-box.blue{
    background: var(--button-color);
    color: var(--button-text-color);
}
.two-boxes{
    display: flex;
    gap: 1rem;
}
.two-boxes .content-box{
    padding: 1rem;
}

.fixed-panel{
    box-shadow: 0 -1px 0 var(--section-separator-color);
    background: var(--bg-color);
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1;
    padding: 5px 10px;
}
.panel__container{
    display: flex;
    justify-content: space-around;
    gap: 2px;
    width: 100%;
}
.fixed-panel .container{
    padding: 0;
}
.panel-btn{
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 5px 15px;
    position: relative;
}
.panel-btn svg{
    color: var(--subtitle-text-color);
}
.panel-btn span{
    margin-top: .25rem;
    font-size: .75rem;
    line-height: 1rem;
    color: var(--subtitle-text-color);
}
.panel-btn.active::after{
    content: '';
    background: var(--text-color);
    opacity: .1;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}
.panel-btn.active svg,
.panel-btn.active span{
    color: var(--text-color);
}

/*  */
.info-lines .flex-line:not(:last-child){
    margin-bottom: 1rem;
}
.flex-line{
    display: flex;
    justify-content: space-between;
    color: var(--text-color);
}

/* Forms */
.row-label{
    color: var(--subtitle-text-color);
    font-size: .875rem;
    line-height: 1.25rem;
    font-weight: 500;
    margin-bottom: .5rem;
}
.form-line{
    margin-bottom: .75rem;
    display: flex;
    flex-direction: column;
}
.input-style{
    padding: .75rem;
    outline: none;
    border: 1px solid var(--subtitle-text-color);
    transition: all .3s ease;
    width: 100%;
    border-radius: .5rem;
    background: var(--bg-inside-color);
    color: var(--text-color);
    font-size: 1rem;
    min-height: 50px;
}
.input-style.errorField{
    color: #dc3545;
}
.input-style:read-only{
    border-color: var(--subtitle-text-color) !important;
}
.input-style:focus{
    border-color: var(--button-color);
}
.btn-style{
    width: 100%;
    background: var(--button-color);
    color: var(--button-text-color);
    font-weight: 500;
    font-size: 1rem;
    border-radius: .5rem;
    padding-top: .75rem;
    padding-bottom: .75rem;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all .3s ease;
}
.btn-style:hover{
    opacity: .85;
}

.grey-block{
    border-radius: .5rem;
    background: var(--bg-inside-color);
    padding: .75rem;
}


.ref-link-box,
.ref-control{
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ref-btn{
    flex-shrink: 0;
    margin-left: .5rem;
    border-radius: .5rem;
    padding: .5rem;
    background: transparent;
    border: none;
    outline: none;
    transition: all .3s ease;
    color: var(--text-color);
    width: 36px;
    height: 36px;
    cursor: pointer;
}
.ref-btn:hover{
    background: #4b5563;
}

.three-row{
    display: flex;
    gap: 1rem;
}
.three-row .content-box{
    padding: 1rem;
    border-radius: .75rem;
}

.how-lines{
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.how-lines .line{
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}

.msg-box{
    position: fixed;
    top: -400px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - .75rem);
    max-width: 450px;
    z-index: 9999;
    text-align: center;
    padding: .5rem;
    font-weight: 500;
    background: var(--button-color);
    color: var(--button-text-color);
    border-radius: .5rem;
    transition: all .3s ease;
}
.msg-box.active{
    top: 1rem;
}
.msg-box.error{
    background: var(--bg-error);
}

/* Trans */

.transaction-icon{
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 500px;
    flex-shrink: 0;
}
.transaction-box{
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
}
.transaction-info{
    width: 100%;
    display: flex;
    justify-content: space-between;
}
.transaction-info .left,
.transaction-info .right{
    display: flex;
    flex-direction: column;
    
    gap: .25rem;
}
.transaction-info .right{
    align-items: flex-end;
}
.transaction-info .left{
    align-items: flex-start;
}
.transaction-box.deposit .transaction-icon{
    background: #22c55e33;
    color: #22c55e;
}
.transaction-box.earning .transaction-icon{
    background: #3b82f633;
    color: #3b82f6;
}
.transaction-box.withdraw .transaction-icon{
    background: #ef444433;
    color: #ef4444;
}



.transaction-box.earning .transaction-amount{
    color: #22c55e;
}

.transaction-box.deposit .transaction-amount.success{
    color: #22c55e;
}

.transaction-box.withdraw .transaction-amount{
    color: #ef4444;
}

.transaction-box.deposit[data-orderid]{
    cursor: pointer;
}

.memo-line{
    display: none;
}
/* Test */
#theme-colors {
    margin-top: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: var(--bg-color);
}

.color-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.color-swatch {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

/* New */
.home-control{
    display: flex;
    justify-content: space-between;
}
.home-control .panel-btn svg{
    color: var(--text-color);
}
.home-control .panel-btn span{
    color: var(--accent-text-color);
    font-weight: 600;
    font-size: 0.875rem;
}
.home-control .panel-btn .icon-box{
    width: 32px;
    height: 32px;
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-text-color);
}


.balances-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--bg-block-color);
    border-radius: 8px;
}

.balance-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.balance-icon {
    margin-right: 10px;
    display: flex;
}

.balance-info {
    display: flex;
    flex-direction: column;
}

.balance-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
}

.balance-rate {
    font-size: 14px;
    color: var(--subtitle-text-color);
}

.balance-change {
    color: #ff4d4d; /* Красный для отрицательного изменения */
}

.balance-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.balance-amount-uah {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
}

.balance-amount-currency {
    font-size: 14px;
    color: var(--subtitle-text-color);
}

.balance-change.up {
    color: #00ff00; /* Зеленый для положительного изменения */
}
.balance-change.down {
    color: #ff4d4d; /* Красный для отрицательного изменения */
}

.currency-icon {
    width: 40px;
    height: 40px;
}

.fiat-icon {
    background-color: #ff9900;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
}

/* Exhange */
.exchange__section{
    flex: 1 1 auto;
}
.exchange__container{
    display: flex;
    flex-direction: column;
}
.exchange-content{
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}


.exchange-box{ margin-bottom: 20px; }
.currency-row {margin-bottom: 10px; width: 100%;}

.currency-btn img { width: 20px; height: 20px; margin-right: 5px; }
.currency-item img { width: 40px; height: 40px; margin-right: 5px; }
.currency-item span { width: 40px; height: 40px; margin-right: 5px; }
.balance { font-size: .875rem; color: var(--subtitle-text-color); }
.error { font-size: .875rem; color: #dc3545; display: none; }
.exchange-confirm { text-align: center; }
.rate { margin-bottom: 10px; }
.confirm-btn:disabled { background: #555; cursor: not-allowed; }
.currency-popup { position: fixed; bottom: 0; left: 0; background: var(--bg-block-color); padding: 20px; display: none; max-height: 700px; overflow-y: auto; z-index: 1000; border-top-right-radius: 12px;border-top-left-radius: 12px; width: 100%;}
.currency-popup h3 { margin: 0 0 10px; }
.currency-item { display: flex; justify-content: space-between; padding: 10px; cursor: pointer; align-items: center; }
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); display: none; z-index: 999; }

.exchange-info{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.exchange-top{
    display: flex;
    align-items: center;
    gap: 10px;
}
.exchange-top .currency-icon,
.exchange-top img{
    width: 32px;
    height: 32px;
}
.choose-value{
    display: flex;
    flex-direction: column;
    width: 100%;
}
.item-icon{
    display: flex;
}

.currency-item{
    position: relative;
}
.currency-item::after{
    content: '';
    width: 100%;
    height: 1px;
    opacity: .3;
    position: absolute;
    left: 0;
    bottom: 0;
    background:  var(--section-separator-color); 
}
.item-selection { 
    flex-shrink: 0;
    width: 20px; 
    height: 20px; 
    border-radius: 50%; 
    border: 2px solid var(--subtitle-text-color); 
    position: relative;
}
.item-selection.selected::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    width: 10px;
    height: 10px; 
    background: var(--button-color); 
    border: none; 
    border-radius: 100%;
}
.item-selection.selected{
    border-color: var(--button-color);
}
.item-icon{
    flex-shrink: 0;
}

.currency-input { 
    display: flex; 
    align-items: center; 
}
.currency-input input { 
    color: var(--text-color); 
    width: 100%;
    font-size: 44px;
    font-weight: bold;
    background: transparent;
    border: none;
    outline: none;
}
.currency-input input.errorFiled{
    color: #dc3545;
}
.currency-btn { 
    border-radius: 5px; 
    border: none; 
    background: transparent; 
    color: var(--subtitle-text-color);
    font-weight: bold; 
    margin-left: 10px; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    font-size: 28px;
    gap: 6px;
}
.currency-btn i{
    font-size: 24px;
}

.swap-line{
    position: relative;
    display: flex;
    justify-content: flex-end;
}
.swap-line::before{
    content: '';
    width: 100%;
    height: 1px;
    position: absolute;
    background: var(--section-separator-color);
    top: 50%;
    transform: translateY(-50%);
}
.swap-btn{
    width: 40px;
    height: 40px;
    background: var(--button-color);
    color: var(--button-text-color);
    border: none;
    border-radius: 50%;
    outline: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    font-size: 17px;
    cursor: pointer;
}
.pay-icon,
.receive-icon{
    display: flex;
}

.exchange-confirm{
    display: flex;
    flex-direction: column;
}

.confirm-btn{
    width: 100%;
}
.back-btn{
    width: 100%;
}

/* Deposit */

.deposit-variants{
    display: flex;
    flex-direction: column;
}
.deposit-variant{
    padding: 1rem;
    background-color: var(--bg-block-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 20px;
}
.variant-desc{
    display: flex;
    flex-direction: column;
    width: 100%;
}
.variant-icon,
.variant-right{
    flex-shrink: 0;
}
.variant-right{
    color: var(--subtitle-text-color);
}
.variant-icon{
    width: 40px;
    height: 40px;
    background: var(--button-color);
    color: var(--button-text-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.deposit__section,
.order__section{
    flex: 1 1 auto;
}
.deposit__container{
    display: flex;
    flex-direction: column;
}
.deposit-stage{
    flex: 1 1 auto;
    display: none;
}
.deposit-stage[data-stage="first"]{
    display: flex;
}
.stage-content{
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
}

span .crypto-icon {
    width: 30px;
    height: 30px;
}

.select2-selection{
    outline: none;
    border: 1px solid var(--subtitle-text-color) !important;
    transition: all .3s ease;
    width: 100%;
    border-radius: .5rem !important;
    background: var(--bg-inside-color) !important;
    color: var(--text-color) !important;
    font-size: 1rem;
    min-height: 50px;
    display: flex !important;
    align-items: center;
}
.select-content{
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--text-color);
}
.select2-dropdown{
    background: var(--bg-inside-color) !important;
    color: var(--text-color) !important;
}
.select2-container{
    width: 100% !important;
}

.select2-container span{
    color: var(--text-color);
}

.select2-container--default .select2-results__option--selected{
    background: var(--button-color) !important;
    color: var(--button-text-color) !important;
}
.select2-search__field{
    height: 40px;
    border-radius: .5rem;
    background: var(--bg-inside-color) !important;
    color: var(--text-color) !important;
    outline: none;
    padding-left: 10px !important;
    border: 1px solid var(--subtitle-text-color) !important;
}
.select2-search__field:focus{
    border-color: var(--button-color) !important;
}
.select2-dropdown{
    border: 1px solid var(--subtitle-text-color) !important;
    top: -5px !important;
    border-bottom-left-radius: .5rem !important;
    border-bottom-right-radius: .5rem !important;
    border-top: none !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow{
    top: 10px !important;
    right: 8px !important; 
}
/* Order */
.order__container{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1 1 auto;
}


/* Withdraw */
.withdraw-variants{
    display: flex;
    flex-direction: column;
}
.withdraw-variant{
    padding: 1rem;
    background-color: var(--bg-block-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 20px;
}
.variant-desc{
    display: flex;
    flex-direction: column;
    width: 100%;
}
.variant-icon,
.variant-right{
    flex-shrink: 0;
}
.variant-right{
    color: var(--subtitle-text-color);
}
.variant-icon{
    width: 40px;
    height: 40px;
    background: var(--button-color);
    color: var(--button-text-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.withdraw__section,
.order__section{
    flex: 1 1 auto;
}
.withdraw__container{
    display: flex;
    flex-direction: column;
}
.withdraw-stage{
    flex: 1 1 auto;
    display: none;
}
.withdraw-stage[data-stage="first"]{
    display: flex;
}
.stage-content{
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
}

.withdraw-choose-line{
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 16px;
    line-height: 16px;
}
.withdraw-choose-line span{
    font-size: 12px;
    line-height: 12px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered{
    color: var(--text-color) !important;
}

.card-withdraw .currency-icon{
    width: 30px;
    height: 30px;
}

/*  */
.not-found-box{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.not-found-image{
    display: flex;
}
.not-found-image img{
    width: 220px;
}
.referral-item{
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: var(--bg-inside-color);
    padding: 10px;
    border-radius: 8px;
}
.referral-info{
    display: flex;
    flex-direction: column;
    width: 100%;
}
.referral-info .ref-name{
    font-size: 1.2rem;
}

.number{
    background: var(--button-color);
    font-weight: 500;
    font-size: 1rem;
    line-height: 1rem;
    padding: 5px 10px;
    margin-top: 2px;
    border-radius: 4px;
    color: var(--button-text-color);
}

.referral-item .info-lines{
    display: none;
}
.referral-item .info-lines.show{
    display: flex;
    gap: 10px 20px;
    font-size: 12px;
    flex-wrap: wrap;
}
.referral-item .info-lines .flex-line{
    width: calc(50% - 10px);
    margin-bottom: 0;
}