body, button, input, select, textarea {
    font-family: Jura, sans-serif;
    background-color: var(--bs-body-bg);
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: Roboto, sans-serif;
    font-weight: 900;
    color: white;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    #ResourceDisplay {
        flex-direction: row;
        gap: 0.5rem;
    }

    #ResourceDisplay .resource-info:first-child {
        margin-bottom: 0;
        margin-right: 0.5rem;
    }
    
    /* ResourceDisplay 내부 텍스트 크기 조절 */
    #ResourceDisplay .resource-info {
        padding-top: 0.25rem !important;
        padding-bottom: 0.25rem !important;
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }
    
    /* 대역폭/에너지 관련 텍스트 크기 줄임 */
    #BandwidthInfo1, #EnergyInfo1 {
        font-size: 1rem !important;
    }
    
    #BandwidthInfo2, #EnergyInfo2 {
        font-size: 0.8rem !important;
    }
    
    /* 그룹박스 Text 크기 줄임 */
    #ResourceDisplay .resource-info span[style*="position: absolute"] {
        font-size: 13px !important;
    }
    
    /* 프로그레스 바 높이 조절 */
    #ResourceDisplay .progress {
        height: 8px !important;
        /* margin-top: 0.3rem !important; */
    }
    
    /* Rent 버튼 조절 */
    #ResourceDisplay .min-button1 {
        font-size: 0.8rem !important;
        padding: 2px 5px !important;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    outline: none;
}

html {
    position: relative;
    min-height: 100%;
    background-color: var(--bs-body-bg);
}

body {
    height: 100vh;
    margin-bottom: 60px;
    background-color: #27293d;
    font-weight: 300;
    font-size: 17px;
}

/* 모든 section을 100% 너비로 설정 */
section {
    width: 100%;
    box-sizing: border-box;
}

nav {
    background-color: #393960;
}

footer {
    width: 100%;
    background-color: #393960;
}

/* 네비게이션 링크 색상 설정 */
.navbar-nav .nav-link {
    color: #ffffff !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: #00a085 !important;
}

.navbar-nav .dropdown-toggle {
    color: #ffffff !important;
}

.navbar-nav .dropdown-toggle:hover,
.navbar-nav .dropdown-toggle:focus {
    color: #00a085 !important;
}

button {
    font-size: 0.8rem;
}

.wallet-container {
    background-color: var(--bs-body-bg2);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}


/*tab setting*/
html, body {
    background: var(--bs-body-bg);
    margin: 0;
}

.centered {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    background: #27293dd5;
    /*filter: blur(10px) contrast(20);*/
}

.blob-1, .blob-2 {
    width: 70px;
    height: 70px;
    position: absolute;
    background: #fff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
}

.blob-1 {
    left: 20%;
    animation: osc-l 3s ease infinite;
    background: #d89e9e;
}

.blob-2 {
    left: 80%;
    animation: osc-r 3s ease infinite;
    background: #8080c8;
}

@keyframes osc-l {
    0% {
        left: 40%;
    }

    50% {
        left: 50%;
    }

    100% {
        left: 40%;
    }
}

@keyframes osc-r {
    0% {
        left: 60%;
    }

    50% {
        left: 50%;
    }

    100% {
        left: 60%;
    }
}

.qr-container {
    background-color: #202237;
    padding: 15px;
    border-radius: 8px;
}

.copy-button {
    background-color: #00c9a7;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
}

.alert-warning {
    background-color: #ff777773;
    color: white;
    font-weight: 500;
}

li.list-group-item:hover {
    background-color: #20223782;
    cursor: pointer;
}

.btn-transparent {
    background-color: transparent;
    border: none;
    padding: 10px;
    transition: background-color 0.3s, box-shadow 0.3s;
}


/*bridge*/
/* Widget Container */
.wrapper-widget {
    min-width: 290px;
    max-width: 480px;
    margin: 0 auto;
    text-align: left;
}

.widget {
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Exchange Form */
.exchange-header {
    padding-top: 20px;
    padding-bottom: 10px;
    text-align: center;
    background-color: #58587e;
    color: white;
    font-size: 18px;
    font-weight: 500;
    border-radius: 12px 12px 0 0;
}

.exchange-form__body {
    padding: 20px;
    background-color: #58587e;
    border-radius: 0 0 12px 12px;
}

/* Input Boxes */
.select-box {
    margin-bottom: 20px;
    position: relative;
}

.custom-input__wrap {
    position: relative;
    flex: 1;
}

.custom-input {
    width: 100%;
    padding: 15px;
    padding-top: 30px;
    border: 1px solid #808086;
    border-radius: 8px;
    background: transparent;
    color: white;
    font-size: 16px;
    outline: none;
}

.input-comment {
    position: absolute;
    top: 8px;
    left: 15px;
    font-size: 12px;
    color: #c3c3c3;
}

.input-comment2 {
    position: absolute;
    top: 6px;
    left: 85px;
    font-size: 13px;
    color: #c1dcff;
    font-weight: bold;
}

/* Currency Selector */
.custom-selector {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    border: 1px solid #808086;
    border-left: none;
    border-radius: 0 8px 8px 0;
    background: transparent;
    display: flex;
    align-items: center;
    padding: 0 15px;
}
    .custom-selector span {
        color: white;
    }

.label-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.label-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dropdown-arrow {
    color: white;
    margin-left: 8px;
    font-size: 12px;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    width: 150px;
    max-height: 200px;
    overflow-y: auto;
    background-color: #393960;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

    .dropdown-content.show {
        display: block;
    }

.image {
    width: 24px;
    height: 24px;
}

    .image img {
        width: 100%;
        height: 100%;
    }

/* Exchange Hints */
.exchange-hints {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.hints {
    flex: 1;
}

.hint-item {
    color: white;
    font-size: 14px;
    margin-bottom: 5px;
}

/* Swap Button */
.swap-button {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
}

/* Exchange Button */
.button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background-color: #5b62f4;
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

    .button:hover {
        background-color: #4a50d8;
    }

    .button:disabled {
        background-color: #1b1e52cc;
        opacity: 0.5;
        cursor: not-allowed;
    }

/* Modal Styles */
.stepper__background {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.stepper__wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.stepper {
    background: var(--bs-body-bg);
    border-radius: 12px;
    padding: 20px;
    width: 100%;
    max-width: 500px;
}

/* Modal Content Styles */
.stepper__header-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-panel__content {
    font-size: 24px;
    font-weight: 500;
}

.header-panel__button-close {
    color: white;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.custom-input-field__input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

/* Checkbox Styles */
.checkbox-label {
    display: flex;
    align-items: center;
    margin: 20px 0;
    cursor: pointer;
}

.custom-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
}

    .custom-checkbox.checked::after {
        content: '✓';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: #5b62f4;
    }

/* Advanced Settings */
.hidden-panel__header {
    width: 100%;
    padding: 10px;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-top: 20px;
}

.collapse-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.arrow-icon {
    transition: transform 0.3s;
}

    .arrow-icon.rotated {
        transform: rotate(180deg);
    }

.btn-transparent {
    margin-left: 3px;
    background-color: transparent;
    border: none;
}

    .btn-transparent:hover {
        background-color: transparent;
        border: none;
        /*box-shadow: 5px 5px 10px rgb(0 0 0 / 20%), -5px -5px 10px rgb(0 0 0 / 20%);*/
        transition: background-color .15s ease-in-out, border .15s ease-in-out, box-shadow .15s ease-in-out, color .15s ease-in-out;
    }

    .btn-transparent:focus, .btn-transparent:active:focus {
        background-color: transparent;
        border: none;
        /*box-shadow: 5px 5px 10px rgb(0 0 0 / 20%), -5px -5px 10px rgb(0 0 0 / 20%);*/
        transition: background-color .15s ease-in-out, border .15s ease-in-out, box-shadow .15s ease-in-out, color .15s ease-in-out;
    }

.min-button1 {
    font-size: 1rem;
    border: none;
    color: #ffcc00;
    background-color: var(--bs-body-bg2);
    border-radius: 8px;
}

    .min-button1:hover {
        font-size: 1.1rem;
        color: #e52527;
    }

/* 모든 스크롤바에 적용되는 글로벌 스타일 */
::-webkit-scrollbar {
    width: 8px; /* 세로 스크롤바 너비 */
    height: 8px; /* 가로 스크롤바 높이 */
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.3);
    }

/* Firefox를 위한 스크롤바 스타일 (선택사항) */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.1);
}

.short-text {
    display: none;
}

@media screen and (max-width: 1440px) {
    .full-text {
        display: none;
    }

    .short-text {
        display: inline;
    }
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #2196F3;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.fee-details {
    display: none;
}

.fee-details.show {
    display: block;
}

.no-spinner {
    -moz-appearance: textfield;
}

    .no-spinner::-webkit-outer-spin-button,
    .no-spinner::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

/* 트랜잭션 히스토리 테이블 스타일 수정 */
#txHashTableBody {
    background: transparent;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin: 0;
    padding: 0;
    width: 100%;
    padding: 15px;
    height:100%
}

#txHashTableBody .table-responsive {
    border-radius: 12px;
    background: var(--bs-body-bg);
    height: 100%;
    overflow-y: auto;
}

    #txHashTableBody .table-responsive th, #txHashTableBody .table-responsive div {
        color: white;
    }

#txHashTableBody table {
    width: 100%;
    margin-bottom: 0;
}

#txHashTableBody thead {
    background: linear-gradient(45deg, #2b2d3c, #1a1b23);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 2px solid #4a4a6b;
}

#txHashTableBody thead th {
    border-bottom: none;
}

#txHashTableBody tbody tr:first-child td {
    border-top: none;
}

#txHistoryBody {
    max-height: calc(400px - 50px); /* 헤더 높이를 뺀 값 */
    overflow-y: auto;
}

.history-row {
    transition: background-color 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    height: 50px;
    min-height: 50px;
}

.history-row:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.history-row td {
    padding: 12px 12px 0px 12px;
    vertical-align: middle;
}

.history-row td:nth-child(2) {
    min-width: 120px;
}

/* 스크롤바 스타일링 */
.table-responsive::-webkit-scrollbar {
    width: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0 12px 12px 0;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* 다크 모드에서의 스크롤바 */
@media (prefers-color-scheme: dark) {
    .table-responsive::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
    }

    .table-responsive::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.1);
    }

    .table-responsive::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.15);
    }
}

.tx-date {
    font-size: 0.9em;
    color: var(--bs-body-color);
}

.amount-text {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--bs-body-color);
}

.address-cell {
    font-family: monospace;
    background: rgba(0, 0, 0, 0.03);
    padding: 4px 8px;
    border-radius: 4px;
    /* max-width: 150px; */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.address-cell:hover {
    background: rgba(0, 0, 0, 0.05);
}

.action-cell {
    gap: 8px;
}

.action-btn {
    padding: 6px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.action-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.action-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.action-btn:hover .action-icon {
    opacity: 1;
}

.empty-history {
    padding: 40px;
    color: #666;
    font-style: italic;
}

.wallet-btn-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    gap: 0.5rem;
}

.coin-item:hover{
    background-color: #20223782;
    cursor: pointer;
}

/* 니모닉 그리드 */
.mnemonic-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-width: 600px;
    margin: 0 auto;
}

.mnemonic-word {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    background-color: #f8f9fa;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .mnemonic-word.filled {
        border-color: black;
        background-color: var(--bs-body-bg3);
        font-weight: 500;
    }

.fv-list {
    padding: 20px;
    height: 230px;
    overflow-y: auto;
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    #txHashTableBody {
        background: transparent;
    }

    .history-row:hover {
        background-color: rgba(255, 255, 255, 0.02);
    }

    .address-cell {
        background: rgba(255, 255, 255, 0.05);
    }

    .address-cell:hover {
        background: rgba(255, 255, 255, 0.08);
    }

    .action-btn:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }

    .empty-history {
        color: #999;
    }
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    #txHashTableBody {
        /*height: calc(100vh - 200px);*/
        height: 90%;
    }

    .history-row td {
        padding: 8px;
    }

    /* .address-cell {
        max-width: 100px;
    } */

    .tx-date {
        font-size: 0.8em;
    }

    .amount-text {
        font-size: 0.8em;
    }

    .action-icon {
        width: 18px;
        height: 18px;
    }

    .wallet-btn-row {
        flex-direction: row;
        gap: 0.5rem;
    }

        .wallet-btn-row > button {
            min-width: 0;
            flex: 1 1 0;
            font-size: 1rem;
            padding-left: 0.5rem;
            padding-right: 0.5rem;
        }

    .exchange-form__body {
        padding-top: 5px;
        padding-bottom: 10px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .btn {
        padding-top:8px;
        padding-bottom:8px;
    }

    .mnemonic-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }

    .mnemonic-word {
        padding: 10px;
    }

    .fv-list {
        height: 230px;
    }

    .navbar-nav.mx-auto .nav-link {
        color: #ffffff !important;
        font-size: 1rem !important;
    }

        .navbar-nav.mx-auto .nav-link:hover {
            color: #ffffff !important;
        }
}
