:root {
    --bg: #050b1a;
    --bg-elevated: #0a1428;
    --bg-card: rgba(20, 25, 35, 0.68);
    --bg-card-strong: rgba(25, 30, 45, 0.78);
    --border: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);
    --text: #ffffff;
    --text-secondary: #888888;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.3);
    --success: #10b981;
    --danger: #ef4444;
    --logo-size: 92px;
    --text-primary: #ffffff;
}

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

html, body {
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    position: relative;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}

#shader-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    display: block;
}

#glass-layer {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    mix-blend-mode: normal;
    display: none;
}

.app-container {
    position: relative;
    z-index: 3;
    max-width: 520px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 140px;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    pointer-events: none;
    z-index: 1;
}

.glass-card > * {
    position: relative;
    z-index: 2;
}

.glass-card.is-interactive {
    cursor: default;
}

.glass-card.is-interactive:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-strong);
    transform: translateY(-2px);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.header {
    padding: 18px 20px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: -6px;
}

.logo-img {
    width: var(--logo-size);
    height: var(--logo-size);
    object-fit: contain;
    display: block;
    margin-right: -34px;
    filter: drop-shadow(0 0 18px rgba(59, 130, 246, 0.55));
}

.logo-text {
    font-weight: 900;
    font-size: 34px;
    line-height: 1;
    letter-spacing: -0.8px;
    color: var(--text);
}

.content {
    flex: 1;
    padding: 0 16px;
}

.section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero {
    text-align: center;
    padding: 56px 16px 44px;
}

.hero-accent {
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 2px;
    margin: 0 auto 22px;
    box-shadow: 0 0 18px var(--accent-glow);
}

.hero-headline {
    font-size: clamp(30px, 8.5vw, 42px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1.5px;
    color: var(--text);
    margin: 0;
    background: linear-gradient(180deg, #ffffff 0%, #b8d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(59, 130, 246, 0.4);
    animation: heroIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-headline::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: 0.05em;
    box-shadow: 0 0 12px var(--accent-glow);
    animation: pulse 2.4s ease-in-out infinite;
}

@keyframes heroIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.85); }
}

.features-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 16px;
    padding: 0 4px;
    color: var(--text);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.feature-card {
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.feature-card-wide {
    grid-column: 1 / -1;
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.feature-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-secondary);
}

.feature-card:hover .feature-icon {
    border-color: rgba(255, 255, 255, 0.18);
}

.feature-text {
    font-weight: 700;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text);
}

.profile-header {
    text-align: center;
    padding: 28px 20px 8px;
}

.profile-title {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.5px;
    margin-bottom: 24px;
}

.profile-card {
    padding: 20px;
    margin-bottom: 16px;
}

.profile-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.profile-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-row:first-child {
    padding-top: 0;
}

.profile-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.profile-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-secondary);
}

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

.profile-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.profile-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    word-break: break-word;
}

.profile-value.accent { color: var(--accent); }
.profile-value.success { color: var(--success); }

.profile-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: var(--accent);
    white-space: nowrap;
}

.bottom-nav {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 400px;
    z-index: 100;
}

.nav-container {
    background: rgba(12, 18, 28, 0.65);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 6px;
    display: flex;
    gap: 4px;
    box-shadow:
        0 10px 32px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
}

.nav-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 10px;
    border-radius: 13px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12.5px;
    letter-spacing: 0.1px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.25s ease;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.nav-btn .nav-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: 5px;
    transition: transform 0.25s var(--ease), filter 0.25s var(--ease), opacity 0.25s var(--ease);
    opacity: 0.55;
    filter: grayscale(0.25) brightness(0.9) saturate(0.9);
    position: relative;
    z-index: 1;
}

.nav-btn.active .nav-icon {
    opacity: 1;
    transform: scale(1.04);
    filter: drop-shadow(0 0 5px rgba(96, 165, 250, 0.6)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    animation: iconGlow 3.5s ease-in-out infinite;
}

.nav-btn:hover:not(.active) .nav-icon {
    opacity: 0.92;
    filter: grayscale(0.05) brightness(1.05) saturate(1);
}

.nav-btn.active {
    color: white;
    background:
        radial-gradient(circle at 22% 28%, rgba(59, 130, 246, 0.55) 0%, transparent 52%),
        radial-gradient(circle at 78% 72%, rgba(99, 102, 241, 0.42) 0%, transparent 52%),
        radial-gradient(circle at 50% 105%, rgba(139, 92, 246, 0.32) 0%, transparent 60%),
        linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(99, 102, 241, 0.18));
    background-size: 220% 220%, 220% 220%, 220% 220%, 100% 100%;
    animation: shaderFlow 7s ease-in-out infinite;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        0 0 18px rgba(59, 130, 246, 0.28);
}

@keyframes shaderFlow {
    0%   { background-position:   0%   0%, 100% 100%,  50% 100%, 0% 0%; }
    33%  { background-position: 100%   0%,   0% 100%,  50%   0%, 0% 0%; }
    66%  { background-position: 100% 100%,   0%   0%,   0%  50%, 0% 0%; }
    100% { background-position:   0%   0%, 100% 100%,  50% 100%, 0% 0%; }
}

@keyframes iconGlow {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(96, 165, 250, 0.55)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3)); }
    50%      { filter: drop-shadow(0 0 7px rgba(96, 165, 250, 0.85)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3)); }
}

.nav-btn:hover:not(.active) {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.nav-glow {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 20px;
    background: radial-gradient(ellipse, rgba(59, 130, 246, 0.30), transparent 70%);
    filter: blur(14px);
    z-index: -1;
    pointer-events: none;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 2px; }

.buy-header {
    text-align: center;
    padding: 40px 20px 12px;
}

.buy-title {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.6px;
    margin-bottom: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #b8d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.buy-subtitle {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.buy-card {
    position: relative;
    padding: 22px 18px;
    margin: 16px 2px;
}

.buy-step-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--accent);
    margin-bottom: 4px;
}

.buy-step-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 18px;
    color: var(--text);
    letter-spacing: -0.3px;
}

.wallet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: stretch;
}

.wallet-option {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 12px 16px;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    font-family: inherit;
    color: var(--text);
    overflow: hidden;
    isolation: isolate;
}

.wallet-option::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 120% 80% at 50% 0%, rgba(59, 130, 246, 0.10), transparent 70%),
        radial-gradient(ellipse 100% 60% at 50% 100%, rgba(139, 92, 246, 0.08), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.wallet-option:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-3px);
}

.wallet-option:hover::before {
    opacity: 1;
}

.wallet-option:active {
    transform: translateY(-1px);
}

.wallet-icon-wrap {
    position: relative;
    width: 116px;
    height: 116px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    z-index: 1;
}

.wallet-icon-wrap.small {
    width: 52px;
    height: 52px;
    margin-bottom: 0;
}

.wallet-icon {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.4));
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.wallet-icon svg,
.wallet-icon > svg {
    width: 100%;
    height: 100%;
    display: block;
}

.wallet-icon > img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center 52%;
}

.wallet-option:hover .wallet-icon {
    transform: scale(1.08) translateY(-2px);
}

.wallet-glow {
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    filter: blur(18px);
    opacity: 0;
    z-index: 1;
    transition: opacity 0.3s ease, transform 0.4s ease;
    pointer-events: none;
}

.wallet-option[data-wallet="trust"] .wallet-glow {
    background: radial-gradient(circle, rgba(91, 156, 255, 0.7), transparent 65%);
}

.wallet-option[data-wallet="metamask"] .wallet-glow {
    background: radial-gradient(circle, rgba(255, 139, 71, 0.7), transparent 65%);
}

.wallet-option:hover .wallet-glow {
    opacity: 0.85;
    animation: walletGlow 2.6s ease-in-out infinite;
}

@keyframes walletGlow {
    0%, 100% { transform: scale(1);    opacity: 0.7; }
    50%      { transform: scale(1.15); opacity: 1;   }
}

.wallet-name {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--text);
    z-index: 1;
    letter-spacing: -0.1px;
}

.wallet-network {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-secondary);
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
}

.wallet-features {
    width: 100%;
    margin-top: 8px;
    padding: 0 2px;
    text-align: left;
    z-index: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wallet-feature {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
    padding: 5px 6px;
    border-radius: 6px;
    position: relative;
    transition: background 0.2s ease;
}

.wallet-feature-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.wallet-feature-icon svg {
    width: 9px;
    height: 9px;
    display: block;
}

.wallet-feature-text {
    flex: 1;
    min-width: 0;
    color: var(--text);
    font-weight: 600;
    letter-spacing: -0.1px;
}

.wallet-feature.positive .wallet-feature-icon {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.32);
    color: var(--success);
}

.buy-step-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.buy-step-header-text {
    flex: 1;
    min-width: 0;
}

.buy-step-header .buy-step-label {
    margin-bottom: 2px;
}

.buy-step-header .buy-step-title {
    margin-bottom: 0;
}

.buy-back {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.buy-back:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-color: var(--border-hover);
}

.buy-back svg {
    width: 18px;
    height: 18px;
}

.buy-wallet-selected {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 14px;
}

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

.buy-selected-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.1px;
}

.buy-selected-network {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.buy-address-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Consolas', monospace;
    font-size: 13px;
    font-weight: 500;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    word-break: break-all;
    letter-spacing: 0.2px;
}

.buy-address-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.buy-address-input:focus {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.04);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.buy-address-input.invalid {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-5px); }
    40%      { transform: translateX(5px); }
    60%      { transform: translateX(-3px); }
    80%      { transform: translateX(3px); }
}

.buy-error {
    color: var(--danger);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.55;
    margin-top: 12px;
    padding: 12px 14px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 12px;
    white-space: pre-line;
}

.buy-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent) 0%, #5b9aff 100%);
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.3px;
    cursor: pointer;
    margin-top: 14px;
    box-shadow: 0 6px 24px var(--accent-glow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.buy-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 32px var(--accent-glow);
}

.buy-submit:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.buy-saved-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success) 0%, #34d399 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    box-shadow: 0 0 28px rgba(16, 185, 129, 0.4);
    animation: savedPulse 2.4s ease-in-out infinite;
}

.buy-saved-icon svg {
    width: 30px;
    height: 30px;
    stroke: white;
}

@keyframes savedPulse {
    0%, 100% { box-shadow: 0 0 28px rgba(16, 185, 129, 0.4); }
    50%      { box-shadow: 0 0 44px rgba(16, 185, 129, 0.65); }
}

.buy-saved-title {
    text-align: center;
    font-size: 19px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 18px;
    letter-spacing: -0.3px;
}

.saved-wallet-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 10px;
}

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

.saved-wallet-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
}

.saved-wallet-network {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.saved-wallet-address {
    text-align: center;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
    font-size: 12px;
    color: var(--accent);
    font-weight: 700;
    padding: 10px 12px;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 10px;
    word-break: break-all;
    letter-spacing: 0.3px;
}

.buy-change {
    width: 100%;
    padding: 12px;
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.buy-change:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border-color: var(--border-hover);
}

.profile-wallet-card {
    padding: 18px;
    margin-bottom: 16px;
}

.profile-wallet-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

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

.profile-wallet-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-secondary);
    margin-bottom: 3px;
}

.profile-wallet-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.1px;
}

.profile-wallet-address {
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
    font-size: 12px;
    color: var(--accent);
    font-weight: 700;
    padding: 10px 12px;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 10px;
    word-break: break-all;
    cursor: pointer;
    transition: background 0.2s ease;
    letter-spacing: 0.3px;
}

.profile-wallet-address:hover {
    background: rgba(59, 130, 246, 0.12);
}

.profile-wallet-copied {
    color: var(--success);
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

.profile-wallet-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.profile-wallet-btn {
    flex: 1;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    letter-spacing: 0.1px;
}

.profile-wallet-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.profile-wallet-btn:active {
    transform: translateY(0);
}

.profile-wallet-btn.danger {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.28);
    background: rgba(239, 68, 68, 0.06);
}

.profile-wallet-btn.danger:hover {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.5);
}

.profile-wallet-btn.primary {
    width: 100%;
    background: linear-gradient(135deg, var(--accent) 0%, #5b9aff 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 16px var(--accent-glow);
    padding: 12px 14px;
}

.profile-wallet-btn.primary:hover {
    background: linear-gradient(135deg, var(--accent) 0%, #5b9aff 100%);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.profile-wallet-empty {
    text-align: center;
    padding: 4px 4px 2px;
}

.profile-wallet-empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    color: var(--text-secondary);
}

.profile-wallet-empty-icon svg {
    width: 24px;
    height: 24px;
}

.profile-wallet-empty-text {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 16px;
    letter-spacing: -0.1px;
}

.hidden {
    display: none !important;
}

@media (max-width: 380px) {
    :root { --logo-size: 76px; }
    .logo-text { font-size: 28px; }
    .buy-title { font-size: 24px; }
    .wallet-icon-wrap { width: 96px; height: 96px; }
}

.feature-icon[data-color="blue"]    { background: rgba(59, 130, 246, 0.14); border-color: rgba(59, 130, 246, 0.30); }
.feature-icon[data-color="blue"] svg { stroke: #60a5fa; }
.feature-icon[data-color="orange"]  { background: rgba(245, 158, 11, 0.14); border-color: rgba(245, 158, 11, 0.30); }
.feature-icon[data-color="orange"] svg { stroke: #fbbf24; }
.feature-icon[data-color="green"]   { background: rgba(16, 185, 129, 0.14); border-color: rgba(16, 185, 129, 0.30); }
.feature-icon[data-color="green"] svg { stroke: #34d399; }
.feature-icon[data-color="purple"]  { background: rgba(139, 92, 246, 0.14); border-color: rgba(139, 92, 246, 0.30); }
.feature-icon[data-color="purple"] svg { stroke: #a78bfa; }
.feature-icon[data-color="cyan"]    { background: rgba(6, 182, 212, 0.14); border-color: rgba(6, 182, 212, 0.30); }
.feature-icon[data-color="cyan"] svg { stroke: #22d3ee; }
.feature-icon[data-color="red"]     { background: rgba(239, 68, 68, 0.14); border-color: rgba(239, 68, 68, 0.30); }
.feature-icon[data-color="red"] svg { stroke: #f87171; }
.feature-icon[data-color="emerald"] { background: rgba(16, 185, 129, 0.14); border-color: rgba(16, 185, 129, 0.30); }
.feature-icon[data-color="emerald"] svg { stroke: #10b981; }
.feature-icon[data-color="indigo"]  { background: rgba(99, 102, 241, 0.14); border-color: rgba(99, 102, 241, 0.30); }
.feature-icon[data-color="indigo"] svg { stroke: #818cf8; }
.feature-icon[data-color="amber"]   { background: rgba(245, 158, 11, 0.14); border-color: rgba(245, 158, 11, 0.30); }
.feature-icon[data-color="amber"] svg { stroke: #fbbf24; }
.feature-icon[data-color="pink"]    { background: rgba(236, 72, 153, 0.14); border-color: rgba(236, 72, 153, 0.30); }
.feature-icon[data-color="pink"] svg { stroke: #f472b6; }
.feature-icon[data-color="rose"]    { background: rgba(244, 63, 94, 0.14); border-color: rgba(244, 63, 94, 0.30); }
.feature-icon[data-color="rose"] svg { stroke: #fb7185; }

.profile-icon[data-color="blue"]    { background: rgba(59, 130, 246, 0.14); border-color: rgba(59, 130, 246, 0.30); }
.profile-icon[data-color="blue"] svg { stroke: #60a5fa; }
.profile-icon[data-color="indigo"]  { background: rgba(99, 102, 241, 0.14); border-color: rgba(99, 102, 241, 0.30); }
.profile-icon[data-color="indigo"] svg { stroke: #818cf8; }
.profile-icon[data-color="emerald"] { background: rgba(16, 185, 129, 0.14); border-color: rgba(16, 185, 129, 0.30); }
.profile-icon[data-color="emerald"] svg { stroke: #10b981; }
.profile-icon[data-color="purple"]  { background: rgba(139, 92, 246, 0.14); border-color: rgba(139, 92, 246, 0.30); }
.profile-icon[data-color="purple"] svg { stroke: #a78bfa; }
.profile-icon[data-color="amber"]   { background: rgba(245, 158, 11, 0.14); border-color: rgba(245, 158, 11, 0.30); }
.profile-icon[data-color="amber"] svg { stroke: #fbbf24; }
.profile-icon[data-color="green"]   { background: rgba(16, 185, 129, 0.14); border-color: rgba(16, 185, 129, 0.30); }
.profile-icon[data-color="green"] svg { stroke: #34d399; }
.profile-icon[data-color="pink"]    { background: rgba(236, 72, 153, 0.14); border-color: rgba(236, 72, 153, 0.30); }
.profile-icon[data-color="pink"] svg { stroke: #f472b6; }
.profile-icon[data-color="cyan"]    { background: rgba(6, 182, 212, 0.14); border-color: rgba(6, 182, 212, 0.30); }
.profile-icon[data-color="cyan"] svg { stroke: #22d3ee; }
.profile-icon[data-color="rose"]    { background: rgba(244, 63, 94, 0.14); border-color: rgba(244, 63, 94, 0.30); }
.profile-icon[data-color="rose"] svg { stroke: #fb7185; }

.docs-link {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 20px;
    margin: 0 0 24px;
    text-align: left;
    cursor: pointer;
    color: var(--text-primary);
    font-family: inherit;
    text-decoration: none;
}

.docs-link-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.14);
    border: 1px solid rgba(59, 130, 246, 0.30);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.docs-link-icon svg {
    width: 22px;
    height: 22px;
    stroke: #60a5fa;
}

.docs-link-text {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.1px;
}

.docs-link-arrow {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: transform 0.25s ease, color 0.25s ease;
}

.docs-link-arrow svg {
    width: 100%;
    height: 100%;
}

.docs-link:hover .docs-link-arrow {
    transform: translateX(3px);
    color: #60a5fa;
}

.casino-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0 24px;
}

.casino-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0;
    background: linear-gradient(135deg, #ffffff 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.casino-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 48px 24px;
    margin: 16px 0 0;
    text-align: center;
}

.casino-icon {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.casino-icon svg {
    width: 42px;
    height: 42px;
    stroke: #fbbf24;
}

.casino-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.45;
    letter-spacing: -0.2px;
}

.casino-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.amount-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  padding: 14px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.amount-btn:hover {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.4);
}
.amount-btn.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.3);
}
.custom-amount-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.custom-amount-input {
  flex: 1;
  height: 44px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  padding: 0 14px;
  outline: none;
  -moz-appearance: textfield;
}
.custom-amount-input::-webkit-inner-spin-button,
.custom-amount-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.custom-amount-input:focus {
  border-color: #3b82f6;
}
.custom-amount-input::placeholder {
  color: rgba(255,255,255,0.35);
}
.custom-amount-ok {
  height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid rgba(59,130,246,0.4);
  background: rgba(59,130,246,0.15);
  color: #3b82f6;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.custom-amount-ok:hover {
  background: rgba(59,130,246,0.25);
}
.buy-saved-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.buy-saved-actions .buy-submit {
  flex: 1;
}

.pay-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 4px;
}
.pay-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 20px;
}
.pay-row {
  margin-bottom: 16px;
}
.pay-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.pay-value {
  font-size: 22px;
  font-weight: 800;
  color: #3b82f6;
}
.pay-usdt {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.pay-wallet-wrap,
.pay-memo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pay-wallet,
.pay-memo {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--text-primary);
  word-break: break-all;
  user-select: all;
}
.pay-copy-btn {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  color: #3b82f6;
  font-size: 12px;
  font-weight: 600;
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  font-family: inherit;
}
.pay-copy-btn:hover {
  background: rgba(59, 130, 246, 0.25);
}
.pay-warning {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #f87171;
  margin-bottom: 16px;
}

.waiting-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(59, 130, 246, 0.2);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.waiting-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 6px;
}
.waiting-text {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 20px;
}
.waiting-memo {
  max-width: 340px;
  margin: 0 auto;
}

.success-icon {
  text-align: center;
  margin-bottom: 16px;
}
.success-icon svg {
  width: 80px;
  height: 80px;
}
.success-title {
  font-size: 20px;
  font-weight: 800;
  color: #10b981;
  text-align: center;
  margin-bottom: 6px;
}
.success-text {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 20px;
}

.buy-cancel {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 12px;
  color: #f87171;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}
.buy-cancel:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}
.profile-ref-link {
  font-size: 12px !important;
  word-break: break-all;
  cursor: pointer;
  color: #3b82f6 !important;
}

.profile-row-avatar {
  justify-content: center;
  padding-bottom: 8px;
  border-bottom: none;
}
.profile-avatar {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}
.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-avatar-initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: var(--text-secondary);
  background: rgba(59, 130, 246, 0.15);
}
