/* ==========================================================================
   BetaDEX — Global Stylesheet
   ========================================================================== */

:root {
    --bg:         #050810;
    --bg-2:       #0a0e1a;
    --surface:    #10152a;
    --surface-2:  #171d33;
    --border:     rgba(255, 255, 255, 0.06);
    --border-2:   rgba(255, 255, 255, 0.12);
    --text:       #eef1f8;
    --text-2:     #a2acc4;
    --text-3:     #6b7594;
    --brand:      #7C5CFF;
    --brand-2:    #00E1B5;
    --accent:     #00E1B5;
    --danger:     #FF4D6D;
    --success:    #00E1B5;
    --warning:    #F3BA2F;
    --gradient:   linear-gradient(135deg, #7C5CFF 0%, #00E1B5 100%);
    --radius:     14px;
    --radius-lg:  20px;
    --radius-sm:  8px;
    --shadow-md:  0 8px 24px rgba(0, 0, 0, 0.32);
    --shadow-lg:  0 20px 60px rgba(0, 0, 0, 0.5);
    --font:       'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --mono:       'JetBrains Mono', ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    background-image:
        radial-gradient(1200px 600px at 15% -10%, rgba(124, 92, 255, 0.15), transparent 60%),
        radial-gradient(1000px 500px at 90% 10%, rgba(0, 225, 181, 0.08), transparent 60%);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; }
.mono { font-family: var(--mono); }

/* ============================================================
   COIN LOGO IMAGES (inside icon containers)
============================================================ */
.asset-icon, .token-icon, .mini-icon, .hi-icon {
    overflow: hidden;
    background-clip: padding-box;
}
.asset-icon.has-logo,
.token-icon.has-logo,
.mini-icon.has-logo,
.hi-icon.has-logo {
    padding: 0;
    color: transparent;
}
.asset-icon img,
.token-icon img,
.mini-icon img,
.hi-icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* ============================================================
   HEADER
============================================================ */
.app-header {
    position: sticky; top: 0; z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(5, 8, 16, 0.72);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 1400px; margin: 0 auto;
    padding: 14px 24px;
    display: flex; align-items: center; gap: 32px;
}
.logo {
    display: flex; align-items: center; gap: 10px;
    font-weight: 800; font-size: 20px;
    letter-spacing: -0.5px;
}
.logo-img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.logo-fallback { display: inline-flex; }
.logo-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.main-nav {
    display: flex; gap: 4px; margin-left: 20px;
}
.nav-link {
    padding: 8px 14px;
    color: var(--text-2);
    font-weight: 500;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.15s;
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav-link.active {
    color: var(--text);
    background: rgba(124, 92, 255, 0.1);
}
.header-right {
    margin-left: auto;
    display: flex; align-items: center; gap: 12px;
}
.btn-connect {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px;
    background: var(--gradient);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    border-radius: 12px;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 20px rgba(124, 92, 255, 0.35);
}
.btn-connect:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(124, 92, 255, 0.5); }
.address-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border-2);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s;
}
.address-badge:hover { background: var(--surface); }
.addr-indicator {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}
.mobile-nav-toggle { display: none; padding: 8px; color: var(--text); }

/* ============================================================
   MAIN LAYOUT
============================================================ */
.app-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px 80px;
    min-height: calc(100vh - 200px);
}
.section { display: none; animation: fadeIn 0.3s ease; }
.section.active { display: block; }
.section-inner { animation: fadeIn 0.3s ease; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   HERO / BANNER
============================================================ */
.hero-banner {
    display: grid;
    grid-template-columns: 1.1fr 480px;
    gap: 60px;
    align-items: center;
    padding: 40px 0 60px;
}
.hero-content { max-width: 620px; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px;
    background: rgba(0, 225, 181, 0.08);
    border: 1px solid rgba(0, 225, 181, 0.24);
    border-radius: 100px;
    font-size: 13px;
    color: var(--accent);
    margin-bottom: 20px;
    font-weight: 500;
}
.badge-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent);
    animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.4); }
}
.hero-title {
    font-size: 60px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -1.5px;
    margin: 0 0 20px;
}
.grad-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-sub {
    font-size: 18px;
    color: var(--text-2);
    line-height: 1.6;
    margin: 0 0 36px;
    max-width: 520px;
}
.hero-stats {
    display: flex; gap: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.hero-stat {}
.hs-value {
    font-size: 26px; font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hs-label { font-size: 13px; color: var(--text-3); margin-top: 4px; }

/* ============================================================
   SWAP CARD
============================================================ */
.swap-wrap { display: flex; justify-content: flex-end; }
.swap-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 100%;
    max-width: 460px;
    box-shadow: var(--shadow-lg);
    position: relative;
}
.swap-card::before {
    content: "";
    position: absolute; inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.4), transparent 40%, transparent 60%, rgba(0, 225, 181, 0.4));
    -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
    mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.swap-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
}
.swap-header h2 { margin: 0; font-size: 20px; font-weight: 700; }
.swap-actions { display: flex; gap: 8px; }
.icon-btn {
    width: 34px; height: 34px;
    border-radius: 10px;
    color: var(--text-2);
    display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.swap-box { position: relative; display: flex; flex-direction: column; gap: 4px; }
.swap-side {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    transition: border-color 0.15s;
}
.swap-side:focus-within { border-color: rgba(124, 92, 255, 0.4); }
.swap-side-top {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px; color: var(--text-3);
    margin-bottom: 8px;
}
.swap-side-bal { display: inline-flex; align-items: center; gap: 8px; }
.max-btn {
    padding: 3px 8px;
    background: rgba(124, 92, 255, 0.14);
    color: var(--brand);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.max-btn:hover { background: rgba(124, 92, 255, 0.24); }
.swap-side-row {
    display: flex; align-items: center; gap: 12px;
}
.swap-side-row input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 26px;
    font-weight: 600;
    width: 100%;
    padding: 4px 0;
    -moz-appearance: textfield;
}
.swap-side-row input::-webkit-outer-spin-button,
.swap-side-row input::-webkit-inner-spin-button {
    -webkit-appearance: none; margin: 0;
}
.token-select-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border-2);
    border-radius: 999px;
    font-size: 14px; font-weight: 600;
    transition: background 0.15s;
    white-space: nowrap;
}
.token-select-btn:hover { background: var(--surface); }
.mini-icon {
    width: 22px; height: 22px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800;
    font-size: 11px;
}
.swap-side-fiat {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-3);
}
.swap-flip {
    align-self: center;
    width: 40px; height: 40px;
    background: var(--surface-2);
    border: 4px solid var(--surface);
    border-radius: 12px;
    color: var(--brand);
    margin: -12px 0;
    z-index: 2;
    display: inline-flex; align-items: center; justify-content: center;
    transition: transform 0.3s;
}
.swap-flip:hover { transform: rotate(180deg); background: var(--surface); }

/* ============================================================
   USDT PRICE BOX (below swap panel)
============================================================ */
.swap-usdt-box {
    margin: 16px 4px 12px;
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.06), rgba(0, 225, 181, 0.06));
    border: 1px solid rgba(124, 92, 255, 0.18);
    border-radius: var(--radius);
    padding: 12px 14px;
}
.usdt-price-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
}
.usdt-price-left {
    display: flex; align-items: center; gap: 10px;
    min-width: 0;
}
.usdt-price-left .mini-icon {
    width: 26px; height: 26px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 12px;
    flex-shrink: 0;
}
.usdt-price-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
}
.usdt-price-right {
    display: inline-flex; align-items: baseline; gap: 6px;
    text-align: right;
}
.usdt-price-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    font-family: var(--mono);
}
.usdt-price-sub {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-3);
    letter-spacing: 0.5px;
    padding: 2px 6px;
    background: rgba(38, 161, 123, 0.14);
    color: #26A17B;
    border-radius: 4px;
}
.usdt-price-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

.swap-rate-info {
    margin: 12px 4px 20px;
    display: flex; flex-direction: column; gap: 6px;
}
.rate-row {
    display: flex; justify-content: space-between;
    font-size: 13px;
    color: var(--text-2);
}
.rate-row span:first-child { color: var(--text-3); }
.primary-btn {
    width: 100%;
    padding: 14px 18px;
    background: var(--gradient);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    border-radius: 12px;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 20px rgba(124, 92, 255, 0.35);
}
.primary-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(124, 92, 255, 0.5); }
.primary-btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.secondary-btn {
    width: 100%;
    padding: 12px 18px;
    background: var(--surface-2);
    border: 1px solid var(--border-2);
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    border-radius: 12px;
    transition: background 0.15s;
}
.secondary-btn:hover { background: var(--surface); }
.swap-execute-btn { margin-top: 4px; }

/* ============================================================
   FEATURES
============================================================ */
.features-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 60px;
}
.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: transform 0.2s, border-color 0.2s;
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--border-2); }
.feature-icon {
    width: 48px; height: 48px;
    background: rgba(124, 92, 255, 0.1);
    border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
}
.feature-card h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.feature-card p { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }

/* ============================================================
   MODALS
============================================================ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(3, 6, 15, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    animation: modalIn 0.2s ease;
}
@keyframes modalIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-overlay.closing { animation: modalOut 0.2s ease forwards; }
@keyframes modalOut {
    to { opacity: 0; }
}
.modal-card {
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 480px;
    position: relative;
    animation: cardIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-card h2 { margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.modal-card h3 { margin: 0 0 14px; font-size: 18px; font-weight: 700; }
.modal-sub { color: var(--text-2); font-size: 14px; margin: 0 0 20px; }
.modal-close {
    position: absolute; top: 14px; right: 14px;
    width: 32px; height: 32px;
    border-radius: 8px;
    color: var(--text-2);
    font-size: 24px;
    line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }

/* Feedback modal */
.feedback-card { text-align: center; max-width: 500px; }
.feedback-header { margin-bottom: 24px; }
.feedback-icon {
    width: 64px; height: 64px;
    margin: 0 auto 16px;
    background: rgba(124, 92, 255, 0.1);
    border-radius: 16px;
    display: inline-flex; align-items: center; justify-content: center;
}
.feedback-sub { color: var(--text-2); font-size: 14px; margin: 8px 0 0; }
.feedback-body { text-align: left; margin-bottom: 20px; }
.feedback-textarea {
    width: 100%;
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    padding: 14px 16px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s;
    min-height: 130px;
}
.feedback-textarea:focus { border-color: var(--brand); }
.feedback-meta {
    display: flex; justify-content: space-between;
    font-size: 12px;
    color: var(--text-3);
    margin-top: 8px;
}
.feedback-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 10px;
    min-height: 18px;
}
.feedback-submit-btn {
    width: 100%;
    padding: 14px 18px;
    background: var(--gradient);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    transition: opacity 0.15s;
    box-shadow: 0 4px 20px rgba(124, 92, 255, 0.35);
}
.feedback-submit-btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn-spinner { display: inline-flex; }
.btn-spinner svg { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.feedback-privacy {
    text-align: center;
    font-size: 12px;
    color: var(--text-3);
    margin: 16px 0 0;
}

/* Token picker */
.token-picker-card { max-width: 440px; padding: 24px; }
.token-search {
    width: 100%;
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--text);
    outline: none;
    margin-bottom: 16px;
    font-size: 14px;
}
.token-search:focus { border-color: var(--brand); }
.token-list {
    display: flex; flex-direction: column;
    max-height: 50vh;
    overflow-y: auto;
    margin: 0 -8px;
}
.token-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.1s;
}
.token-row:hover { background: var(--surface-2); }
.token-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}
.token-info { flex: 1; min-width: 0; }
.token-name { font-weight: 600; font-size: 14px; }
.token-sub { font-size: 12px; color: var(--text-3); }
.token-right { text-align: right; }
.token-bal { font-size: 14px; font-weight: 500; }
.token-price { font-size: 12px; color: var(--text-3); }

/* Processing modal */
.processing-overlay .modal-card { display: none; }
.processing-card {
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    text-align: center;
    max-width: 380px;
    animation: cardIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-lg);
}
.processing-card h3 { margin: 16px 0 6px; font-size: 20px; }
.processing-details { color: var(--text-2); font-size: 14px; margin: 0 0 24px; }
.processing-spinner { display: flex; justify-content: center; }
.processing-steps {
    display: flex; flex-direction: column; gap: 10px;
    text-align: left;
    padding: 16px;
    background: var(--bg-2);
    border-radius: 12px;
}
.pstep {
    display: flex; align-items: center; gap: 10px;
    font-size: 13px;
    color: var(--text-3);
    transition: color 0.3s;
}
.pstep .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--text-3);
    transition: background 0.3s;
}
.pstep.active { color: var(--text); }
.pstep.active .dot { background: var(--success); box-shadow: 0 0 8px var(--success); }

/* Success modal */
.success-card { text-align: center; max-width: 520px; }
.success-anim { display: flex; justify-content: center; margin-bottom: 12px; }
.ring-anim { animation: drawRing 0.8s ease-out forwards; }
.check-anim { animation: drawCheck 0.5s ease-out 0.5s forwards; }
@keyframes drawRing { to { stroke-dashoffset: 0; } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.success-sub { color: var(--text-2); margin: 0 0 20px; font-size: 14px; }
.success-summary {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin: 0 0 20px;
}
.success-line {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.sl-side { display: flex; align-items: center; gap: 10px; }
.sl-amt { font-weight: 700; font-size: 15px; color: var(--danger); }
.sl-pos { color: var(--success); }
.sl-sym { font-size: 11px; color: var(--text-3); }
.success-qr-wrap {
    display: flex; gap: 24px;
    margin: 20px 0;
    align-items: center;
    text-align: left;
}
.success-qr {
    background: #fff;
    padding: 10px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center; justify-content: center;
    flex-shrink: 0;
}
.success-qr img, .success-qr canvas { display: block; }
.success-tx-details { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.td-row {
    display: flex; justify-content: space-between; gap: 12px;
    font-size: 13px;
}
.td-row span:first-child { color: var(--text-3); }
.td-row span:last-child { color: var(--text); font-weight: 500; word-break: break-all; text-align: right; }
.td-status { color: var(--success) !important; }
.td-pending { color: var(--warning) !important; }
.success-actions { display: flex; gap: 10px; margin-top: 12px; }

/* Error modal */
.error-card { text-align: center; max-width: 420px; }
.error-icon {
    display: flex; justify-content: center;
    margin-bottom: 16px;
}
.error-detail { color: var(--text-2); font-size: 14px; margin: 8px 0 16px; }
.error-code {
    background: var(--bg-2);
    border-radius: 8px;
    padding: 10px;
    margin: 0 0 20px;
    font-size: 12px;
    color: var(--danger);
}

/* Deposit modal */
.deposit-card { max-width: 500px; }
.deposit-search { margin-bottom: 14px; }
.deposit-search input {
    width: 100%; padding: 10px 14px;
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    color: var(--text);
    border-radius: 10px;
    outline: none;
    font-size: 14px;
}
.deposit-search input:focus { border-color: var(--brand); }
.deposit-list {
    display: flex; flex-direction: column;
    max-height: 60vh; overflow-y: auto;
    margin: 0 -8px;
}
.deposit-detail { animation: fadeIn 0.25s ease; }
.deposit-warning {
    background: rgba(243, 186, 47, 0.08);
    border: 1px solid rgba(243, 186, 47, 0.3);
    color: var(--warning);
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 20px;
}
.deposit-qr {
    display: flex; justify-content: center;
    padding: 12px;
    background: #fff;
    border-radius: var(--radius);
    margin: 0 auto 20px;
    width: fit-content;
}
.deposit-address {
    background: var(--bg-2);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    text-align: center;
}
.da-label { color: var(--text-3); font-size: 12px; margin-bottom: 6px; }
.da-value {
    font-size: 13px;
    word-break: break-all;
    padding: 10px;
    background: var(--surface);
    border-radius: 8px;
    margin-bottom: 12px;
    color: var(--text);
}
.deposit-info {
    background: var(--bg-2);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 16px;
}
.di-row {
    display: flex; justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
}
.di-row span:first-child { color: var(--text-3); }

/* Withdraw modal */
.withdraw-card { max-width: 480px; }
.field-label {
    display: flex; justify-content: space-between;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
    margin: 14px 0 6px;
}
.field-label-right { color: var(--text-3); display: inline-flex; gap: 8px; align-items: center; }
.wd-asset {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.15s;
}
.wd-asset:hover { border-color: var(--brand); }
.text-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}
.text-input:focus { border-color: var(--brand); }
.wd-amount-row { position: relative; }
.wd-amount-row input { padding-right: 60px; }
.wd-amount-sym {
    position: absolute; right: 14px; top: 50%;
    transform: translateY(-50%);
    font-weight: 600; color: var(--text-2);
    font-size: 14px;
}
.wd-summary {
    background: var(--bg-2);
    border-radius: var(--radius);
    padding: 14px;
    margin: 20px 0 16px;
}
.wd-row {
    display: flex; justify-content: space-between;
    padding: 5px 0; font-size: 13px;
}
.wd-row span:first-child { color: var(--text-3); }
.wd-progress {
    margin: 16px 0 20px;
    text-align: center;
}
.wd-progress-bar {
    height: 6px;
    background: var(--bg-2);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
}
.wd-progress-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 999px;
    animation: progressFill 15s linear forwards;
}
@keyframes progressFill {
    from { width: 0%; }
    to { width: 100%; }
}
.wd-progress-label { color: var(--text-3); font-size: 12px; }

/* ============================================================
   PORTFOLIO
============================================================ */
.portfolio-empty {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    max-width: 480px;
    margin: 40px auto;
}
.empty-icon { display: flex; justify-content: center; margin-bottom: 20px; }
.portfolio-empty h3 { margin: 0 0 10px; font-size: 22px; }
.portfolio-empty p { color: var(--text-2); margin: 0 0 24px; }
.portfolio-empty .primary-btn { max-width: 260px; margin: 0 auto; }

.portfolio-summary {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex; justify-content: space-between; gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.ps-label { color: var(--text-3); font-size: 13px; margin-bottom: 6px; }
.ps-value {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1px;
}
.ps-change { font-size: 14px; font-weight: 500; margin-top: 6px; }
.ps-change.positive { color: var(--success); }
.ps-change.negative { color: var(--danger); }
.ps-right { display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }
.ps-address {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-2);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
}
.ps-address-label { color: var(--text-3); }
.ps-address-value { font-weight: 500; }
.copy-btn {
    padding: 4px;
    color: var(--text-3);
    border-radius: 4px;
    display: inline-flex;
    transition: color 0.15s;
}
.copy-btn:hover { color: var(--text); }
.ps-actions { display: flex; gap: 8px; }
.ps-action-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border-2);
    color: var(--text);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.15s;
}
.ps-action-btn:hover { background: var(--surface); }
.ps-action-btn:first-child { background: var(--gradient); border-color: transparent; box-shadow: 0 4px 20px rgba(124, 92, 255, 0.3); }

.portfolio-tabs {
    display: flex; gap: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
    width: fit-content;
}
.ptab {
    padding: 8px 16px;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.15s;
}
.ptab.active { background: var(--surface-2); color: var(--text); }
.ptab:hover:not(.active) { color: var(--text); }
.portfolio-body {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.holdings-table {
    width: 100%;
    border-collapse: collapse;
}
.holdings-table th, .holdings-table td {
    padding: 14px 20px;
    text-align: left;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}
.holdings-table th {
    color: var(--text-3);
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-2);
}
.holdings-table tr:last-child td { border-bottom: none; }
.holdings-table tr:hover td { background: rgba(255, 255, 255, 0.02); }
.asset-cell { display: flex; align-items: center; gap: 12px; }
.asset-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}
.asset-name { font-weight: 600; font-size: 14px; }
.asset-sub { font-size: 12px; color: var(--text-3); }
.row-btn {
    padding: 6px 14px;
    background: rgba(124, 92, 255, 0.12);
    color: var(--brand);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.15s;
}
.row-btn:hover { background: rgba(124, 92, 255, 0.24); }
.positive { color: var(--success); }
.negative { color: var(--danger); }

/* History */
.history-list { display: flex; flex-direction: column; }
.history-item {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.history-item:last-child { border-bottom: none; }
.hi-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(124, 92, 255, 0.1);
    color: var(--brand);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
}
.hi-main { flex: 1; min-width: 0; }
.hi-title { font-weight: 600; font-size: 14px; }
.hi-sub { font-size: 12px; color: var(--text-3); word-break: break-all; }
.hi-right { text-align: right; }
.hi-amt { font-size: 13px; font-weight: 600; }
.hi-time { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.hi-status {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(0, 225, 181, 0.1);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
}
.hi-status.pending { background: rgba(243, 186, 47, 0.1); color: var(--warning); }
.empty-list {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-3);
    font-size: 14px;
}

/* ============================================================
   MARKETS
============================================================ */
.markets-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}
.markets-header h2 { margin: 0 0 4px; font-size: 28px; }
.section-sub { color: var(--text-2); margin: 0; font-size: 14px; }
.markets-search-wrap {
    display: flex; align-items: center; gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--text-3);
    min-width: 280px;
}
.markets-search {
    background: none; border: none; outline: none;
    color: var(--text);
    font-size: 14px;
    flex: 1;
}
.markets-table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}
.markets-table { width: 100%; border-collapse: collapse; }
.markets-table th, .markets-table td {
    padding: 14px 20px;
    text-align: left;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}
.markets-table th {
    color: var(--text-3);
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-2);
}
.markets-table th.sortable { cursor: pointer; user-select: none; }
.markets-table th.sortable:hover { color: var(--text); }
.markets-table tr:hover td { background: rgba(255, 255, 255, 0.02); }
.markets-table tr:last-child td { border-bottom: none; }

/* ============================================================
   DOCS
============================================================ */
.docs-inner { max-width: 1000px; margin: 0 auto; }
.docs-inner h2 { font-size: 32px; margin: 0 0 8px; }
.docs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
}
.docs-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color 0.15s;
}
.docs-card:hover { border-color: var(--border-2); }
.docs-card h3 { margin: 0 0 8px; font-size: 16px; }
.docs-card p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }

/* ============================================================
   WALLET DROPDOWN
============================================================ */
.wallet-dropdown {
    position: fixed;
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    min-width: 260px;
    z-index: 200;
    animation: cardIn 0.15s ease;
}
.wd-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    width: 100%;
    text-align: left;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text);
    transition: background 0.1s;
}
.wd-item:hover { background: var(--surface-2); }
.wd-address { flex-direction: column; align-items: flex-start; }
.wd-label { font-size: 11px; color: var(--text-3); margin-bottom: 2px; }
.wd-addr { font-size: 11px; word-break: break-all; }
.wd-disconnect { color: var(--danger); }
.wd-disconnect:hover { background: rgba(255, 77, 109, 0.08); }

/* ============================================================
   PWA BANNER
============================================================ */
.pwa-banner {
    position: fixed; bottom: 20px; left: 20px; right: 20px;
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 1500;
    transform: translateY(120%);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
    max-width: 460px;
    margin: 0 auto;
}
.pwa-banner.visible { transform: translateY(0); opacity: 1; }
.pwa-banner-inner {
    display: flex; align-items: center; gap: 14px;
}
.pwa-banner-logo { width: 48px; height: 48px; border-radius: 12px; }
.pwa-banner-text { flex: 1; min-width: 0; }
.pwa-banner-title { font-weight: 700; font-size: 14px; }
.pwa-banner-sub { color: var(--text-2); font-size: 12px; margin-top: 2px; }
.pwa-banner-actions { display: flex; gap: 6px; flex-shrink: 0; }
.pwa-banner-btn {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s;
}
.pwa-banner-btn.install {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 2px 8px rgba(124, 92, 255, 0.3);
}
.pwa-banner-btn.dismiss {
    background: var(--surface-2);
    color: var(--text-2);
}
.pwa-banner-btn:hover { opacity: 0.9; }

/* ============================================================
   TOASTS
============================================================ */
.toast {
    position: fixed; top: 84px; left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 2000;
}
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   FOOTER
============================================================ */
.app-footer {
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    padding: 40px 24px 20px;
    margin-top: 60px;
}
.footer-inner {
    max-width: 1400px; margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 3fr;
    gap: 40px;
}
.footer-brand p { color: var(--text-2); max-width: 300px; margin: 10px 0 0; font-size: 14px; }
.footer-logo {
    display: flex; align-items: center; gap: 10px;
    font-weight: 800; font-size: 18px;
}
.footer-logo img { width: 32px; height: 32px; border-radius: 8px; }
.footer-cols {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.footer-col h4 {
    color: var(--text);
    font-size: 14px; margin: 0 0 12px;
    font-weight: 600;
}
.footer-col a {
    display: block;
    color: var(--text-2);
    font-size: 14px;
    margin-bottom: 8px;
    transition: color 0.1s;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
    max-width: 1400px; margin: 30px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex; justify-content: space-between;
    color: var(--text-3);
    font-size: 12px;
    flex-wrap: wrap; gap: 10px;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1024px) {
    .hero-banner { grid-template-columns: 1fr; gap: 40px; padding-top: 20px; }
    .hero-title { font-size: 44px; }
    .swap-wrap { justify-content: center; }
    .features-section { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr; }
    .docs-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .header-inner { padding: 12px 16px; gap: 12px; }
    .main-nav {
        position: fixed;
        top: 62px; left: 0; right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        gap: 0;
        padding: 12px;
        transform: translateY(-120%);
        transition: transform 0.25s;
        margin-left: 0;
    }
    .main-nav.open { transform: translateY(0); }
    .nav-link { padding: 12px; width: 100%; }
    .mobile-nav-toggle { display: inline-flex; }
    .app-main { padding: 20px 16px 60px; }
    .hero-title { font-size: 34px; }
    .hero-sub { font-size: 16px; }
    .hero-stats { flex-wrap: wrap; gap: 20px; }
    .features-section { grid-template-columns: 1fr; }
    .docs-grid { grid-template-columns: 1fr; }
    .modal-card { padding: 24px 20px; }
    .hide-mobile { display: none; }
    .portfolio-summary { flex-direction: column; }
    .ps-right { align-items: flex-start; }
    .success-qr-wrap { flex-direction: column; align-items: center; text-align: center; }
    .btn-connect span, .btn-connect { font-size: 13px; padding: 8px 12px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-cols { grid-template-columns: repeat(2, 1fr); }
    .holdings-table th, .holdings-table td { padding: 12px 14px; font-size: 13px; }
    .markets-table th, .markets-table td { padding: 12px 14px; font-size: 13px; }
    .swap-side-row input { font-size: 22px; }
    .ps-value { font-size: 32px; }
    .pwa-banner { left: 10px; right: 10px; bottom: 10px; padding: 12px; }
    .pwa-banner-inner { gap: 10px; }
    .pwa-banner-logo { width: 40px; height: 40px; }
    .pwa-banner-actions { flex-direction: column; }
    .pwa-banner-btn { padding: 6px 10px; font-size: 12px; }
    .success-actions { flex-direction: column; }
}
@media (max-width: 480px) {
    .hero-title { font-size: 28px; }
    .logo-text { display: none; }
    .btn-connect { padding: 8px 12px; }
    .modal-card { padding: 20px 16px; max-height: 95vh; }
    .hero-stats { gap: 14px; }
    .hs-value { font-size: 20px; }
    .swap-card { padding: 16px; }
}
