/* ===== CSS Variables ===== */
:root {
    --primary: #2B6CF6;
    --primary-dark: #1a4ed8;
    --primary-light: #4A90F5;
    --gradient: linear-gradient(135deg, #2B6CF6, #7C3AED);
    --gradient-btn: linear-gradient(135deg, #3B82F6, #8B5CF6);
    --bg-color: #FFFFFF;
    --bg-gray: #F5F7FA;
    --bg-card: #FFFFFF;
    --text-primary: #1A1A2E;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --green: #16C784;
    --red: #EA3943;
    --yellow: #FCD535;
    --orange: #F0B90B;
    --border: #E5E7EB;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --header-h: 48px;
    --tabbar-h: 56px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-gray);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
}

#app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg-gray);
    position: relative;
    box-shadow: 0 0 40px rgba(0,0,0,0.05);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 0; display: none; }

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
}

/* 交易记录右上角「刷新」：点一下立刻与后台提现审核结果对账 */
.tx-refresh {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .25s ease, color .2s ease, border-color .2s ease;
}

.tx-refresh:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: rotate(90deg);
}

.tx-refresh:active { transform: rotate(180deg) scale(0.94); }

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: #1A1A2E;
}

.header-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: #1A1A2E;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-actions .icon-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.header-actions .icon-btn:active {
    background: var(--bg-gray);
}

.header-actions .icon-btn svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

/* ===== Balance Bar ===== */
.balance-bar {
    background: #fff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.balance-bar .balance-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.balance-bar .balance-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.balance-bar .announce-btn {
    background: var(--gradient);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
}

/* ===== Ticker Scroll ===== */
.ticker-wrap {
    background: #fff;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
}

.ticker-content {
    display: inline-block;
    animation: tickerScroll 60s linear infinite;
}

.ticker-content span {
    display: inline-block;
    padding: 0 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

.ticker-content .coin-name {
    font-weight: 600;
    color: var(--text-primary);
}

.ticker-content .up { color: var(--green); }
.ticker-content .down { color: var(--red); }

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== Banner ===== */
.banner-section {
    padding: 12px 16px;
    background: #fff;
}

.banner {
    width: 100%;
    height: 160px;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #1E3A8A, #7C3AED);
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-slide {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    cursor: pointer;
}

.banner-slide.active {
    opacity: 1;
}

.banner-slide .banner-content {
    background: rgba(0,0,0,0.4);
    padding: 12px 24px;
    border-radius: 8px;
}

.banner-content {
    text-align: center;
    color: #fff;
    z-index: 1;
}

.banner-content h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
}

.banner-content p {
    font-size: 14px;
    opacity: 0.9;
}

.banner-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
}

.banner-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
}

.banner-dots .dot.active {
    background: #fff;
    width: 18px;
    border-radius: 3px;
}

/* ===== Quick Actions ===== */
.quick-actions {
    padding: 12px 16px;
    background: #fff;
    display: flex;
    gap: 12px;
}

.quick-card {
    flex: 1;
    background: linear-gradient(135deg, #EBF4FF, #F3E8FF);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.quick-card:active {
    transform: scale(0.96);
}

.quick-card .icon-wrap {
    width: 40px;
    height: 40px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-card .icon-wrap svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.quick-card .label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== Notice Bar ===== */
.notice-bar {
    background: #FFF8E1;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border);
}

.notice-bar .notice-icon {
    width: 18px;
    height: 18px;
    color: var(--orange);
    flex-shrink: 0;
}

.notice-bar .notice-text {
    font-size: 12px;
    color: #856404;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Market Section ===== */
.market-section {
    background: #fff;
    margin-top: 8px;
}

.market-header {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.market-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.market-tabs {
    display: flex;
    gap: 16px;
}

.market-tabs .mtab {
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
}

.market-tabs .mtab.active {
    color: var(--primary);
    font-weight: 600;
    border-bottom-color: var(--primary);
}

/* ===== Coin List ===== */
.coin-list {
    list-style: none;
}

.coin-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #F3F4F6;
    cursor: pointer;
    transition: background 0.2s;
}

.coin-item:active {
    background: var(--bg-gray);
}

.coin-item .coin-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.coin-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.coin-name {
    font-size: 15px;
    font-weight: 600;
}

.coin-fullname {
    font-size: 11px;
    color: var(--text-light);
}

.coin-price {
    text-align: right;
    flex: 1;
}

.coin-price .price {
    font-size: 14px;
    font-weight: 600;
}

.coin-price .usdt {
    font-size: 11px;
    color: var(--text-light);
}

.coin-change {
    text-align: right;
    min-width: 72px;
}

.coin-change .change-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.coin-change .up {
    background: rgba(22,199,132,0.1);
    color: var(--green);
}

.coin-change .down {
    background: rgba(234,57,67,0.1);
    color: var(--red);
}

/* ===== Tab Bar ===== */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-top: 1px solid var(--border);
    display: flex;
    height: var(--tabbar-h);
    z-index: 100;
}

.tabbar .tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.2s;
}

.tabbar .tab-item.active {
    color: var(--primary);
}

.tabbar .tab-item svg {
    width: 22px;
    height: 22px;
}

.tabbar .tab-item .tab-label {
    font-size: 11px;
}

/* ===== Login Page ===== */
.login-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #F0EDFF 0%, #F5F7FA 40%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 24px;
}

.login-logo {
    width: 72px;
    height: 72px;
    background: #0D0D2B;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.login-logo svg {
    width: 40px;
    height: 40px;
    color: #fff;
}

.login-brand {
    font-size: 16px;
    font-weight: 700;
    color: #0D0D2B;
    letter-spacing: 1px;
    margin-bottom: 40px;
}

.login-form {
    width: 100%;
    max-width: 360px;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 1.5px solid var(--border);
    padding: 8px 0;
}

.form-input-wrap .input-icon {
    width: 20px;
    height: 20px;
    color: var(--primary);
    margin-right: 8px;
    flex-shrink: 0;
}

.form-input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--text-primary);
    background: transparent;
}

.form-input-wrap input::placeholder {
    color: var(--text-light);
}

.form-input-wrap .toggle-pwd {
    width: 20px;
    height: 20px;
    color: var(--text-light);
    cursor: pointer;
}

.btn-login {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius);
    background: var(--gradient-btn);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: opacity 0.2s;
}

.btn-login:active {
    opacity: 0.85;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
}

/* ===== Support Button ===== */
.support-btn {
    position: fixed;
    bottom: 76px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-btn);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(59,130,246,0.4);
    z-index: 99;
}

.support-btn svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

/* ===== Register Page ===== */
.register-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #F0EDFF 0%, #F5F7FA 40%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 24px;
}

.register-form {
    width: 100%;
    max-width: 360px;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    box-shadow: var(--shadow-lg);
}

/* 注册方式切换：邮箱注册 / 用户名注册 */
.reg-mode-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.reg-mode-tabs .rmtab {
    flex: 1;
    text-align: center;
    padding: 10px 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color .2s, border-color .2s;
}

.reg-mode-tabs .rmtab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ===== Transaction Page ===== */
.transaction-page {
    min-height: 100vh;
    background: var(--bg-gray);
    padding-bottom: var(--tabbar-h);
}

.tx-header {
    background: #fff;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.tx-balance-card {
    background: var(--gradient);
    border-radius: var(--radius);
    padding: 20px;
    color: #fff;
}

.tx-balance-card .label {
    font-size: 13px;
    opacity: 0.85;
}

.tx-balance-card .amount {
    font-size: 28px;
    font-weight: 700;
    margin-top: 4px;
}

.tx-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.tx-actions .tx-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.tx-actions .tx-btn.deposit {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

.tx-actions .tx-btn.withdraw {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

.tx-list {
    background: #fff;
    margin-top: 8px;
}

.tx-list-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    font-weight: 700;
}

.tx-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #F3F4F6;
}

.tx-row .tx-info .tx-type {
    font-size: 14px;
    font-weight: 600;
}

.tx-row .tx-info .tx-time {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}

.tx-row .tx-amount {
    text-align: right;
}

.tx-row .tx-amount .amount {
    font-size: 14px;
    font-weight: 600;
}

.tx-row .tx-amount .status {
    font-size: 12px;
    margin-top: 2px;
}

.tx-row .tx-amount .status.done,
.tx-row .tx-amount .status.completed,
.tx-row .tx-amount .status.settled { color: var(--green); }
.tx-row .tx-amount .status.pending { color: var(--orange); }
.tx-row .tx-amount .status.rejected { color: var(--red, #EA3943); }

.tx-reject-tip {
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.6;
    color: #EA3943;
    word-break: break-all;
}

/* 充值待审核提示 */
.tx-pending-tip {
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.6;
    color: #F59E0B;
    word-break: break-all;
}

/* 充值弹窗里「审核通过后才到账」的说明已按需求移除 */

/* ===== Savings Page ===== */
.savings-page {
    min-height: 100vh;
    background: var(--bg-gray);
    padding-bottom: var(--tabbar-h);
}

.savings-header {
    background: var(--gradient);
    padding: 20px 16px;
    color: #fff;
}

.savings-header .title {
    font-size: 18px;
    font-weight: 700;
}

.savings-header .subtitle {
    font-size: 13px;
    opacity: 0.85;
    margin-top: 4px;
}

.savings-products {
    background: #fff;
    margin: 12px;
    border-radius: var(--radius);
    overflow: hidden;
}

.savings-product {
    padding: 16px;
    border-bottom: 1px solid #F3F4F6;
    cursor: pointer;
}

.savings-product:last-child { border-bottom: none; }

.savings-product .sp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.savings-product .sp-name {
    font-size: 15px;
    font-weight: 600;
}

.savings-product .sp-rate {
    font-size: 18px;
    font-weight: 700;
    color: var(--green);
}

.savings-product .sp-detail {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===== Account Page ===== */
.account-page {
    min-height: 100vh;
    background: var(--bg-gray);
    padding-bottom: var(--tabbar-h);
}

.account-header {
    background: var(--gradient);
    padding: 24px 16px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 16px;
}

.account-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
}

.account-info .username {
    font-size: 17px;
    font-weight: 600;
}

.account-info .uid {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 2px;
}

.account-menu {
    background: #fff;
    margin: 12px;
    border-radius: var(--radius);
    overflow: hidden;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #F3F4F6;
    cursor: pointer;
}

.menu-item:last-child { border-bottom: none; }

.menu-item .menu-icon {
    width: 20px;
    height: 20px;
    color: var(--primary);
    margin-right: 12px;
}

.menu-item .menu-label {
    flex: 1;
    font-size: 14px;
}

.menu-item .menu-arrow {
    width: 16px;
    height: 16px;
    color: var(--text-light);
}

/* ===== Announce Page ===== */
.announce-page {
    min-height: 100vh;
    background: var(--bg-gray);
}

.announce-list {
    background: #fff;
    margin: 8px 0;
}

.announce-item {
    padding: 16px;
    border-bottom: 1px solid #F3F4F6;
    cursor: pointer;
}

.announce-item .title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.announce-item .content {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.announce-item .time {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 8px;
}

/* ===== Trade Page ===== */
.trade-page {
    min-height: 100vh;
    background: #fff;
    padding-bottom: var(--tabbar-h);
}

.trade-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.trade-coin {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trade-coin .name {
    font-size: 18px;
    font-weight: 700;
}

.trade-coin .price {
    font-size: 14px;
    color: var(--red);
}

.trade-stats {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.trade-stat {
    text-align: center;
}

.trade-stat .label {
    font-size: 11px;
    color: var(--text-light);
}

.trade-stat .value {
    font-size: 14px;
    font-weight: 600;
    margin-top: 2px;
}

.trade-form {
    padding: 16px;
}

.trade-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
}

.trade-tabs .ttab {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.trade-tabs .ttab.buy {
    color: var(--green);
    border-bottom-color: var(--green);
}

.trade-tabs .ttab.sell {
    color: var(--red);
    border-bottom-color: var(--red);
}

.trade-tabs .ttab:not(.active) {
    color: var(--text-secondary);
    border-bottom-color: transparent;
}

.trade-input-group {
    margin-bottom: 16px;
}

/* 交易页余额栏：价格下方、下单前一眼看到可用资金 */
.trade-balance-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 16px 12px;
    padding: 12px 16px;
    background: #1a1a2e;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.trade-balance-bar .tb-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.trade-balance-bar .tb-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.trade-balance-bar .tb-value small {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 2px;
}

/* 实时 K 线图：周期切换 + 蜡烛图画布 */
.kline-card {
    margin: 0 16px 16px;
    padding: 10px 0 6px;
    background: #12182b;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.kline-tf-tabs {
    display: flex;
    gap: 4px;
    padding: 0 10px;
    margin-bottom: 6px;
}

.kline-tf {
    flex: 1;
    padding: 6px 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.kline-tf.active {
    background: var(--primary);
    color: #fff;
}

.kline-canvas-wrap {
    position: relative;
    width: 100%;
    height: 220px;
}

.kline-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.trade-input-group label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: block;
}

.trade-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    outline: none;
}

.trade-input:focus {
    border-color: var(--primary);
}

/* 交易页金额输入框下方的实时提示：折算币数量 + 可用余额 */
.trade-input-tip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.trade-input-tip .tip-qty {
    color: var(--primary);
    font-weight: 600;
}

.trade-percent {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.trade-percent .pct-btn {
    flex: 1;
    padding: 6px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
    color: var(--text-secondary);
}

.trade-percent .pct-btn.active {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(43,108,246,0.05);
}

.btn-trade {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
}

.btn-trade.buy {
    background: var(--green);
}

.btn-trade.sell {
    background: var(--red);
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-content {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 360px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 17px;
    font-weight: 700;
}

.modal-close {
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 20px;
}

.modal-body {
    padding: 16px;
}

/* ===== Deposit/Withdraw Modal ===== */
.dw-modal .amount-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 16px;
    margin-bottom: 12px;
}

.dw-modal .addr-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 12px;
}

.dw-modal .btn-confirm {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--gradient-btn);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-light);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 14px;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    z-index: 300;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.toast.show {
    opacity: 1;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    #app {
        box-shadow: none;
    }
}

/* ===== Language Dropdown ===== */
.lang-wrapper {
    position: relative;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 160px;
    overflow: hidden;
    z-index: 200;
    border: 1px solid var(--border);
}

.lang-dropdown-header {
    padding: 10px 16px;
    font-size: 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid #F3F4F6;
    font-weight: 600;
}

.lang-option {
    padding: 12px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-option:hover {
    background: var(--bg-gray);
}

.lang-option.active {
    background: rgba(43,108,246,0.06);
    color: var(--primary);
    font-weight: 600;
}

.lang-option.active::after {
    content: '✓';
    margin-left: auto;
    font-size: 14px;
}

/* ===== Support Panel ===== */
.support-panel {
    max-width: 380px;
}

.support-section-title {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 600;
}

.support-channel {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 8px;
    background: var(--bg-gray);
}

.support-channel:hover {
    background: #EBF4FF;
}

.support-channel:active {
    transform: scale(0.98);
}

.support-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.support-icon svg {
    width: 22px;
    height: 22px;
    color: #fff;
}

.chat-icon {
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
}

.telegram-icon {
    background: linear-gradient(135deg, #2AABEE, #229ED9);
}

.line-icon {
    background: linear-gradient(135deg, #06C755, #00B900);
}

.email-icon {
    background: linear-gradient(135deg, #F59E0B, #EF4444);
}

.whatsapp-icon {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.other-icon {
    background: linear-gradient(135deg, #6B7280, #4B5563);
}

.support-info {
    flex: 1;
}

.support-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.support-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ===== Account Form Styles ===== */
.acct-form-group {
    margin-bottom: 16px;
}

.acct-form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.acct-form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--text-primary);
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.acct-form-input:focus {
    border-color: var(--primary);
}

.acct-form-input:disabled {
    background: var(--bg-gray);
    color: var(--text-secondary);
}

.copy-row {
    display: flex;
    gap: 8px;
}

.copy-row .acct-form-input {
    flex: 1;
}

.copy-btn {
    padding: 0 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--gradient-btn);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.copy-btn:active {
    opacity: 0.85;
}

/* ===== Settings Rows ===== */
.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #F3F4F6;
    font-size: 15px;
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-lang-options {
    display: flex;
    gap: 8px;
}

.lang-pill {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.lang-pill.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ===== Toggle Switch ===== */
.toggle-switch {
    width: 48px;
    height: 26px;
    border-radius: 13px;
    background: #D1D5DB;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch.on {
    background: var(--green);
}

.toggle-knob {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: left 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch.on .toggle-knob {
    left: 24px;
}

/* ===== 实名认证：证件照上传 ===== */
.kyc-photo-grid {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.kyc-photo-item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.kyc-photo-item > label:first-child {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.kyc-upload {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 100px;
    border: 1.5px dashed #D1D5DB;
    border-radius: 10px;
    background: #FAFAFA;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s, background 0.2s;
}

.kyc-upload:active {
    border-color: #3B82F6;
    background: #F5F8FF;
}

.kyc-upload svg {
    width: 24px;
    height: 24px;
    color: #9CA3AF;
}

.kyc-upload-text {
    font-size: 11px;
    color: #9CA3AF;
    text-align: center;
    padding: 0 4px;
}

.kyc-upload img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.kyc-upload-tip {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 3px 0;
    text-align: center;
    font-size: 11px;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
}

.kyc-photo-del {
    margin-top: 6px;
    align-self: flex-start;
    padding: 0;
    border: none;
    background: none;
    color: #EA3943;
    font-size: 12px;
    cursor: pointer;
}

/* ===== 银行卡 / 数字货币地址绑定 ===== */
.bind-list {
    margin-bottom: 8px;
}

.bind-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-gray);
}

.bind-main {
    flex: 1 1 auto;
    min-width: 0;
}

.bind-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.bind-sub {
    margin-top: 3px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    color: var(--text-secondary);
    word-break: break-all;
    cursor: pointer;
}

.bind-meta {
    margin-top: 3px;
    font-size: 12px;
    color: var(--text-tertiary, #9CA3AF);
}

.bind-del {
    flex: none;
    padding: 5px 10px;
    border: 1px solid #FCA5A5;
    border-radius: 6px;
    background: #fff;
    color: #EA3943;
    font-size: 12px;
    cursor: pointer;
}

.bind-del:active {
    background: #FEF2F2;
}

.bind-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 22px 12px;
    margin-bottom: 12px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
}

.bind-form {
    padding-top: 4px;
    border-top: 1px solid var(--border);
}

.bind-tip {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-tertiary, #9CA3AF);
}

.bind-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.bind-chip {
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
}

.bind-chip.active {
    border-color: var(--primary);
    background: rgba(43, 108, 246, 0.08);
    color: var(--primary);
    font-weight: 600;
}

/* ===== 提现：收款账户选择 ===== */
.wd-acc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wd-acc {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.wd-acc.active {
    border-color: var(--primary);
    background: rgba(43, 108, 246, 0.06);
}

.wd-acc-main {
    flex: 1 1 auto;
    min-width: 0;
}

.wd-acc-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
}

.wd-acc-sub {
    margin-top: 3px;
    font-size: 12px;
    color: var(--text-tertiary, #9CA3AF);
    word-break: break-all;
}

.wd-acc-right {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wd-acc-tag {
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--bg-gray);
    font-size: 11px;
    color: var(--text-secondary);
}

.wd-acc-check {
    display: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
}

.wd-acc.active .wd-acc-check {
    display: block;
}

.wd-acc-empty {
    margin-top: 8px;
    padding: 12px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-gray);
    font-size: 13px;
    color: var(--text-secondary);
}

.wd-acc-link {
    margin-left: 6px;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
}

.wd-acc-hint {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-tertiary, #9CA3AF);
}

.wd-dest-box {
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-gray);
}

/* 手动填写银行卡：三个输入框纵向排列，留出间距 */
.wd-bankinfo .addr-input {
    margin-bottom: 10px;
}
.wd-bankinfo .addr-input:last-child {
    margin-bottom: 0;
}

.wd-dest-label {
    font-size: 12px;
    color: var(--text-tertiary, #9CA3AF);
}

.wd-dest-val {
    margin-top: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    color: var(--text-primary);
    word-break: break-all;
    cursor: pointer;
}

.wd-dest-hint {
    margin-top: 3px;
    font-size: 12px;
    color: var(--text-secondary);
    word-break: break-all;
}

/* 提现功能已关闭：提示联系在线客服 */
.wd-closed-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    margin-bottom: 16px;
    background: #fff8e6;
    border: 1px solid #ffe0a3;
    border-radius: 10px;
}

.wd-closed-icon {
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f5a623;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
}

.wd-closed-text {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-primary);
    word-break: break-word;
}

.wd-closed-cancel {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px 0;
    background: transparent;
    border: none;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}
