/* ============================================
   CASHFLOW.CAFE :: NFT TRANSPORTER
   Retro gaming meets cyberpunk meets XRPL
   ============================================ */

:root {
    /* Color palette */
    --bg-deep: #050510;
    --bg-dark: #0a0a18;
    --bg-panel: #0f0f24;
    --bg-card: #15152e;
    --bg-card-hi: #1d1d3d;

    --border-faint: #2a2a4a;
    --border-mid: #3a3a6a;
    --border-bright: #5a5a9a;

    --text-primary: #e8e8ff;
    --text-secondary: #8a8acc;
    --text-dim: #4a4a7a;

    --accent: #00ffd5;          /* Cyan/teal — primary action */
    --accent-glow: rgba(0, 255, 213, 0.4);
    --accent-hot: #ff00aa;      /* Magenta — selected/queue */
    --accent-hot-glow: rgba(255, 0, 170, 0.4);
    --accent-gold: #ffd700;     /* Gold — premium */
    --accent-warn: #ff5544;     /* Red — danger */
    --accent-ok: #00ff88;       /* Green — success */

    --pixel: 4px;
    --pixel-half: 2px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    image-rendering: pixelated;
    -webkit-font-smoothing: antialiased;
}

html, body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: 'VT323', 'Space Mono', monospace;
    font-size: 18px;
    line-height: 1.4;
    letter-spacing: 0.02em;
    position: relative;
    overflow-x: hidden;
}

/* ============================================
   CRT EFFECTS
   ============================================ */

.crt-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.15) 0px,
            rgba(0, 0, 0, 0.15) 1px,
            transparent 1px,
            transparent 3px
        );
    mix-blend-mode: multiply;
}

.crt-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.4) 100%);
}

.grid-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(0, 255, 213, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 213, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridPan 60s linear infinite;
}

@keyframes gridPan {
    from { background-position: 0 0, 0 0; }
    to { background-position: 40px 40px, 40px 40px; }
}

/* ============================================
   BOOT SCREEN
   ============================================ */

.boot-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.4s;
}

.boot-screen.fade-out { opacity: 0; pointer-events: none; }

.boot-content {
    text-align: center;
    width: 90%;
    max-width: 500px;
}

.boot-logo {
    font-family: 'Press Start 2P', monospace;
    font-size: 1.6rem;
    color: var(--accent);
    text-shadow:
        0 0 10px var(--accent-glow),
        0 0 20px var(--accent-glow),
        2px 2px 0 var(--accent-hot);
    margin-bottom: 0.8rem;
    animation: flicker 2s infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.95; }
    52% { opacity: 0.7; }
    54% { opacity: 1; }
}

.boot-tag {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
}

.boot-bar {
    width: 100%;
    height: 12px;
    background: var(--bg-panel);
    border: 2px solid var(--border-mid);
    margin-bottom: 1rem;
    overflow: hidden;
    position: relative;
}

.boot-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hot));
    box-shadow: 0 0 10px var(--accent);
    transition: width 0.1s;
}

.boot-status {
    color: var(--accent);
    font-size: 1rem;
    letter-spacing: 0.15em;
    animation: blink 1s steps(2) infinite;
}

@keyframes blink {
    50% { opacity: 0.5; }
}

/* ============================================
   APP LAYOUT
   ============================================ */

.app {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* ============================================
   HUD HEADER
   ============================================ */

.hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-panel);
    border: 2px solid var(--border-mid);
    margin-bottom: 1rem;
    position: relative;
}

.hud::before {
    content: '';
    position: absolute;
    inset: -2px;
    border: 1px solid var(--accent);
    opacity: 0.3;
    pointer-events: none;
}

.hud-left { display: flex; align-items: center; gap: 1.5rem; }
.hud-right { display: flex; align-items: center; gap: 1rem; }

.brand {
    font-family: 'Press Start 2P', monospace;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-mark {
    color: var(--accent);
    font-size: 1.2rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: translateX(0); }
    50% { opacity: 0.6; transform: translateX(2px); }
}

.brand-name { color: var(--text-primary); }
.brand-dot { color: var(--accent); }
.brand-suffix { color: var(--accent-hot); text-shadow: 0 0 8px var(--accent-hot-glow); }

.module-tag {
    font-size: 1rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    border-left: 1px solid var(--border-mid);
    padding-left: 1rem;
}

.wallet-display {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-mid);
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 10px;
    height: 10px;
    background: var(--accent-warn);
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}

.status-dot.connected {
    background: var(--accent-ok);
}

/* ============================================
   PIXEL BUTTONS
   ============================================ */

.btn-pixel {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    padding: 0.7rem 1.2rem;
    border: 2px solid var(--border-mid);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.1s;
    position: relative;
    text-transform: uppercase;
    box-shadow:
        inset -2px -2px 0 rgba(0, 0, 0, 0.3),
        inset 2px 2px 0 rgba(255, 255, 255, 0.05);
}

.btn-pixel:hover:not(:disabled) {
    transform: translate(-1px, -1px);
    box-shadow:
        inset -2px -2px 0 rgba(0, 0, 0, 0.3),
        inset 2px 2px 0 rgba(255, 255, 255, 0.1),
        2px 2px 0 var(--border-bright);
}

.btn-pixel:active:not(:disabled) {
    transform: translate(1px, 1px);
    box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.btn-pixel:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-deep);
    border-color: var(--accent);
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

.btn-primary:hover:not(:disabled) {
    background: #50ffe0;
    box-shadow:
        inset -2px -2px 0 rgba(0, 0, 0, 0.3),
        2px 2px 0 var(--accent),
        0 0 20px var(--accent-glow);
}

.btn-execute {
    background: var(--accent-hot);
    color: #fff;
    border-color: var(--accent-hot);
    font-size: 0.85rem;
    padding: 1rem 1.5rem;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
    animation: executeGlow 2s ease-in-out infinite;
}

@keyframes executeGlow {
    0%, 100% { box-shadow: inset -2px -2px 0 rgba(0,0,0,0.3), 0 0 0 var(--accent-hot-glow); }
    50% { box-shadow: inset -2px -2px 0 rgba(0,0,0,0.3), 0 0 25px var(--accent-hot-glow); }
}

.btn-execute:hover:not(:disabled) {
    background: #ff33bb;
    transform: translate(-1px, -1px);
    box-shadow:
        inset -2px -2px 0 rgba(0, 0, 0, 0.3),
        2px 2px 0 var(--accent-hot),
        0 0 30px var(--accent-hot-glow);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-mid);
}

.btn-ghost:hover:not(:disabled) {
    color: var(--accent);
    border-color: var(--accent);
}

.btn-tiny { font-size: 0.55rem; padding: 0.4rem 0.7rem; }
.btn-full { width: 100%; }

.btn-connect {
    background: var(--accent);
    color: var(--bg-deep);
    border-color: var(--accent);
}

.btn-icon { margin-right: 0.4rem; }

/* ============================================
   STATS BAR
   ============================================ */

.stats-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat {
    background: var(--bg-panel);
    border: 2px solid var(--border-mid);
    padding: 0.75rem 1rem;
    position: relative;
}

.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
    background: var(--accent);
}

.stat-label {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.55rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    margin-bottom: 0.4rem;
}

.stat-value {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.stat-value.accent { color: var(--accent); text-shadow: 0 0 8px var(--accent-glow); }
.stat-value.accent-hot { color: var(--accent-hot); text-shadow: 0 0 8px var(--accent-hot-glow); }

/* ============================================
   GAME GRID (main 3-column layout)
   ============================================ */

.game-grid {
    display: grid;
    grid-template-columns: 1fr 60px 1fr;
    gap: 1rem;
    flex: 1;
    min-height: 0;
}

.transfer-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.arrow-stack {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    color: var(--accent);
    font-size: 1.5rem;
    text-shadow: 0 0 10px var(--accent-glow);
}

.arrow-stack span {
    animation: arrowPulse 1.5s ease-in-out infinite;
}
.arrow-stack span:nth-child(1) { animation-delay: 0s; }
.arrow-stack span:nth-child(2) { animation-delay: 0.2s; }
.arrow-stack span:nth-child(3) { animation-delay: 0.4s; }

@keyframes arrowPulse {
    0%, 100% { opacity: 0.3; transform: translateX(-3px); }
    50% { opacity: 1; transform: translateX(3px); }
}

/* ============================================
   PANELS
   ============================================ */

.panel {
    background: var(--bg-panel);
    border: 2px solid var(--border-mid);
    display: flex;
    flex-direction: column;
    min-height: 600px;
    position: relative;
}

.panel::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), transparent);
    pointer-events: none;
}

.panel-queue::before {
    background: linear-gradient(90deg, var(--accent-hot), transparent);
}

.panel-header {
    padding: 1rem 1.25rem;
    border-bottom: 2px solid var(--border-faint);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.panel-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.05em;
    text-shadow: 0 0 8px var(--accent-glow);
}

.panel-queue .panel-title {
    color: var(--accent-hot);
    text-shadow: 0 0 8px var(--accent-hot-glow);
}

.panel-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-input {
    background: var(--bg-deep);
    border: 1px solid var(--border-mid);
    color: var(--text-primary);
    padding: 0.5rem 0.8rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    width: 240px;
    outline: none;
    transition: border-color 0.15s;
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.search-input::placeholder { color: var(--text-dim); font-size: 0.7rem; }

.panel-body {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: var(--border-mid) var(--bg-deep);
}

.panel-body::-webkit-scrollbar { width: 8px; }
.panel-body::-webkit-scrollbar-track { background: var(--bg-deep); }
.panel-body::-webkit-scrollbar-thumb { background: var(--border-mid); }
.panel-body::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.panel-footer {
    padding: 1rem 1.25rem;
    border-top: 2px solid var(--border-faint);
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

/* ============================================
   EMPTY STATES
   ============================================ */

.empty-state, .loading-state, .queue-empty {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    gap: 1rem;
    min-height: 300px;
}

.empty-icon {
    font-size: 3rem;
    color: var(--text-dim);
    opacity: 0.6;
    margin-bottom: 0.5rem;
}

.empty-text {
    color: var(--text-secondary);
    font-size: 1rem;
    letter-spacing: 0.05em;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-mid);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-text {
    color: var(--accent);
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    animation: blink 1s steps(2) infinite;
}

/* ============================================
   NFT GRID & CARDS
   ============================================ */

.nft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    align-content: start;
}

.nft-card {
    background: var(--bg-card);
    border: 2px solid var(--border-mid);
    padding: 0;
    cursor: grab;
    position: relative;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
    overflow: hidden;
    user-select: none;
}

.nft-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow:
        0 0 0 1px var(--accent),
        0 6px 20px rgba(0, 255, 213, 0.2);
    z-index: 2;
}

.nft-card:active { cursor: grabbing; }

.nft-card.selected {
    border-color: var(--accent-hot);
    box-shadow:
        0 0 0 2px var(--accent-hot),
        0 0 20px var(--accent-hot-glow);
}

.nft-card.selected::before {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: var(--accent-hot);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 3;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    box-shadow: 0 0 10px var(--accent-hot-glow);
}

.nft-card.in-queue {
    opacity: 0.4;
    pointer-events: none;
}

.nft-card.in-queue::after {
    content: 'IN QUEUE';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    color: var(--accent-hot);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.55rem;
    z-index: 3;
}

.nft-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.nft-img-wrap {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--bg-card-hi), var(--bg-deep));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.nft-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, transparent 40%, rgba(255, 255, 255, 0.05) 50%, transparent 60%);
    pointer-events: none;
}

.nft-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: auto;
}

.nft-img-placeholder {
    color: var(--text-dim);
    font-size: 2rem;
    font-family: 'Press Start 2P', monospace;
}

.nft-info {
    padding: 0.5rem 0.6rem;
    border-top: 1px solid var(--border-faint);
    background: var(--bg-card);
}

.nft-name {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 0.15rem;
}

.nft-meta {
    font-size: 0.7rem;
    color: var(--text-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Space Mono', monospace;
}

.nft-rarity-tag {
    position: absolute;
    top: 4px;
    left: 4px;
    background: var(--bg-deep);
    color: var(--accent-gold);
    padding: 2px 6px;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    border: 1px solid var(--accent-gold);
    z-index: 2;
}

/* Queue grid — slightly different styling */
.queue-grid .nft-card {
    border-color: var(--accent-hot);
}

.queue-grid .nft-card .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: var(--accent-warn);
    color: #fff;
    border: none;
    cursor: pointer;
    z-index: 4;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.queue-grid .nft-card .remove-btn:hover { background: #ff7766; }

/* Drop target */
.panel-queue.drop-active {
    background: rgba(255, 0, 170, 0.05);
}
.panel-queue.drop-active .panel-body {
    box-shadow: inset 0 0 30px var(--accent-hot-glow);
}

/* ============================================
   DESTINATION SECTION
   ============================================ */

.destination-section {
    padding: 1rem 1.25rem;
    border-top: 2px solid var(--border-faint);
    background: var(--bg-deep);
}

.dest-label {
    display: block;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.55rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.dest-input-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-deep);
    border: 2px solid var(--border-mid);
    padding: 0.6rem 0.8rem;
    transition: border-color 0.15s;
    margin-bottom: 0.75rem;
}

.dest-input-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.dest-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    outline: none;
    letter-spacing: 0.02em;
}

.dest-input::placeholder { color: var(--text-dim); }

.dest-validator {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.55rem;
    margin-left: 0.5rem;
}

.dest-validator.valid { color: var(--accent-ok); }
.dest-validator.invalid { color: var(--accent-warn); }

.dest-options { font-size: 0.85rem; }

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.checkbox input { display: none; }

.checkbox-mark {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-mid);
    background: var(--bg-deep);
    position: relative;
    transition: all 0.15s;
}

.checkbox input:checked + .checkbox-mark {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox input:checked + .checkbox-mark::after {
    content: '✓';
    position: absolute;
    inset: 0;
    color: var(--bg-deep);
    font-weight: 900;
    text-align: center;
    line-height: 12px;
    font-size: 12px;
}

/* ============================================
   FOOTER
   ============================================ */

.app-footer {
    margin-top: 1rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-panel);
    border: 2px solid var(--border-mid);
    color: var(--text-dim);
    font-size: 0.85rem;
    font-family: 'Space Mono', monospace;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: 0.05em;
}

.separator { color: var(--accent); opacity: 0.5; }

.footer-link {
    color: var(--accent);
    text-decoration: none;
    margin-left: auto;
}

.footer-link:hover { color: var(--accent-hot); }

/* ============================================
   MODAL
   ============================================ */

.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active { display: flex; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 16, 0.85);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-panel);
    border: 2px solid var(--accent);
    width: 100%;
    max-width: 440px;
    box-shadow:
        0 0 0 4px var(--bg-deep),
        0 0 0 6px var(--border-mid),
        0 0 50px var(--accent-glow);
    z-index: 1;
}

.modal-large { max-width: 540px; }

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

.modal-header h3 {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.85rem;
    color: var(--accent);
    letter-spacing: 0.05em;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.2rem 0.6rem;
    transition: color 0.15s;
}

.modal-close:hover { color: var(--accent-warn); }

.modal-body { padding: 1.5rem; }

.wallet-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-faint);
}

.wallet-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 0.75rem;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.65rem;
    cursor: pointer;
    letter-spacing: 0.05em;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
}

.wallet-tab:hover { color: var(--text-primary); }
.wallet-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.wallet-pane { display: none; }
.wallet-pane.active { display: block; text-align: center; }

.qr-frame {
    display: inline-block;
    padding: 1rem;
    background: var(--bg-deep);
    border: 2px solid var(--border-mid);
    margin-bottom: 1rem;
}

.qr-placeholder {
    width: 200px;
    height: 200px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
}

.qr-loading {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    color: var(--text-dim);
    animation: blink 1s steps(2) infinite;
}

.wallet-hint {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.wallet-hint strong { color: var(--accent); }

.wallet-sub {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.demo-warning {
    color: var(--accent-warn);
    background: rgba(255, 85, 68, 0.1);
    border: 1px solid var(--accent-warn);
    padding: 0.7rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.demo-input {
    width: 100%;
    background: var(--bg-deep);
    border: 2px solid var(--border-mid);
    color: var(--text-primary);
    padding: 0.7rem 1rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    outline: none;
    margin-bottom: 1rem;
}

.demo-input:focus { border-color: var(--accent); }

/* Execute modal */
.execute-summary {
    background: var(--bg-deep);
    border: 1px solid var(--border-mid);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border-faint);
}
.summary-row:last-child { border-bottom: none; }

.summary-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.summary-value {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-value.accent { color: var(--accent-hot); }
.summary-value.mono { font-family: 'Space Mono', monospace; font-size: 0.85rem; }

.execute-progress {
    margin-bottom: 1.5rem;
    text-align: center;
}

.exec-status {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    animation: blink 1s steps(2) infinite;
}

.progress-bar {
    width: 100%;
    height: 16px;
    background: var(--bg-deep);
    border: 2px solid var(--border-mid);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hot));
    box-shadow: 0 0 10px var(--accent);
    transition: width 0.3s;
}

.progress-text {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.execute-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ============================================
   TOASTS
   ============================================ */

.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--bg-panel);
    border: 2px solid var(--accent);
    padding: 0.8rem 1.2rem;
    color: var(--text-primary);
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    min-width: 280px;
    box-shadow:
        0 0 0 2px var(--bg-deep),
        4px 4px 0 var(--accent);
    animation: toastIn 0.3s ease-out;
    position: relative;
}

.toast.success { border-color: var(--accent-ok); box-shadow: 0 0 0 2px var(--bg-deep), 4px 4px 0 var(--accent-ok); }
.toast.error { border-color: var(--accent-warn); box-shadow: 0 0 0 2px var(--bg-deep), 4px 4px 0 var(--accent-warn); }
.toast.info { border-color: var(--accent); }

.toast.fade-out {
    animation: toastOut 0.3s ease-in forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    to { opacity: 0; transform: translateX(40px); }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .game-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .transfer-arrow {
        transform: rotate(90deg);
        height: 40px;
    }

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

@media (max-width: 640px) {
    body { font-size: 16px; }
    .app { padding: 0.75rem; }
    .hud { flex-direction: column; gap: 0.75rem; align-items: stretch; }
    .hud-left, .hud-right { justify-content: space-between; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
    .module-tag { display: none; }
    .nft-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
    .panel { min-height: 400px; }
    .search-input { width: 100%; }
    .panel-header { flex-direction: column; align-items: stretch; }
}
