:root {
    --bg: #edf4ff;
    --card: rgba(255, 255, 255, .84);
    --soft: rgba(244, 248, 255, .94);
    --text: #07101d;
    --muted: #6b7a90;
    --line: rgba(26, 52, 95, .10);

    --primary: #006BFF;
    --primary-rgb: 0, 107, 255;
    --primary-dark: #03122D;
    --primary-soft: #2FA8FF;

    --accent: #00D4FF;
    --accent-rgb: 0, 212, 255;
    --accent-soft: #66EAFF;

    --danger: #ff5577;
    --success: #22c55e;

    --shadow: 0 20px 50px rgba(0, 45, 125, .10);
    --glow: 0 0 22px rgba(0, 107, 255, .20), 0 0 46px rgba(0, 212, 255, .12);
}

[data-theme="dark"] {
    --bg: #020611;
    --card: rgba(8, 15, 30, .86);
    --soft: rgba(10, 22, 44, .78);
    --text: #ffffff;
    --muted: #92a6c9;
    --line: rgba(255, 255, 255, .08);

    --primary: #009CFF;
    --primary-rgb: 0, 156, 255;
    --primary-dark: #010915;
    --primary-soft: #33B9FF;

    --accent: #00E5FF;
    --accent-rgb: 0, 229, 255;
    --accent-soft: #74F0FF;

    --danger: #ff6686;
    --success: #4ade80;

    --shadow: 0 25px 60px rgba(0, 0, 0, .45);
    --glow: 0 0 24px rgba(0, 156, 255, .28), 0 0 55px rgba(0, 229, 255, .18);
}

/* Base */
* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(var(--primary-rgb), .18), transparent 31%),
        radial-gradient(circle at bottom right, rgba(var(--accent-rgb), .14), transparent 35%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

[data-theme="dark"] body {
    background:
        radial-gradient(circle at top left, rgba(var(--primary-rgb), .20), transparent 31%),
        radial-gradient(circle at bottom right, rgba(var(--accent-rgb), .16), transparent 36%),
        linear-gradient(180deg, #020611 0%, #071324 100%);
}

a {
    color: inherit;
}

button,
input,
textarea,
select {
    font-family: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
}

/* Layout */
.wallet-app {
    position: relative;
    max-width: 520px;
    min-height: 100vh;
    margin: auto;
    padding: 8px 16px 98px;
}

.wallet-screen {
    min-height: 100vh;
    padding: 24px;
}

/* Shared Glass Cards */
.wallet-card,
.asset-card,
.wallet-panel,
.wallet-token-card,
.wallet-balance-card,
.browser-search-card,
.swap-card,
.receive-modal,
.wallet-modal {
    color: var(--text);
    background: linear-gradient(180deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .66));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

[data-theme="dark"] .wallet-card,
[data-theme="dark"] .asset-card,
[data-theme="dark"] .wallet-panel,
[data-theme="dark"] .wallet-token-card,
[data-theme="dark"] .wallet-balance-card,
[data-theme="dark"] .browser-search-card,
[data-theme="dark"] .swap-card,
[data-theme="dark"] .receive-modal,
[data-theme="dark"] .wallet-modal {
    background: linear-gradient(180deg, rgba(10, 22, 44, .92), rgba(5, 12, 26, .84));
    border-color: rgba(255, 255, 255, .08);
}

.wallet-card {
    width: 100%;
    max-width: 430px;
    padding: 26px;
    border-radius: 30px;
}

.asset-card,
.wallet-panel,
.wallet-token-card,
.wallet-balance-card {
    padding: 16px;
    border-radius: 22px;
}

.browser-search-card,
.swap-card {
    padding: 16px;
    border-radius: 24px;
}

.swap-card {
    border-radius: 26px;
}

.wallet-card h1,
.wallet-card h2,
.wallet-card h3,
.wallet-card h4,
.wallet-card h5 {
    color: var(--text);
}

.wallet-card .text-muted {
    color: var(--muted) !important;
}

/* Header */
.wallet-static-header {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 18px 16px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wallet-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.wallet-static-header span,
.wallet-topbar span,
.back-link {
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
}

.wallet-static-header h4,
.wallet-topbar h4 {
    margin: 2px 0 0;
    color: var(--text);
    font-weight: 900;
    letter-spacing: -.4px;
}

.top-actions,
.section-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-actions button,
.theme-btn,
.icon-btn,
.action-btn {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);
    color: var(--text);
    box-shadow: var(--shadow);
}

.action-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: linear-gradient(180deg, rgba(var(--primary-rgb), .12), rgba(var(--accent-rgb), .05));
    border-color: rgba(var(--accent-rgb), .16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 8px 20px rgba(0, 0, 0, .12);
}

.action-btn i {
    font-size: 15px;
    opacity: .9;
}

.action-btn:hover {
    color: var(--accent);
    border-color: rgba(var(--accent-rgb), .32);
    box-shadow: var(--glow);
}

.action-btn:active {
    transform: scale(.95);
}

.action-btn:focus {
    outline: none;
}

.action-btn:focus-visible {
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), .25);
}

/* Logo */
.wallet-logo {
    width: 82px;
    height: 82px;
    margin: auto;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 28px;
    color: #fff;
    font-size: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: var(--glow);
}

.wallet-logo img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

/* Hero */
.hero-wallet,
.browser-hero,
.swap-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 18% 8%, rgba(var(--accent-rgb), .28), transparent 30%),
        radial-gradient(circle at 85% 85%, rgba(var(--primary-rgb), .20), transparent 32%),
        linear-gradient(135deg, #010915 0%, #05204a 52%, #021124 100%);
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: var(--shadow), var(--glow);
}

.hero-wallet {
    padding: 22px;
    border-radius: 30px;
}

.browser-hero,
.swap-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    border-radius: 28px;
}

.swap-hero {
    justify-content: space-between;
}

.hero-wallet::before,
.browser-hero::before,
.swap-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, .14) 45%, transparent 70%);
    transform: translateX(-120%);
    animation: versusShine 5.6s infinite;
}

.hero-wallet>*,
.browser-hero>*,
.swap-hero>* {
    position: relative;
    z-index: 1;
}

@keyframes versusShine {

    0%,
    58% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(120%);
    }
}

.hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.hero-wallet small,
.browser-hero p,
.swap-hero p {
    color: rgba(255, 255, 255, .72);
}

.hero-wallet h1 {
    margin: 4px 0 18px;
    color: #fff;
    font-size: 40px;
    font-weight: 900;
    letter-spacing: -1px;
}

.browser-hero h4,
.swap-hero h4 {
    margin: 0 0 4px;
    color: #fff;
    font-weight: 900;
}

.browser-hero p,
.swap-hero p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.hero-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, .66);
}

.hero-balance {
    color: #fff;
    font-size: 42px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -1.5px;
}

.hero-sub-balance {
    margin-top: 7px;
    color: rgba(255, 255, 255, .62);
    font-size: 13px;
    font-weight: 600;
}

.hero-glow {
    display: none;
}

.network-pill {
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .08);
}

.browser-hero-icon,
.swap-hero-icon {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    font-size: 24px;
}

/* Shared Icon Boxes */
.quick-actions span,
.browser-hero-icon,
.swap-hero-icon,
.coin-badge,
.token-icon,
.mini-dapp-icon,
.detail-coin-badge {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), .28), rgba(var(--accent-rgb), .20));
    border: 1px solid rgba(var(--accent-rgb), .24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 0 20px rgba(var(--accent-rgb), .14);
}

/* Address */
.wallet-address-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    word-break: break-all;
    color: rgba(255, 255, 255, .94);
    font-size: 13px;
    font-weight: 600;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .06);
}

.wallet-address-label {
    margin-bottom: 6px;
    color: rgba(255, 255, 255, .55);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.wallet-address-text {
    color: rgba(255, 255, 255, .95);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .2px;
}

.copy-address-btn {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 0;
    border-radius: 15px;
    color: #fff;
    background: rgba(255, 255, 255, .10);
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 14px 0;
}

.quick-actions button,
.quick-actions a,
.mini-dapp-card,
.dapp-card,
.quick-dapp-list button {
    position: relative;
    overflow: hidden;
    color: var(--text);
    background: linear-gradient(180deg, rgba(255, 255, 255, .90), rgba(245, 249, 255, .76));
    border: 1px solid rgba(var(--primary-rgb), .14);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .07), inset 0 1px 0 rgba(255, 255, 255, .72);
}

[data-theme="dark"] .quick-actions button,
[data-theme="dark"] .quick-actions a,
[data-theme="dark"] .mini-dapp-card,
[data-theme="dark"] .dapp-card,
[data-theme="dark"] .quick-dapp-list button {
    background: linear-gradient(180deg, rgba(12, 28, 56, .84), rgba(6, 15, 31, .76));
    border-color: rgba(var(--accent-rgb), .14);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.quick-actions button,
.quick-actions a {
    min-height: 72px;
    border-radius: 22px;
    text-decoration: none;
    display: grid;
    place-items: center;
    align-content: center;
    font-size: 13px;
    font-weight: 700;
}

.quick-actions span {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    margin-bottom: 6px;
    border-radius: 14px;
    color: #fff;
}

.mini-dapp-card::after,
.quick-actions button::after,
.quick-actions a::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 1px;
    opacity: .58;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.mini-dapp-card:hover,
.quick-actions button:hover,
.quick-actions a:hover,
.asset-click-card:hover,
.dapp-card:hover,
.quick-dapp-list button:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--accent-rgb), .42);
    box-shadow: var(--shadow), var(--glow);
}

/* Section Head */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-head h5,
.section-head h6 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
}

.default-pill,
.dapp-info small,
.section-head span {
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    background: rgba(var(--accent-rgb), .10);
    border: 1px solid rgba(var(--accent-rgb), .18);
}

[data-theme="dark"] .default-pill,
[data-theme="dark"] .dapp-info small,
[data-theme="dark"] .section-head span {
    color: var(--accent);
}

/* Asset / Token Rows */
.asset-click-card {
    display: block;
    margin-bottom: 12px;
    text-decoration: none;
}

.asset-click-card:active,
.asset-clickable:active {
    transform: scale(.985);
}

.asset-clickable {
    cursor: pointer;
}

.asset-row,
.token-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 0 !important;
}

.asset-left,
.token-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.asset-right,
.token-right {
    text-align: right;
    flex: 0 0 auto;
}

.coin-badge,
.token-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.coin-badge img,
.token-icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.asset-left strong,
.asset-right strong,
.token-left strong,
.token-right strong {
    display: block;
    margin-bottom: 2px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.1;
}

.asset-left small,
.asset-right small,
.token-left small,
.token-left span,
.token-right span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.2;
}

/* Token Detail */
.token-balance-box {
    padding: 18px 14px;
    text-align: center;
    border-radius: 22px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
}

.token-balance-box small,
.token-balance-box span {
    color: rgba(255, 255, 255, .68);
}

.token-balance-box h1 {
    margin: 8px 0 0;
    color: #fff;
    font-size: 38px;
    font-weight: 900;
    letter-spacing: -1px;
}

.token-balance-box span {
    display: block;
    margin-top: 2px;
    font-size: 13px;
}

/* Forms */
.browser-search-box,
.swap-box,
.swap-info,
.history-filter,
.segmented,
.wallet-input,
.receive-address,
.receive-address-input,
.browser-url,
.browser-nav-btn {
    background: var(--soft);
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

.wallet-input {
    min-height: 50px;
    border-radius: 18px;
    color: var(--text);
}

.wallet-input::placeholder,
.swap-input-row input::placeholder {
    color: var(--muted);
}

.wallet-input:focus,
.browser-search-box:focus-within,
.receive-address-input:focus {
    color: var(--text);
    background: var(--soft);
    border-color: rgba(var(--accent-rgb), .56);
    box-shadow: 0 0 0 .2rem rgba(var(--primary-rgb), .13), 0 0 22px rgba(var(--accent-rgb), .12);
}

.form-label {
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

/* Buttons */
.btn-main,
.btn-wallet-primary,
.browser-search-box button,
.add-mini-btn,
.mini-btn,
.history-filter button.active,
.segmented button.active,
.swap-switch-btn,
.btn-warning {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: transparent;
    box-shadow: 0 10px 26px rgba(var(--primary-rgb), .26);
}

.btn-main,
.btn-wallet-primary {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 999px;
    font-weight: 900;
}

.btn-main:hover,
.btn-wallet-primary:hover,
.browser-search-box button:hover,
.add-mini-btn:hover,
.mini-btn:hover,
.btn-warning:hover,
.browser-nav-btn:hover {
    color: #fff;
    filter: brightness(1.08);
    box-shadow: 0 12px 30px rgba(var(--accent-rgb), .26);
}

.add-mini-btn,
.delete-mini-btn,
.mini-btn {
    border: 0;
    border-radius: 999px;
    padding: 8px 13px;
    font-size: 12px;
    font-weight: 900;
}

.delete-mini-btn,
.delete-token-btn,
.alert-danger {
    color: var(--danger);
    background: rgba(255, 85, 119, .12);
    border: 1px solid rgba(255, 85, 119, .18);
}

.delete-token-btn {
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 800;
}

.success-box {
    margin-bottom: 14px;
    padding: 12px 14px;
    color: var(--success);
    font-weight: 800;
    border-radius: 18px;
    background: rgba(34, 197, 94, .12);
    border: 1px solid rgba(34, 197, 94, .18);
}

/* History / Segmented */
.history-filter,
.segmented {
    display: grid;
    gap: 8px;
    padding: 6px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.history-filter {
    grid-template-columns: repeat(3, 1fr);
}

.segmented {
    grid-template-columns: 1fr 1fr;
}

.history-filter button,
.segmented button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-weight: 800;
}

.history-filter button {
    border-radius: 14px;
    padding: 10px 8px;
    font-size: 13px;
}

.segmented button {
    border-radius: 16px;
    padding: 11px;
}

.history-filter button.active,
.segmented button.active {
    color: #fff;
}

.history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.history-row:last-child {
    border-bottom: 0;
}

.empty-history {
    min-height: 180px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 6px;
    text-align: center;
    color: var(--muted);
}

.empty-history i {
    margin-bottom: 6px;
    color: var(--primary);
    font-size: 34px;
}

.empty-history strong {
    color: var(--text);
}

.empty-history small {
    color: var(--muted);
}

/* Bottom Nav */
.wallet-bottom-nav,
.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 14px;
    z-index: 80;
    width: calc(100% - 28px);
    max-width: 492px;
    height: 72px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: hidden;
    transform: translateX(-50%);
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .88), rgba(245, 249, 255, .72));
    border: 1px solid var(--line);
    box-shadow: 0 18px 45px rgba(0, 45, 125, .14);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

[data-theme="dark"] .wallet-bottom-nav,
[data-theme="dark"] .bottom-nav {
    background: linear-gradient(180deg, rgba(10, 22, 44, .90), rgba(5, 12, 26, .84));
    border-color: rgba(255, 255, 255, .08);
    box-shadow: 0 22px 55px rgba(0, 0, 0, .46);
}

.wallet-bottom-nav a,
.wallet-bottom-nav button,
.bottom-nav a,
.bottom-nav button {
    border: 0;
    background: transparent;
    color: var(--muted);
    text-decoration: none;
    display: grid;
    place-items: center;
    align-content: center;
    font-size: 12px;
    font-weight: 800;
}

.wallet-bottom-nav span,
.bottom-nav span {
    font-size: 22px;
    line-height: 1;
}

.wallet-bottom-nav .active,
.bottom-nav .active {
    color: var(--accent);
    text-shadow: 0 0 14px rgba(var(--accent-rgb), .70);
}

/* Wallet Modal */
.wallet-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .65);
}

.wallet-modal {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    border-radius: 28px;
}

.wallet-bs-modal {
    padding: 0 !important;
}

.wallet-bs-modal .modal-dialog {
    width: calc(100% - 32px);
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.receive-modal {
    width: 100%;
    padding: 0;
    overflow: hidden;
    border-radius: 28px;
}

.receive-modal .modal-header {
    padding: 20px 20px 8px;
    align-items: flex-start;
}

.receive-modal .modal-body {
    padding: 14px 20px 22px;
}

.wallet-close {
    filter: none;
}

[data-theme="dark"] .wallet-close {
    filter: invert(1);
}

.qr-box {
    width: 236px;
    height: 236px;
    margin: 0 auto;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 26px;
    background: #fff;
}

.qr-box img {
    width: 216px;
    height: 216px;
    display: block;
    object-fit: contain;
}

.receive-address,
.receive-address-input {
    width: 100%;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    word-break: break-all;
    text-align: center;
    border-radius: 18px;
}

.receive-address {
    padding: 12px 14px;
}

.receive-address-input {
    padding: 13px 14px;
    outline: none;
}

/* Warning */
.receive-warning,
.browser-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(251, 191, 36, .12), rgba(245, 158, 11, .06));
    border: 1px solid rgba(251, 191, 36, .22);
}

.browser-warning {
    border-radius: 22px;
}

.receive-warning-icon,
.browser-warning-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #fbbf24;
    background: rgba(255, 193, 7, .16);
}

.receive-warning-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 14px;
}

.receive-warning strong,
.browser-warning strong {
    display: block;
    margin-bottom: 3px;
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.receive-warning small,
.browser-warning small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

/* DApp Browser */
.browser-search-box {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 6px 6px 15px;
    border-radius: 20px;
}

.browser-search-box i {
    color: var(--muted);
}

.browser-search-box input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.browser-search-box input::placeholder {
    color: var(--muted);
    font-weight: 500;
}

.browser-search-box button {
    height: 42px;
    border: 0;
    border-radius: 16px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 900;
}

.browser-note {
    display: flex;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.browser-note i {
    margin-top: 2px;
    color: var(--primary);
}

.dapp-grid,
.quick-dapp-list {
    display: grid;
    gap: 10px;
}

.dapp-card {
    width: 100%;
    padding: 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.dapp-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: var(--card);
    border: 1px solid var(--line);
    font-size: 22px;
}

.dapp-info {
    min-width: 0;
    flex: 1;
}

.dapp-info strong {
    display: block;
    margin-bottom: 2px;
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
}

.dapp-info small {
    display: inline-block;
    margin-bottom: 4px;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 900;
}

.dapp-info span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.dapp-card>i,
.quick-dapp-list i {
    color: var(--muted);
    font-size: 13px;
}

.quick-dapp-list button {
    width: 100%;
    min-height: 52px;
    padding: 0 12px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.quick-dapp-list span {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--card);
}

.quick-dapp-list strong {
    flex: 1;
    text-align: left;
    font-size: 13px;
    font-weight: 900;
}

.wallet-browser-view {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.wallet-browser-top {
    height: 68px;
    flex: 0 0 68px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 20px rgba(0, 0, 0, .04);
}

.browser-nav-btn {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 16px;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
}

.browser-url {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding: 0 14px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.browser-url small {
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1;
}

.browser-url strong {
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wallet-browser-frame-wrap {
    flex: 1;
    min-height: 0;
    position: relative;
    background: #fff;
}

.wallet-browser-frame {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #fff;
}

.browser-loading {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .92);
}

[data-theme="dark"] .browser-loading {
    background: rgba(8, 18, 36, .92);
}

.browser-loading-spinner {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 3px solid rgba(17, 67, 154, .15);
    border-top-color: var(--primary);
    animation: walletBrowserSpin .8s linear infinite;
}

@keyframes walletBrowserSpin {
    to {
        transform: rotate(360deg);
    }
}

.browser-hero.compact,
.browser-search-card.compact,
.asset-card.compact,
.browser-warning.compact {
    padding: 14px;
}

.browser-hero.compact h4 {
    margin-bottom: 3px;
    font-size: 16px;
}

.browser-hero.compact p,
.browser-warning.compact small {
    margin: 0;
    font-size: 12px;
}

.browser-hero.compact .browser-hero-icon,
.browser-hero-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    font-size: 18px;
}

/* Mini DApp */
.mini-dapp-card {
    width: 100%;
    min-height: 104px;
    padding: 12px 8px;
    border-radius: 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.mini-dapp-card strong {
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}

.mini-dapp-card small {
    color: var(--muted);
    font-size: 10px;
}

.mini-dapp-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 20px;
}

.games-card {
    opacity: .85;
}

/* Swap Page */
.swap-box {
    padding: 14px;
    border-radius: 22px;
}

.swap-box-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.swap-box-head span {
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.swap-box-head small {
    color: var(--muted);
    font-size: 11px;
}

.swap-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.swap-input-row input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 28px;
    font-weight: 900;
}

.swap-switch-wrap {
    height: 22px;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
}

.swap-switch-btn {
    width: 44px;
    height: 44px;
    margin-top: -11px;
    border: 4px solid var(--card);
    border-radius: 999px;
    display: grid;
    place-items: center;
}

.swap-info {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding: 14px;
    border-radius: 20px;
}

.swap-info div {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.swap-info span,
.swap-info strong {
    font-size: 12px;
}

.swap-info span {
    color: var(--muted);
}

.swap-info strong {
    color: var(--text);
}

/* Swap Token Picker */
.swap-token-picker {
    min-width: 128px;
    padding: 8px 10px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    cursor: pointer;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.swap-token-left {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.swap-token-logo {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(var(--accent-rgb), .10);
    border: 1px solid rgba(var(--accent-rgb), .16);
}

.swap-token-left strong {
    display: block;
    color: var(--text);
    font-size: 13px;
    line-height: 1.1;
}

.swap-token-left small {
    display: block;
    max-width: 70px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Token Picker Modal */
.token-modal-overlay {
    position: fixed;
    inset: 0;

    z-index: 10000;

    background: rgba(0, 0, 0, .65);
    backdrop-filter: blur(12px);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 16px;
}

.token-modal-sheet {
    width: 100%;
    max-width: 420px;

    max-height: 75vh;

    border-radius: 28px;

    padding: 18px;

    overflow: hidden;

    background: var(--card);

    border: 1px solid var(--line);

    box-shadow:
        0 20px 80px rgba(0, 0, 0, .35);

    animation: tokenModalShow .18s ease;
}

@keyframes tokenModalShow {
    from {
        opacity: 0;
        transform: scale(.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes tokenSheetUp {
    from {
        transform: translateY(40px);
        opacity: .4;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.token-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.token-modal-head h5 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.token-modal-head button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.token-search-wrap {
    height: 46px;
    padding: 0 14px;
    margin-bottom: 12px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
}

.token-search-wrap i {
    color: rgba(255, 255, 255, .55);
    font-size: 14px;
}

.token-search-wrap input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    color: #fff;
    font-size: 14px;
}

.token-list {
    overflow-y: auto;
    max-height: 50vh;
}

.token-row {
    width: 100%;
    padding: 11px 4px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    background: transparent;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.token-row-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.token-row-left img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, .08);
}

.token-row-left div {
    min-width: 0;
    text-align: left;
}

.token-row-left strong {
    display: block;
    color: #fff;
    font-size: 14px;
    line-height: 1.2;
}

.token-row-left small {
    display: block;
    max-width: 180px;
    color: rgba(255, 255, 255, .55);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.token-row>span {
    color: rgba(255, 255, 255, .65);
    font-size: 12px;
    white-space: nowrap;
}

/* Add Token */
.token-loading-dot {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
}

.token-loading-dot span {
    width: 10px;
    height: 10px;
    display: block;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 12px rgba(34, 197, 94, .9);
    animation: tokenPulse 1s infinite ease-in-out;
}

@keyframes tokenPulse {

    0%,
    100% {
        opacity: .35;
        transform: scale(.85);
    }

    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

/* SweetAlert */
.swal2-container {
    z-index: 10050 !important;
}

.wallet-swal {
    width: 320px !important;
    padding: 18px !important;
    border-radius: 24px !important;
    color: var(--text) !important;
    background: var(--card) !important;
    border: 1px solid var(--line) !important;
    box-shadow: var(--shadow), var(--glow) !important;
    backdrop-filter: blur(20px) !important;
}

.wallet-swal .swal2-title {
    margin-top: 4px !important;
    color: var(--text) !important;
    font-size: 20px !important;
    font-weight: 800 !important;
}

.wallet-swal .swal2-html-container {
    margin-top: 8px !important;
    color: var(--muted) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.wallet-swal .swal2-icon {
    margin: 10px auto 0 !important;
    transform: scale(.82);
}

.wallet-swal .swal2-confirm {
    padding: 10px 22px !important;
    border-radius: 999px !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
    box-shadow: 0 10px 24px rgba(var(--primary-rgb), .28) !important;
}

/* Bootstrap Override */
.btn-warning {
    border-color: transparent;
}

.btn-outline-light {
    color: var(--text);
    border-color: var(--line);
}

.btn-outline-light:hover {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

/* Transitions */
button,
a,
.mini-dapp-card,
.asset-click-card,
.asset-clickable,
.quick-actions button,
.quick-actions a,
.dapp-card,
.quick-dapp-list button {
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, filter .18s ease;
}

/* Responsive */
@media (max-width: 390px) {
    .wallet-app {
        padding-left: 14px;
        padding-right: 14px;
    }

    .wallet-screen {
        padding: 18px;
    }

    .wallet-card {
        padding: 22px;
        border-radius: 26px;
    }

    .hero-wallet h1,
    .hero-balance {
        font-size: 34px;
    }

    .quick-actions {
        gap: 8px;
    }

    .quick-actions button,
    .quick-actions a {
        min-height: 68px;
        border-radius: 20px;
        font-size: 12px;
    }

    .wallet-bottom-nav,
    .bottom-nav {
        height: 70px;
        border-radius: 24px;
    }

    .wallet-modal,
    .receive-modal {
        border-radius: 24px;
    }

    .wallet-modal {
        padding: 18px;
    }

    .wallet-bs-modal .modal-dialog {
        width: calc(100% - 24px);
        max-width: 360px;
    }

    .qr-box {
        width: 220px;
        height: 220px;
    }

    .qr-box img {
        width: 200px;
        height: 200px;
    }

    .wallet-browser-top {
        height: 64px;
        flex-basis: 64px;
        padding: 0 10px;
    }

    .browser-nav-btn {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        border-radius: 14px;
    }

    .browser-url {
        height: 40px;
        padding: 0 12px;
    }

    .browser-hero {
        padding: 18px;
        border-radius: 24px;
    }

    .browser-search-box {
        padding-left: 12px;
    }

    .browser-search-box button {
        padding: 0 13px;
    }

    .swap-token-picker {
        min-width: 116px;
        padding: 7px 9px;
    }

    .swap-token-logo {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .swap-token-left small {
        max-width: 58px;
    }
}

/* Motion Accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}