/* ──────────────────────────────
   Global layout
   ────────────────────────────── */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #1e1e28;
    color: #e5e7eb;
}

.hidden {
    display: none !important;
}

/* ──────────────────────────────
   Telegram Auth Gate
   ────────────────────────────── */
.telegram-auth-gate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1e1e28;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.auth-gate-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
    max-width: 360px;
    width: 100%;
}

.auth-gate-logo {
    width: clamp(100px, 30vmin, 180px);
    height: clamp(100px, 30vmin, 180px);
    margin-bottom: 16px;
    animation: sharkFloat 2.2s ease-in-out infinite;
}

.auth-gate-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700;
    color: #e5e7eb;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.auth-gate-subtitle {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: clamp(0.9rem, 2vw, 1rem);
    font-weight: 400;
    color: #9ca3af;
    margin: 0 0 32px 0;
    line-height: 1.4;
}

.auth-gate-btn {
    padding: 14px 40px;
    background: #0088cc;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 136, 204, 0.3);
    letter-spacing: 0.02em;
    width: 100%;
    max-width: 300px;
}

.auth-gate-btn:hover {
    background: #0077b5;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
}

.auth-gate-btn:active {
    transform: translateY(0);
}

.auth-gate-footer {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: #6b7280;
    margin: 24px 0 0 0;
}

/* ──────────────────────────────
   Loading Screen
   ────────────────────────────── */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1e1e28;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.6s ease-out;
}

.logo-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.8s ease-out;
}

/* Shark SVG — responsive sizing, float animation */
.shark-logo {
    width: clamp(240px, 55vmin, 500px);
    height: clamp(240px, 55vmin, 500px);
    animation: sharkFloat 2.2s ease-in-out infinite;
}

/* Smooth up-down float while loading — relative to element size */
@keyframes sharkFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4%); }
}

/* Clean fade-out on exit — screen goes transparent */
.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* During fade-out: stop float on SVG, zoom the container + fade both out simultaneously */
.loading-screen.fade-out .shark-logo {
    animation: none;
}

.loading-screen.fade-out .logo-container {
    transform: scale(1.25);
    opacity: 0;
}

/* ──────────────────────────────
   Main Software Content
   ────────────────────────────── */
.main-content {
    width: 100vw;
    height: 100vh;
    background: #1e1e28;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease-in;
}

.main-content.visible {
    opacity: 1;
}

.software-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(16px, 4vh, 40px);
    width: 90%;
    max-width: 600px;
    padding: clamp(12px, 2vw, 24px);
    flex: 1;
    justify-content: flex-start;
    padding-top: clamp(20px, 4vh, 40px);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    width: 100%;
    gap: 10px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    padding: clamp(8px, 1.5vh, 14px) clamp(10px, 2vw, 18px);
    background: #2a2a36;
    border: 1px solid #3f3f4a;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.15);
}

.stat-label {
    font-size: clamp(0.65rem, 1.4vw, 0.78rem);
    font-weight: 500;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.stat-value {
    font-size: clamp(0.8rem, 1.8vw, 1rem);
    font-weight: 700;
    color: #e5e7eb;
    line-height: 1;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: color 0.3s ease;
    min-height: 1em;
}

/* Stat cards scanning glow — amber/orange pulse */
.stat-card.phase-amber {
    animation: statAmberPulse 0.7s ease-in-out infinite alternate;
    border-color: #f59e0b !important;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.3), 0 0 28px rgba(245, 158, 11, 0.12) !important;
}

@keyframes statAmberPulse {
    0% { border-color: #f59e0b; box-shadow: 0 0 10px rgba(245, 158, 11, 0.25), 0 0 20px rgba(245, 158, 11, 0.08); }
    100% { border-color: #f97316; box-shadow: 0 0 18px rgba(249, 115, 22, 0.4), 0 0 32px rgba(249, 115, 22, 0.18); }
}

/* Scrolling dots inside stat-value during scan — animated by JS */
.stat-value.scanning-dots {
    color: #f59e0b;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.08em;
}

.bluish-box {
    position: relative;
    width: 100%;
    height: clamp(180px, 40vh, 450px);
    background: #252535;
    border: 2px solid #0066FF;
    border-radius: clamp(8px, 1.5vw, 16px);
    box-shadow: 0 clamp(4px, 1vh, 10px) clamp(12px, 3vh, 30px) rgba(0, 102, 255, 0.15);
    overflow: hidden;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
    display: flex;
    flex-direction: column;
}

.bluish-box.scanning-active {
    background: #1e2a3a;
    border-color: #00aaff;
    box-shadow: 0 0 clamp(8px, 2vh, 18px) rgba(0, 170, 255, 0.35),
                0 0 clamp(20px, 5vh, 40px) rgba(0, 136, 255, 0.2),
                0 0 clamp(35px, 8vh, 60px) rgba(0, 102, 255, 0.1),
                inset 0 0 clamp(8px, 2vh, 18px) rgba(0, 170, 255, 0.06);
    animation: neonPulse 1.8s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% {
        border-color: #00aaff;
        box-shadow: 0 0 clamp(8px, 2vh, 18px) rgba(0, 170, 255, 0.35),
                    0 0 clamp(20px, 5vh, 40px) rgba(0, 136, 255, 0.2),
                    0 0 clamp(35px, 8vh, 60px) rgba(0, 102, 255, 0.1),
                    inset 0 0 clamp(8px, 2vh, 18px) rgba(0, 170, 255, 0.06);
    }
    50% {
        border-color: #33ccff;
        box-shadow: 0 0 clamp(12px, 3vh, 24px) rgba(51, 204, 255, 0.5),
                    0 0 clamp(28px, 6vh, 50px) rgba(0, 170, 255, 0.3),
                    0 0 clamp(45px, 10vh, 75px) rgba(0, 102, 255, 0.15),
                    inset 0 0 clamp(12px, 3vh, 24px) rgba(51, 204, 255, 0.1);
    }
}

.scanner-header {
    position: sticky;
    top: 0;
    z-index: 5;
    width: 100%;
    padding: 4px 10px;
    background: #1e2a3a;
    font-family: 'JetBrains Mono', "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", "Courier New", monospace;
    font-size: 11px;
    font-weight: 400;
    color: #d1d5db;
    line-height: 1.6;
    text-align: left;
    box-sizing: border-box;
}

.scanner-description {
    margin: 0;
    padding: clamp(8px, 1.5vh, 14px);
    padding-bottom: clamp(4px, 0.8vh, 8px);
    font-family: 'JetBrains Mono', "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", "Courier New", monospace;
    font-size: 11px;
    font-weight: 400;
    color: #d1d5db;
    line-height: 1.6;
    text-align: left;
    flex: 1;
    min-height: 0;
    box-sizing: border-box;
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scanner-description::-webkit-scrollbar {
    display: none;
}

.terminal-prompt {
    color: #22c55e;
    font-weight: 700;
    margin-right: 2px;
}

.terminal-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: #ffffff;
    margin-left: 2px;
    vertical-align: text-bottom;
}

@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ──────────────────────────────
   Avatar Selector
   ────────────────────────────── */
.avatar-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(4px, 1vh, 8px);
    padding: clamp(8px, 1.5vh, 14px) clamp(24px, 5vw, 40px);
    background: #2a2a36;
    border: 1px solid #3f3f4a;
    border-radius: clamp(20px, 3.5vh, 32px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.avatar-label {
    margin: 0;
    font-size: clamp(0.6rem, 1.3vw, 0.75rem);
    font-weight: 500;
    color: #d1d5db;
    text-align: center;
    line-height: 1;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.avatar-circles-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 3vw, 32px);
}

.avatar-circle {
    width: clamp(36px, 10vw, 56px);
    height: clamp(36px, 10vw, 56px);
    border-radius: 50%;
    border: 2px solid #4a4a56;
    background-color: #2a2a36;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    position: relative;
    flex-shrink: 0;
}

.avatar-circle:hover {
    border-color: #86efac;
    background-color: #f0fdf4;
    transform: scale(1.08);
}

.avatar-circle.selected {
    border-color: #16a34a;
    background-color: #f0fdf4;
    box-shadow: 0 0 0 clamp(2px, 0.4vw, 4px) rgba(22, 163, 74, 0.30);
}

/* Amber phase glow on the avatar selector container during win trigger */
.avatar-selector.phase-amber {
    border-color: #f59e0b !important;
    background: #4a3510 !important;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.30), 0 0 40px rgba(245, 158, 11, 0.12) !important;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}

/* Green phase glow on the avatar selector container when win is displayed */
.avatar-selector.phase-green {
    border-color: #22c55e !important;
    background: #0d2e0d !important;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.35), 0 0 40px rgba(34, 197, 94, 0.15) !important;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}

/* Winning network circle: amber glow */
.avatar-circle.winner-amber {
    border-color: #f59e0b !important;
    background-color: #fefce8 !important;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.50), 0 0 24px rgba(245, 158, 11, 0.25) !important;
    transition: all 0.4s ease;
}

/* Winning network circle: green glow */
.avatar-circle.winner-green {
    border-color: #22c55e !important;
    background-color: #f0fdf4 !important;
    box-shadow: 0 0 16px rgba(34, 197, 94, 0.55), 0 0 28px rgba(34, 197, 94, 0.28) !important;
    transition: all 0.4s ease;
}

/* Non-winning circles: dimmed during amber/green phases */
.avatar-circle.dimmed {
    border-color: #4a4a56 !important;
    background-color: #2a2a36 !important;
    box-shadow: none !important;
    opacity: 0.45;
    transition: all 0.4s ease;
}

/* Locked state during extraction */
.avatar-selector.locked .avatar-circle {
    pointer-events: none;
    cursor: default;
}

.avatar-selector.locked .avatar-circle:not(.selected) {
    border-color: #d1d5db;
    box-shadow: none;
}

.avatar-selector.locked .avatar-circle:not(.selected)::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
}

.avatar-selector.locked .avatar-circle.selected {
    /* Keep the network image fully visible, just make it unclickable */
    opacity: 1;
    cursor: default;
}

/* Network images inside avatar circles */
.avatar-circle[data-avatar="0"] {
    background-image: url('../contents/tron.png');
    background-size: cover;
    background-position: center;
}
.avatar-circle[data-avatar="0"].selected {
    background-image: url('../contents/tron.png');
    background-size: cover;
    background-position: center;
}

.avatar-circle[data-avatar="1"] {
    background-image: url('../contents/ethereum.png');
    background-size: cover;
    background-position: center;
}
.avatar-circle[data-avatar="1"].selected {
    background-image: url('../contents/ethereum.png');
    background-size: cover;
    background-position: center;
}

.avatar-circle[data-avatar="2"] {
    background-image: url('../contents/solana.jpg');
    background-size: cover;
    background-position: center;
}
.avatar-circle[data-avatar="2"].selected {
    background-image: url('../contents/solana.jpg');
    background-size: cover;
    background-position: center;
}

.btn-actions {
    width: 100%;
    display: flex;
    justify-content: center;
}

.btn-connect {
    padding: clamp(14px, 2.5vh, 24px) clamp(28px, 6vw, 56px);
    background: #0066FF;
    color: #fff;
    border: none;
    border-radius: clamp(8px, 1.2vw, 14px);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 clamp(2px, 0.5vh, 4px) clamp(6px, 1.5vh, 12px) rgba(0, 102, 255, 0.3);
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.btn-connect:hover {
    background: #0052cc;
    transform: translateY(-2px);
    box-shadow: 0 clamp(3px, 0.8vh, 6px) clamp(8px, 2vh, 16px) rgba(0, 102, 255, 0.4);
}

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

.btn-connect:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
    pointer-events: none;
}

.btn-connect.btn-pending {
    background: #94a3b8;
    color: #e2e8f0;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
    pointer-events: none;
}

/* Scan pair buttons (Scanning… + Cancel Operation) */
.btn-scan-pair {
    display: flex;
    gap: clamp(8px, 2vw, 16px);
    align-items: center;
    justify-content: center;
}

.btn-scanning {
    flex: 0 1 auto;
    min-width: clamp(100px, 16vw, 150px);
    padding: clamp(10px, 1.8vh, 18px) clamp(8px, 2vw, 18px);
    background: #94a3b8;
    color: #e2e8f0;
    border: 2px solid transparent;
    border-radius: clamp(6px, 1vw, 10px);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: clamp(0.85rem, 2vw, 1.3rem);
    font-weight: 600;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
    white-space: nowrap;
    box-sizing: border-box;
    text-align: center;
    letter-spacing: 0.02em;
}

.btn-cancel {
    flex: 0 1 auto;
    min-width: clamp(140px, 22vw, 200px);
    padding: clamp(14px, 2.2vh, 22px) clamp(16px, 3vw, 28px);
    background: transparent;
    color: #dc2626;
    border: 2px solid #dc2626;
    border-radius: clamp(8px, 1.2vw, 12px);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.15);
    white-space: nowrap;
    box-sizing: border-box;
    text-align: center;
    letter-spacing: 0.02em;
}

.btn-cancel:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
    transform: translateY(-2px);
}

.btn-cancel:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

/* Confirm Cancel — two-step pair */
.btn-confirm-pair {
    display: flex;
    gap: clamp(8px, 2vw, 16px);
    align-items: center;
    justify-content: center;
}

.btn-go-back {
    flex: 0 1 auto;
    min-width: clamp(90px, 14vw, 130px);
    padding: clamp(10px, 1.8vh, 18px) clamp(8px, 2vw, 18px);
    background: #ffffff;
    color: #4b5563;
    border: 2px solid #d1d5db;
    border-radius: clamp(6px, 1vw, 10px);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: clamp(0.85rem, 2vw, 1.3rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    white-space: nowrap;
    box-sizing: border-box;
    text-align: center;
    letter-spacing: 0.02em;
}

.btn-go-back:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #1f2937;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.btn-go-back:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-confirm-cancel {
    flex: 0 1 auto;
    min-width: clamp(110px, 16vw, 150px);
    padding: clamp(10px, 1.8vh, 18px) clamp(8px, 2vw, 18px);
    background: #dc2626;
    color: #ffffff;
    border: 2px solid #dc2626;
    border-radius: clamp(6px, 1vw, 10px);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: clamp(0.85rem, 2vw, 1.3rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
    white-space: nowrap;
    box-sizing: border-box;
    text-align: center;
    letter-spacing: 0.02em;
}

.btn-confirm-cancel:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
    transform: translateY(-2px);
}

.btn-confirm-cancel:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

/* Withdraw button — green neon */
.btn-withdraw {
    flex: 0 1 auto;
    min-width: clamp(160px, 24vw, 220px);
    padding: clamp(10px, 1.8vh, 18px) clamp(16px, 3vw, 32px);
    background: #16a34a;
    color: #ffffff;
    border: 2px solid #22c55e;
    border-radius: clamp(6px, 1vw, 10px);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: clamp(0.85rem, 2vw, 1.3rem);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.35), 0 0 28px rgba(34, 197, 94, 0.18);
    white-space: nowrap;
    box-sizing: border-box;
    text-align: center;
    letter-spacing: 0.04em;
    animation: withdrawGlow 1.5s ease-in-out infinite alternate;
}

@keyframes withdrawGlow {
    0% { box-shadow: 0 0 10px rgba(34, 197, 94, 0.3), 0 0 20px rgba(34, 197, 94, 0.12); }
    100% { box-shadow: 0 0 22px rgba(34, 197, 94, 0.55), 0 0 40px rgba(34, 197, 94, 0.28); }
}

.btn-withdraw:hover {
    background: #15803d;
    border-color: #4ade80;
    color: #ffffff;
    box-shadow: 0 0 28px rgba(34, 197, 94, 0.6), 0 0 50px rgba(34, 197, 94, 0.3);
    transform: translateY(-2px);
}

.btn-withdraw:active {
    transform: translateY(0);
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.4), 0 0 24px rgba(34, 197, 94, 0.2);
}

/* ──────────────────────────────
   Cinematic Win Overlay
   ────────────────────────────── */
.win-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: winOverlayIn 0.5s ease-out;
}

.win-overlay.hidden {
    display: none;
}

@keyframes winOverlayIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.win-block {
    background: linear-gradient(145deg, #0a0f0a 0%, #0d1a0d 40%, #0a0f0a 100%);
    border: 2px solid #22c55e;
    border-radius: 18px;
    padding: clamp(24px, 5vh, 40px) clamp(20px, 5vw, 32px);
    max-width: 500px;
    width: 90%;
    box-shadow: 
        0 0 40px rgba(34, 197, 94, 0.25),
        0 0 80px rgba(34, 197, 94, 0.12),
        inset 0 1px 0 rgba(34, 197, 94, 0.08);
    animation: winBlockPulse 0.6s ease-out 0.3s both, winBlockGlow 2s ease-in-out 1s infinite;
}

@keyframes winBlockPulse {
    0% { transform: scale(0.85); opacity: 0; }
    60% { transform: scale(1.03); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes winBlockGlow {
    0%, 100% { box-shadow: 0 0 40px rgba(34, 197, 94, 0.25), 0 0 80px rgba(34, 197, 94, 0.12), inset 0 1px 0 rgba(34, 197, 94, 0.08); }
    50% { box-shadow: 0 0 55px rgba(34, 197, 94, 0.4), 0 0 100px rgba(34, 197, 94, 0.2), inset 0 1px 0 rgba(34, 197, 94, 0.15); }
}

.win-icon-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 18px;
}

.win-icon {
    font-size: clamp(2rem, 6vw, 3rem);
    animation: winTrophyBob 0.8s ease-in-out infinite alternate;
}

@keyframes winTrophyBob {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-6px) scale(1.08); }
}

.win-title {
    font-family: 'JetBrains Mono', 'Inter', monospace;
    font-size: clamp(1.2rem, 3.5vw, 1.6rem);
    font-weight: 700;
    color: #22c55e;
    letter-spacing: 0.06em;
    text-shadow: 0 0 18px rgba(34, 197, 94, 0.5);
}

.win-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.4), transparent);
    margin: 16px 0;
}

.win-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    gap: 12px;
    flex-wrap: wrap;
}

.win-label {
    font-family: 'JetBrains Mono', 'Inter', monospace;
    font-size: clamp(0.7rem, 1.8vw, 0.82rem);
    font-weight: 600;
    color: #6ee7a7;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.win-value {
    font-family: 'JetBrains Mono', 'Inter', monospace;
    font-size: clamp(0.72rem, 1.8vw, 0.82rem);
    font-weight: 500;
    color: #bbf7d0;
    text-align: right;
    word-break: break-all;
}

.win-balance-row {
    background: rgba(34, 197, 94, 0.1);
    border-radius: 10px;
    padding: 14px 16px;
    margin: 8px 0;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.win-balance {
    font-family: 'JetBrains Mono', 'Inter', monospace;
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 800;
    color: #22c55e;
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.6);
    animation: winBalanceGlow 1.2s ease-in-out infinite alternate;
    letter-spacing: 0.03em;
}

@keyframes winBalanceGlow {
    0% { text-shadow: 0 0 16px rgba(34, 197, 94, 0.4); }
    100% { text-shadow: 0 0 32px rgba(34, 197, 94, 0.8), 0 0 60px rgba(34, 197, 94, 0.3); }
}

.win-status {
    font-family: 'JetBrains Mono', 'Inter', monospace;
    font-size: clamp(0.68rem, 1.6vw, 0.78rem);
    font-weight: 600;
    color: #4ade80;
    text-align: center;
    letter-spacing: 0.03em;
    margin-top: 4px;
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

/* ──────────────────────────────
   Phase 1: Amber Pulse on bluish-box
   ────────────────────────────── */
.bluish-box.phase-amber {
    animation: amberPulse 0.6s ease-in-out infinite alternate;
    border-color: #f59e0b !important;
    background: #1a1a24 !important;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.35), 0 0 60px rgba(245, 158, 11, 0.15) !important;
}

@keyframes amberPulse {
    0% { box-shadow: 0 0 25px rgba(245, 158, 11, 0.3), 0 0 50px rgba(245, 158, 11, 0.1); }
    100% { box-shadow: 0 0 45px rgba(245, 158, 11, 0.5), 0 0 80px rgba(245, 158, 11, 0.25); }
}

/* Phase 2: dark green win display inside bluish-box */
.bluish-box.phase-green {
    animation: greenWinPulse 0.8s ease-in-out infinite alternate;
    border-color: #22c55e !important;
    background: #0a0f0a !important;
    box-shadow: 0 0 40px rgba(34, 197, 94, 0.25), 0 0 80px rgba(34, 197, 94, 0.12), inset 0 0 20px rgba(34, 197, 94, 0.04) !important;
}

@keyframes greenWinPulse {
    0% { box-shadow: 0 0 30px rgba(34, 197, 94, 0.25), 0 0 60px rgba(34, 197, 94, 0.1); }
    100% { box-shadow: 0 0 50px rgba(34, 197, 94, 0.45), 0 0 90px rgba(34, 197, 94, 0.2); }
}

/* Phase 1 amber text lines */
.scanner-amber-line {
    font-family: 'JetBrains Mono', 'Inter', monospace;
    font-size: 0.75rem;
    color: #f59e0b;
    line-height: 1.6;
    font-weight: 600;
    margin-top: 2px;
    text-shadow: 0 0 6px rgba(245, 158, 11, 0.3);
}

/* Phase 2: Green win display inside bluish-box */
.console-win-block {
    margin-top: 4px;
    padding: 2px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    box-sizing: border-box;
    gap: 2px;
}

/* ── Dopamine spike entrance sequence ── */
/* Pure opacity fades — no movement, no layout shifts */

/* 1. Block container fades in */
.console-win-block.dopamine-enter {
    animation: dopamineFadeIn 0.35s ease-out both;
}

@keyframes dopamineFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* 2. Header lines — fade in */
.console-win-header.dopamine-header {
    animation: dopamineFadeIn 0.3s ease-out both;
}

.console-win-header.dopamine-header:nth-child(1) {
    animation-delay: 0.1s;
}

.console-win-header.dopamine-header:nth-child(2) {
    animation-delay: 0.25s;
}

/* 3. Divider — fade in */
.console-win-divider.dopamine-divider {
    animation: dopamineFadeIn 0.25s ease-out both;
}

/* 4. Claim label — fade in */
.console-win-line.win-label-console.dopamine-label {
    animation: dopamineFadeIn 0.25s ease-out both;
}

/* 5. Coin row — fade in */
.console-win-coin-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 2px;
}

.console-win-coin-row.dopamine-coin {
    animation: dopamineFadeIn 0.3s ease-out both;
}

/* 6. Balance — already has dopamine-burst, keep as-is */

/* 7. Footer — fade in */
.console-win-footer.dopamine-footer {
    animation: dopamineFadeIn 0.25s ease-out both;
}

.console-win-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.35), transparent);
    margin: 4px 0;
    width: 100%;
}

.console-win-line {
    font-family: 'JetBrains Mono', 'Inter', monospace;
    font-size: clamp(0.9rem, 3vw, 1.4rem);
    color: #bbf7d0;
    line-height: 1.4;
    font-weight: 500;
}

.console-win-line.win-label-console {
    color: #6ee7a7;
    font-weight: 600;
    letter-spacing: 0.03em;
    font-size: clamp(0.95rem, 3.2vw, 1.5rem);
}

.console-win-header {
    font-family: 'JetBrains Mono', 'Inter', monospace;
    font-size: clamp(1rem, 3.5vw, 1.7rem);
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    letter-spacing: 0.04em;
    margin-bottom: 2px;
    line-height: 1.2;
}

.console-win-balance {
    font-family: 'JetBrains Mono', 'Inter', monospace;
    font-size: clamp(2.2rem, 8vw, 4rem);
    font-weight: 800;
    color: #22c55e;
    text-align: center;
    text-shadow: 0 0 18px rgba(34, 197, 94, 0.6);
    animation: winBalanceGlow 1.2s ease-in-out infinite alternate;
    letter-spacing: 0.03em;
    padding: 2px 0;
    position: relative;
    line-height: 1.1;
}

/* Dopamine burst on reveal — quick scale pulse + glow, no layout shift */
.console-win-balance.dopamine-burst {
    animation: balanceBurst 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both,
               winBalanceGlow 1.2s ease-in-out infinite alternate 0.7s;
}

.console-win-balance.dopamine-burst::after {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 12px;
    background: radial-gradient(ellipse at center, rgba(34, 197, 94, 0.25) 0%, transparent 70%);
    animation: greenPulseRing 0.9s ease-out forwards;
    pointer-events: none;
    z-index: -1;
}

@keyframes balanceBurst {
    0% {
        opacity: 0.5;
        transform: scale(0.85);
        text-shadow: 0 0 4px rgba(34, 197, 94, 0.3);
    }
    40% {
        opacity: 1;
        transform: scale(1.12);
        text-shadow: 0 0 40px rgba(34, 197, 94, 1),
                     0 0 80px rgba(34, 197, 94, 0.7),
                     0 0 120px rgba(34, 197, 94, 0.4);
    }
    65% {
        transform: scale(0.96);
        text-shadow: 0 0 24px rgba(34, 197, 94, 0.7);
    }
    85% {
        transform: scale(1.02);
        text-shadow: 0 0 20px rgba(34, 197, 94, 0.6);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        text-shadow: 0 0 18px rgba(34, 197, 94, 0.6);
    }
}

@keyframes greenPulseRing {
    0% {
        opacity: 0;
        transform: scale(0.85);
    }
    30% {
        opacity: 1;
        transform: scale(1.3);
    }
    100% {
        opacity: 0;
        transform: scale(2);
    }
}

.console-win-footer {
    font-family: 'JetBrains Mono', 'Inter', monospace;
    font-size: clamp(0.9rem, 3vw, 1.4rem);
    font-weight: 600;
    color: #4ade80;
    text-align: center;
    letter-spacing: 0.03em;
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
    margin-top: 2px;
    line-height: 1.2;
}

/* ──────────────────────────────
   Footer Navigation
   ────────────────────────────── */
.footer-nav {
    position: fixed;
    bottom: clamp(30px, 5vh, 46px);
    left: 50%;
    transform: translateX(-50%);
    width: clamp(220px, 75vw, 440px);
    height: clamp(44px, 7vh, 62px);
    background: #2a2a36;
    border: 1px solid #3f3f4a;
    border-radius: clamp(22px, 3.5vh, 31px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    padding: 0 clamp(6px, 1.5vw, 12px);
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.2);
}

.footer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(40px, 11vw, 56px);
    height: clamp(40px, 11vw, 56px);
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.footer-btn svg {
    width: clamp(22px, 6vw, 34px);
    height: clamp(22px, 6vw, 34px);
}

.footer-icon {
    width: clamp(22px, 6vw, 34px);
    height: clamp(22px, 6vw, 34px);
    display: block;
    filter: brightness(0) invert(1);
}

.footer-icon-lg {
    width: clamp(30px, 8.5vw, 48px);
    height: clamp(30px, 8.5vw, 48px);
    filter: brightness(0) invert(1);
}

.footer-btn:hover {
    color: #60a5fa;
    background: #323242;
}

.footer-btn:active {
    transform: scale(0.92);
}

/* ──────────────────────────────
   Withdraw Modal
   ────────────────────────────── */
.withdraw-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: modalOverlayIn 0.3s ease-out;
}

.withdraw-modal-overlay.hidden {
    display: none;
}

@keyframes modalOverlayIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.withdraw-modal {
    background: linear-gradient(145deg, #1e1e28 0%, #252535 40%, #1e1e28 100%);
    border: 2px solid #22c55e;
    border-radius: 14px;
    padding: clamp(16px, 3vh, 24px) clamp(14px, 3vw, 20px);
    max-width: 300px;
    width: 82%;
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.3), 0 0 60px rgba(34, 197, 94, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    animation: modalBlockIn 0.35s ease-out both;
}

@keyframes modalBlockIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.withdraw-modal-close {
    position: absolute;
    top: 6px;
    right: 12px;
    font-size: 1.3rem;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
    font-family: 'Inter', sans-serif;
    z-index: 5;
}

.withdraw-modal-close:hover {
    color: #ef4444;
}

.withdraw-modal-networks {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: -6px;
    margin-bottom: 14px;
}

.withdraw-modal-network {
    width: clamp(40px, 10vw, 52px);
    height: clamp(40px, 10vw, 52px);
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(34, 197, 94, 0.5);
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.25);
}

/* BACK container in Step 4 */
.withdraw-back-container {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    background: #2a2a36;
    border: 1px solid #3f3f4a;
    border-radius: 6px;
    color: #9ca3af;
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: all 0.2s ease;
}
.withdraw-back-container:hover {
    color: #ffffff;
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
}

/* Step containers */
.withdraw-step {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.withdraw-step.hidden {
    display: none;
}

.withdraw-modal-title {
    font-family: 'JetBrains Mono', 'Inter', monospace;
    font-size: clamp(0.7rem, 1.8vw, 0.8rem);
    font-weight: 700;
    color: #6ee7a7;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-shadow: 0 0 8px rgba(110, 231, 167, 0.35);
}

.withdraw-modal-amount {
    font-family: 'JetBrains Mono', 'Inter', monospace;
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    font-weight: 800;
    color: #22c55e;
    text-shadow: 0 0 16px rgba(34, 197, 94, 0.55);
    letter-spacing: 0.03em;
}

.withdraw-modal-label {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.68rem, 1.5vw, 0.78rem);
    font-weight: 500;
    color: #d1d5db;
    text-align: center;
    margin-top: 2px;
}

.withdraw-modal-input {
    width: 100%;
    padding: clamp(8px, 1.2vh, 10px) clamp(10px, 2vw, 14px);
    background: #1a1a24;
    border: 2px solid #3f3f4a;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.7rem, 1.6vw, 0.78rem);
    font-weight: 500;
    color: #e5e7eb;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.withdraw-modal-input::placeholder {
    color: #6b7280;
    font-family: 'JetBrains Mono', monospace;
}

.withdraw-modal-input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.15), inset 0 0 6px rgba(34, 197, 94, 0.04);
}

.withdraw-address-input {
    width: 100%;
    padding: clamp(8px, 1.2vh, 10px) clamp(10px, 2vw, 14px);
    background: #1a1a24;
    border: 2px solid #3f3f4a;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.7rem, 1.6vw, 0.78rem);
    font-weight: 500;
    color: #e5e7eb;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.withdraw-address-input::placeholder {
    color: #6b7280;
    font-family: 'JetBrains Mono', monospace;
}

.withdraw-address-input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.15), inset 0 0 6px rgba(34, 197, 94, 0.04);
}

.withdraw-modal-confirm {
    width: 100%;
    padding: clamp(8px, 1.2vh, 10px) clamp(14px, 2.5vw, 20px);
    background: #16a34a;
    color: #ffffff;
    border: 2px solid #22c55e;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.78rem, 1.8vw, 0.88rem);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3), 0 0 20px rgba(34, 197, 94, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    animation: withdrawGlow 1.5s ease-in-out infinite alternate;
}

.withdraw-modal-confirm:hover {
    background: #15803d;
    border-color: #4ade80;
    box-shadow: 0 0 22px rgba(34, 197, 94, 0.5), 0 0 40px rgba(34, 197, 94, 0.25);
    transform: translateY(-2px);
}

.withdraw-modal-confirm:active {
    transform: translateY(0);
}

.withdraw-modal-note {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    font-weight: 500;
    color: #6b7280;
    text-align: center;
    min-height: 1em;
}

/* Step 2: Activation loading / paused state */
/* ── Progress bar container ── */
.withdraw-progress-container {
    width: 100%;
    padding: 12px clamp(12px, 4vw, 24px);
    box-sizing: border-box;
}

.withdraw-progress-bar {
    width: 100%;
    height: 8px;
    background: #1f2937;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.withdraw-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.withdraw-progress-fill.paused {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.withdraw-progress-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.6rem, 1.2vw, 0.7rem);
    font-weight: 500;
    color: #9ca3af;
    margin-bottom: 2px;
    flex-wrap: wrap;
}

.withdraw-status-running {
    font-size: clamp(0.7rem, 1.4vw, 0.8rem);
}

.withdraw-status-text {
    color: #d1d5db;
}

.withdraw-status-pct {
    color: #6b7280;
}

/* ── Paused state ── */
.withdraw-paused-divider {
    width: 80%;
    height: 1px;
    background: #374151;
    margin: 10px auto;
}

.withdraw-paused-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    padding: 0 clamp(12px, 4vw, 24px);
    box-sizing: border-box;
    animation: fadeInUp 0.4s ease;
}

.withdraw-paused-message {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.68rem, 1.4vw, 0.78rem);
    font-weight: 500;
    color: #ef4444;
    text-align: center;
    line-height: 1.4;
    margin: 2px 0;
    padding: 0 clamp(12px, 4vw, 24px);
    width: 100%;
    box-sizing: border-box;
}

.withdraw-paused-cost-label {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.6rem, 1.2vw, 0.7rem);
    font-weight: 600;
    color: #9ca3af;
    margin: 4px 0 2px 0;
    letter-spacing: 0.03em;
}

.withdraw-paused-cost {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
    margin-bottom: 2px;
}

.withdraw-paused-refund {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.55rem, 1vw, 0.65rem);
    font-weight: 500;
    color: #6b7280;
    margin: 0 0 8px 0;
}

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

/* ── Balance + Fee info bar ── */
.withdraw-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 8px 12px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 10px;
    border: 1px solid #334155;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.withdraw-info-balance,
.withdraw-info-fee {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.withdraw-info-fee {
    align-items: flex-end;
}

.withdraw-info-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.6rem;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.withdraw-info-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.7rem, 1.6vw, 0.8rem);
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.15);
}

/* Step 3: Payment method grid — 2×3 premium cards, no scroll */
.withdraw-payment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    margin: 6px 0;
}

.withdraw-payment-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: clamp(10px, 1.8vh, 16px) 8px;
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    color: #cbd5e1;
    border: 1.5px solid #334155;
    border-radius: 14px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.withdraw-card-icon-ring {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(42px, 10vw, 52px);
    height: clamp(42px, 10vw, 52px);
    border-radius: 50%;
    background: linear-gradient(135deg, #1a2332 0%, #0d1624 100%);
    border: 2px solid #3b4f6b;
    margin-bottom: 2px;
    transition: all 0.35s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.withdraw-payment-icon {
    width: clamp(24px, 6vw, 32px);
    height: clamp(24px, 6vw, 32px);
    border-radius: 50%;
    object-fit: cover;
}

.withdraw-card-label {
    font-size: clamp(0.72rem, 1.6vw, 0.82rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #e2e8f0;
    transition: color 0.35s ease;
}

.withdraw-card-net {
    font-size: 0.58rem;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: color 0.35s ease;
}

.withdraw-payment-option:hover {
    border-color: #6366f1;
    background: linear-gradient(145deg, #1e2438 0%, #151d30 100%);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2), 0 6px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(-3px);
}

.withdraw-payment-option:hover .withdraw-card-icon-ring {
    border-color: #818cf8;
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.35), 0 4px 12px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #1e2a45 0%, #152040 100%);
}

.withdraw-payment-option:hover .withdraw-card-label {
    color: #a5b4fc;
}

.withdraw-payment-option:hover .withdraw-card-net {
    color: #818cf8;
}

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

.withdraw-payment-option.selected-method {
    border-color: #22c55e;
    background: linear-gradient(145deg, #0a1f14 0%, #061712 100%);
    box-shadow: 0 0 22px rgba(34, 197, 94, 0.3), 0 6px 20px rgba(0, 0, 0, 0.4);
}

.withdraw-payment-option.selected-method .withdraw-card-icon-ring {
    border-color: #22c55e;
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.45), 0 4px 12px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #0f2a1a 0%, #091f14 100%);
}

.withdraw-payment-option.selected-method .withdraw-card-label {
    color: #4ade80;
}

.withdraw-payment-option.selected-method .withdraw-card-net {
    color: #22c55e;
}

/* Step 4: Payment address + QR */
.withdraw-qr-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(130px, 30vw, 160px);
    height: clamp(130px, 30vw, 160px);
    margin: 6px auto 10px;
    background: #ffffff;
    border-radius: 14px;
    border: 3px solid #334155;
    overflow: hidden;
}

.withdraw-qr-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.withdraw-qr-icon {
    font-size: clamp(3rem, 8vw, 4.5rem);
    color: #1e293b;
    line-height: 1;
}

.withdraw-crypto-amount-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid #334155;
    border-radius: 10px;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.withdraw-crypto-amount {
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.72rem, 1.6vw, 0.82rem);
    font-weight: 700;
    color: #fbbf24;
    word-break: break-all;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.3);
}

.withdraw-address-display {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    background: #1a1a24;
    border: 1px solid #3f3f4a;
    border-radius: 8px;
    box-sizing: border-box;
}

.withdraw-address-text {
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.58rem, 1.3vw, 0.68rem);
    color: #94a3b8;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.withdraw-copy-btn {
    flex-shrink: 0;
    padding: 5px 12px;
    background: #22c55e;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.withdraw-copy-btn:hover {
    background: #16a34a;
}

.withdraw-copy-btn.copied {
    background: #6366f1;
}

.withdraw-step4-note {
    font-family: 'Inter', sans-serif;
    font-size: 0.58rem;
    font-weight: 400;
    color: #64748b;
    text-align: center;
    line-height: 1.4;
    margin: 8px 0 0;
}

/* ── Wallet View ── */
.wallet-body {
    justify-content: flex-start !important;
    padding-top: 20px;
    gap: 10px;
}

/* Balance bar — left: label+amount, right: WITHDRAW button */
.wallet-balance-bar {
    width: 100%;
    max-width: 360px;
    background: linear-gradient(135deg, #0b1120 0%, #111827 100%);
    border: 1.5px solid #0066FF;
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 0 14px rgba(0, 102, 255, 0.18), 0 4px 16px rgba(0,0,0,0.12);
}

.wallet-balance-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.wallet-balance-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.1em;
}

.wallet-balance-value {
    font-family: 'JetBrains Mono', 'Inter', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: #4b5563;
    letter-spacing: -0.02em;
    transition: color 0.35s ease;
}

.wallet-balance-value.has-balance-true {
    color: #22c55e;
    text-shadow: 0 0 12px rgba(34, 197, 94, 0.35);
}

.wallet-withdraw-btn {
    flex-shrink: 0;
    padding: 10px 20px;
    background: #4b5563;
    color: #9ca3af;
    border: 1px solid #374151;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.25s ease;
    opacity: 0.5;
    pointer-events: none;
}

.wallet-withdraw-btn:enabled {
    background: #22c55e;
    color: #0b1120;
    border-color: #22c55e;
    opacity: 1;
    pointer-events: auto;
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.25);
}

.wallet-withdraw-btn:enabled:hover {
    background: #16a34a;
    border-color: #16a34a;
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.40);
}

/* Network cards */
.wallet-networks {
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.wallet-network-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #0f172a 0%, #111827 100%);
    border: 1.5px solid #0066FF;
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 0 8px rgba(0, 102, 255, 0.10);
}

.wallet-network-card:hover {
    border-color: #00aaff;
    box-shadow: 0 0 16px rgba(0, 102, 255, 0.25), 0 2px 12px rgba(0,0,0,0.15);
}

.wallet-net-icon-ring {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid #0066FF;
    box-shadow: 0 0 8px rgba(0, 102, 255, 0.15);
}

.wallet-net-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.wallet-net-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wallet-net-name {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #e2e8f0;
}

/* Text input for address */
.wallet-net-input {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    font-weight: 400;
    color: #cbd5e1;
    background: #0b1120;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 6px 8px;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wallet-net-input::placeholder {
    color: #475569;
}

.wallet-net-input:focus {
    border-color: #0066FF;
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.15);
}

.wallet-net-save {
    flex-shrink: 0;
    padding: 7px 14px;
    background: #1e293b;
    color: #94a3b8;
    border: 1px solid #334155;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.66rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
    min-width: 52px;
    text-align: center;
}

.wallet-net-save:hover {
    background: #0066FF;
    color: #ffffff;
    border-color: #0066FF;
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(0, 102, 255, 0.3);
}

.wallet-net-save.has-address {
    background: #22c55e;
    color: #0b1120;
    border-color: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.2);
}

.wallet-net-save.has-address:hover {
    background: #16a34a;
    border-color: #16a34a;
    color: #0b1120;
}

/* ── Step 5: Success popup ── */
.withdraw-success-icon {
    width: clamp(48px, 10vw, 64px);
    height: clamp(48px, 10vw, 64px);
    border-radius: 50%;
    background: #22c55e;
    color: #0b1120;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    margin-bottom: 8px;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.5), 0 0 40px rgba(34, 197, 94, 0.2);
    animation: successPopIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes successPopIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.scan-line {
    font-size: 0.7rem;
    line-height: 1.3;
    white-space: pre;
    font-family: inherit;
}
.scan-line-red {
    color: #dc2626;
}
.scan-line-yellow {
    color: #eab308;
}
.scan-line-orange {
    color: #f97316;
}

.withdraw-success-amount {
    font-family: 'JetBrains Mono', 'Inter', monospace;
    font-size: clamp(1.1rem, 3.5vw, 1.5rem);
    font-weight: 800;
    color: #22c55e;
    text-shadow: 0 0 16px rgba(34, 197, 94, 0.55);
    letter-spacing: 0.03em;
    margin-bottom: 12px;
}

/* ──────────────────────────────
   Withdraw Flow Pages (SPA Views)
   ────────────────────────────── */

/* Override view body for withdraw pages */
.withdraw-page-body {
    gap: clamp(14px, 3vh, 30px);
    padding: clamp(10px, 2vh, 20px) 0;
    justify-content: flex-start !important;
    padding-top: clamp(20px, 4vh, 40px) !important;
}

/* Network icon circle on address page */
.withdraw-network-icon-circle {
    width: clamp(64px, 16vw, 80px);
    height: clamp(64px, 16vw, 80px);
    border-radius: 50%;
    background: linear-gradient(135deg, #0f2a1a 0%, #091f14 100%);
    border: 3px solid #22c55e;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3), 0 0 40px rgba(34, 197, 94, 0.15);
    animation: networkIconGlow 2s ease-in-out infinite alternate;
}

@keyframes networkIconGlow {
    0% { box-shadow: 0 0 16px rgba(34, 197, 94, 0.25), 0 0 32px rgba(34, 197, 94, 0.1); }
    100% { box-shadow: 0 0 28px rgba(34, 197, 94, 0.45), 0 0 56px rgba(34, 197, 94, 0.2); }
}

.withdraw-network-icon-img {
    width: clamp(40px, 10vw, 52px);
    height: clamp(40px, 10vw, 52px);
    border-radius: 50%;
    object-fit: cover;
}

.withdraw-network-name-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.8rem, 2vw, 0.95rem);
    font-weight: 700;
    color: #22c55e;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

/* Amount display on verify page */
.verify-amount-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1.6rem, 5.5vw, 2.5rem);
    font-weight: 800;
    color: #22c55e;
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
    animation: withdrawPulse 2s ease-in-out infinite alternate;
    text-align: center;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}

/* Amount display on terminal */
.terminal-amount-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: 800;
    color: #22c55e;
    text-shadow: 0 0 16px rgba(34, 197, 94, 0.5);
    animation: withdrawPulse 2s ease-in-out infinite alternate;
    text-align: center;
    letter-spacing: 0.03em;
    transition: color 0.5s ease, text-shadow 0.5s ease;
}

.terminal-amount-display.paused {
    color: #ef4444;
    text-shadow: 0 0 16px rgba(239, 68, 68, 0.5);
    animation: amountRedPulse 2s ease-in-out infinite alternate;
}

@keyframes amountRedPulse {
    0% { text-shadow: 0 0 12px rgba(239, 68, 68, 0.3); }
    100% { text-shadow: 0 0 24px rgba(239, 68, 68, 0.7), 0 0 40px rgba(239, 68, 68, 0.2); }
}

/* Amount display on withdraw page */
.withdraw-amount-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(2.4rem, 8vw, 4rem);
    font-weight: 800;
    color: #22c55e;
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
    animation: withdrawPulse 2s ease-in-out infinite alternate;
    text-align: center;
    letter-spacing: 0.03em;
    line-height: 1.1;
}

/* Coin display with image */
.withdraw-coin-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
    margin-bottom: 4px;
}

.withdraw-coin-img {
    width: clamp(24px, 5vw, 32px);
    height: clamp(24px, 5vw, 32px);
    border-radius: 50%;
    object-fit: cover;
}

.withdraw-coin-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 600;
    color: #9ca3af;
    letter-spacing: 0.04em;
}

@keyframes withdrawPulse {
    0% { text-shadow: 0 0 16px rgba(34, 197, 94, 0.4); }
    100% { text-shadow: 0 0 32px rgba(34, 197, 94, 0.7), 0 0 60px rgba(34, 197, 94, 0.3); }
}

/* Address section */
.withdraw-address-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.withdraw-address-label {
    font-size: clamp(0.85rem, 2vw, 1rem);
    font-weight: 600;
    color: #6b7280;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

.withdraw-page-input {
    width: 100%;
    padding: clamp(12px, 2vh, 16px) clamp(14px, 3vw, 20px);
    background: #1a1a2e;
    border: 2px solid #2a2a3e;
    border-radius: 10px;
    color: #e5e7eb;
    font-size: clamp(0.85rem, 2vw, 1rem);
    font-family: 'JetBrains Mono', monospace;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.withdraw-page-input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.2);
}

.withdraw-page-input:valid {
    border-color: #22c55e;
}

.withdraw-page-note {
    font-size: clamp(0.75rem, 1.8vw, 0.85rem);
    color: #9ca3af;
    text-align: center;
    margin: 0;
    min-height: 1.2em;
}

/* Green button for withdraw pages */
.withdraw-page-btn-green {
    width: 100%;
    max-width: 320px;
    padding: clamp(14px, 2.5vh, 18px) clamp(24px, 5vw, 32px);
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.9rem, 2.2vw, 1.05rem);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.3), 0 0 30px rgba(34, 197, 94, 0.15);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.withdraw-page-btn-green:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(34, 197, 94, 0.45), 0 0 50px rgba(34, 197, 94, 0.25);
}

.withdraw-page-btn-green:active:not(:disabled) {
    transform: translateY(0);
}

.withdraw-page-btn-green:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Verify View ── */
.verify-address-display {
    width: 100%;
    background: #1a1a2e;
    border: 1px solid #2a2a3e;
    border-radius: 10px;
    padding: clamp(14px, 2vh, 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.verify-label {
    font-size: clamp(0.75rem, 1.8vw, 0.85rem);
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.verify-addr-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.8rem, 2vw, 0.95rem);
    color: #e5e7eb;
    word-break: break-all;
    text-align: center;
    padding: 0 10px;
}

.verify-question {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 600;
    color: #f59e0b;
    text-align: center;
    margin: 0;
    animation: verifyPulse 1.5s ease-in-out infinite alternate;
}

@keyframes verifyPulse {
    0% { color: #f59e0b; text-shadow: 0 0 8px rgba(245, 158, 11, 0.2); }
    100% { color: #fbbf24; text-shadow: 0 0 16px rgba(251, 191, 36, 0.4); }
}

.verify-buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.verify-btn-no {
    width: 100%;
    max-width: 320px;
    padding: clamp(14px, 2.5vh, 18px) clamp(24px, 5vw, 32px);
    background: transparent;
    color: #9ca3af;
    border: 2px solid #4a4a56;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.9rem, 2.2vw, 1.05rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.03em;
}

.verify-btn-no:hover {
    background: rgba(156, 163, 175, 0.1);
    border-color: #9ca3af;
    color: #e5e7eb;
}

.verify-btn-yes {
    width: 100%;
    max-width: 320px;
    padding: clamp(14px, 2.5vh, 18px) clamp(24px, 5vw, 32px);
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.9rem, 2.2vw, 1.05rem);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.3);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.verify-btn-yes:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(34, 197, 94, 0.45);
}

.verify-btn-yes:active {
    transform: translateY(0);
}

/* ── Loading View (Green Terminal) ── */
.withdraw-loading-body {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 0;
}

.green-terminal {
    width: 100%;
    background: #0a0f0a;
    border: 2px solid #22c55e;
    border-radius: 12px;
    padding: clamp(20px, 4vh, 32px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.2), 0 0 60px rgba(34, 197, 94, 0.1), inset 0 0 20px rgba(34, 197, 94, 0.05);
    animation: terminalGlow 2s ease-in-out infinite alternate;
    box-sizing: border-box;
}

@keyframes terminalGlow {
    0% { box-shadow: 0 0 25px rgba(34, 197, 94, 0.2), 0 0 50px rgba(34, 197, 94, 0.1), inset 0 0 15px rgba(34, 197, 94, 0.03); }
    100% { box-shadow: 0 0 40px rgba(34, 197, 94, 0.35), 0 0 80px rgba(34, 197, 94, 0.18), inset 0 0 25px rgba(34, 197, 94, 0.08); }
}

.terminal-line {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    text-align: center;
    width: 100%;
}

.terminal-green {
    color: #22c55e;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.terminal-error {
    color: #ef4444;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

.terminal-progress-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
}

.terminal-progress-bar {
    flex: 1;
    height: 8px;
    background: #1a2a1a;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #2a3a2a;
}

.terminal-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #16a34a, #22c55e);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.terminal-progress-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.75rem, 1.8vw, 0.9rem);
    font-weight: 700;
    color: #22c55e;
    min-width: 40px;
    text-align: right;
}

/* Error section */
.terminal-error-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: errorFadeIn 0.6s ease-out forwards;
}

@keyframes errorFadeIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.error-message-box {
    width: 100%;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 8px;
    padding: clamp(12px, 2vh, 16px);
    box-sizing: border-box;
}

.error-main-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.75rem, 1.8vw, 0.85rem);
    color: #fca5a5;
    text-align: center;
    margin: 0;
    line-height: 1.5;
}

.deposit-amount-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.deposit-label {
    font-size: clamp(0.7rem, 1.6vw, 0.8rem);
    color: #9ca3af;
    font-weight: 500;
}

.deposit-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1.4rem, 4.5vw, 2rem);
    font-weight: 800;
    color: #f59e0b;
    text-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
    animation: depositPulse 1.5s ease-in-out infinite alternate;
}

@keyframes depositPulse {
    0% { text-shadow: 0 0 12px rgba(245, 158, 11, 0.3); }
    100% { text-shadow: 0 0 24px rgba(245, 158, 11, 0.6), 0 0 40px rgba(245, 158, 11, 0.2); }
}

.refund-badge {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 6px;
    padding: 6px 16px;
}

.refund-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.7rem, 1.6vw, 0.8rem);
    font-weight: 700;
    color: #22c55e;
    letter-spacing: 0.05em;
}

.status-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    font-size: clamp(0.8rem, 2vw, 1rem);
}

.status-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.65rem, 1.5vw, 0.75rem);
    font-weight: 700;
    color: #22c55e;
    letter-spacing: 0.04em;
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.status-subtext {
    font-size: clamp(0.65rem, 1.5vw, 0.75rem);
    color: #6b7280;
    text-align: center;
    margin: 0;
    font-style: italic;
}

/* ── Deposit Final View (ATLOS) ── */
.deposit-final-amount {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1.8rem, 5.5vw, 2.5rem);
    font-weight: 800;
    color: #f59e0b;
    text-align: center;
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
    animation: depositPulse 1.5s ease-in-out infinite alternate;
}

.deposit-final-note {
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    color: #9ca3af;
    text-align: center;
    margin: 0;
    max-width: 320px;
}

/* Hide footer nav on withdraw loading and deposit pages */
.view#view-withdraw-loading ~ .footer-nav,
.view#view-withdraw-deposit ~ .footer-nav {
    display: none;
}

/* ── Back arrow button for withdraw views ── */
.withdraw-back-arrow {
    position: absolute;
    top: clamp(12px, 3vh, 20px);
    left: clamp(12px, 3vw, 20px);
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #e5e7eb;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    line-height: 1;
    padding: 0;
}
.withdraw-back-arrow:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #22c55e;
    color: #22c55e;
}
.withdraw-back-arrow:active {
    transform: scale(0.92);
}

/* Override view styles for dark theme on withdraw pages */
#view-withdraw-address .view-header,
#view-withdraw-verify .view-header,
#view-withdraw-loading .view-header,
#view-withdraw-deposit .view-header {
    border-bottom-color: #2a2a3e;
}

#view-withdraw-address .view-title,
#view-withdraw-verify .view-title,
#view-withdraw-loading .view-title,
#view-withdraw-deposit .view-title {
    color: #e5e7eb;
}

/* Dark background for withdraw pages */
#view-withdraw-address,
#view-withdraw-verify,
#view-withdraw-loading,
#view-withdraw-deposit {
    background: #1e1e28;
}

/* Hide footer when any withdraw view is active */
body.withdraw-flow-active .footer-nav {
    display: none !important;
}

/* Direct utility class for JS to hide footer */
.footer-nav.forced-hidden {
    display: none !important;
}
