/* =============== 1. BASE =============== */
* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: #fff;
    color: #222
}

/* -------- HEADER -------- */
.header {
    background: linear-gradient(to right, #a64cff, #6c2cff);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    color: #fff
}

.header-left {
    font-weight: bold;
    font-size: 18px;
    letter-spacing: 1px
}

.header-right {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap
}

.header-right a {
    color: #fff;
    text-decoration: none;
    font-size: 15px
}

.btn-secure {
    padding: 8px 16px;
    border: 1px solid #fff;
    border-radius: 20px;
    background: transparent;
    color: #fff;
    font-size: 14px;
    cursor: pointer
}

/* -------- INFO SECTION -------- */
.section {
    padding: 40px 20px 0;
    max-width: 800px;
    margin: 0 auto
}

.section h1 {
    font-size: 26px;
    margin-bottom: 10px;
    color: #333
}

.description-box {
    background: #f5f7fa;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 14px;
    color: #555;
    border-left: 4px solid #6c2cff;
    margin-bottom: 30px
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 14px;
    flex-wrap: wrap
}

.toggle-switch {
    position: relative;
    width: 38px;
    height: 20px;
    display: inline-block
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0
}

.slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 20px;
    transition: .4s;
    cursor: pointer
}

.slider::before {
    content: "";
    position: absolute;
    left: 3px;
    bottom: 3px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: .4s
}

.toggle-switch input:checked+.slider {
    background: #6c2cff
}

.toggle-switch input:checked+.slider:before {
    transform: translateX(18px)
}

/* -------- WALLET CARD -------- */
.wallet-container {
    width: 100%;
    max-width: 400px;
    margin: 40px auto;
    background: #f8f8f8;
    border-radius: 20px;
    padding: 30px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08)
}

.wallet-header h2 {
    margin-top: 20px;
    font-size: 22px;
    color: #222
}

.wallet-option {
    background: #fff;
    padding: 12px 16px;
    margin: 10px 0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .05);
    transition: .3s
}

.wallet-option:hover {
    background: #f0e7ff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08)
}

.wallet-option.selected {
    background: #efe0ff;
    border: 1px solid #a64cff
}

.wallet-option img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 12px
}

.wallet-name {
    flex-grow: 1
}

.more-wallet {
    color: #6c2cff;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    margin: 10px 0 20px
}

.connect-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(to right, #a64cff, #6c2cff);
    font-size: 16px;
    color: #fff;
    cursor: pointer;
    transition: .3s
}

.connect-btn:disabled {
    background: #d2b5ff;
    cursor: not-allowed;
    opacity: .6
}

.connect-btn:not(:disabled):hover {
    background: #4b1a9b
}

img#accountWalletImg {
    width: 100px;
}

/* =============== 2. MODAL =============== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 1000;
    justify-content: center;
    align-items: center
}

.modal-card {
    width: 90%;
    max-width: 400px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .15)
}

.modal-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-weight: 600;
    font-size: 20px
}

.modal-top .close-x {
    cursor: pointer;
    font-size: 22px;
    line-height: 1
}

.modal-divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 0
}

.modal-body {
    padding: 40px 25px;
    text-align: center
}

.bottom-bar {
    width: 70px;
    height: 4px;
    background: #000;
    border-radius: 2px;
    margin: 35px auto 10px
}

/* -------- STATUS & LOADER -------- */
.status-item {
    display: none
}

.status-item.active {
    display: block
}

.dot-loader {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 25px
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    animation: flash 1s infinite ease-in-out
}

.dot:nth-child(2) {
    animation-delay: .2s
}

.dot:nth-child(3) {
    animation-delay: .4s
}

@keyframes flash {

    0%,
    80%,
    100% {
        background: #ccc
    }

    40% {
        background: #000
    }
}

.re-correct-btn {
    margin-top: 15px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: #6c2cff;
    color: #fff;
    font-size: 14px;
    cursor: pointer
}

.re-correct-btn:hover {
    background: #4b1a9b
}

/* -------- IMPORT FORM -------- */
.import-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px
}

.import-tab {
    padding: 6px 12px;
    border: 2px solid transparent;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-size: 14px
}

.import-tab.active {
    border-color: #f5b12d
}

.tab-content {
    display: none
}

.tab-content.active {
    display: block
}

#walletImportForm input,
#walletImportForm textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 12px;
    font: inherit
}

#walletImportForm textarea {
    background: #f0f9ff
}

/* -------- PRELOADER -------- */
#preloader {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 22px
}

/* -------- RESPONSIVE -------- */
@media(max-width:768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px
    }

    .wallet-container {
        width: 90%
    }
}

@media(max-width:480px) {
    .wallet-header h2 {
        font-size: 18px
    }

    .section h1 {
        font-size: 22px
    }

    .connect-btn {
        font-size: 14px;
        padding: 12px
    }
}