/* ═══════════════════════════════════════════
   HashWars — Cyberpunk Theme
   Standalone. No Bootstrap, no jQuery.
   ═══════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
    --bg-darkest: #0a0a14;
    --bg-darker: #0e0e1a;
    --bg-dark: #121220;
    --bg-medium: #181828;
    --bg-light: #1e1e30;

    --text-bright: #ffffff;
    --text-primary: #e8f0fa;
    --text-secondary: #b0c4dc;
    --text-muted: #7a8aa4;

    --neon-green: #00ff9d;
    --neon-blue: #00a8ff;
    --neon-cyan: #00e4ff;
    --neon-purple: #6e00ff;
    --neon-magenta: #ff00e4;
    --neon-yellow: #ffcc00;
    --neon-red: #ff3366;

    --gradient-primary: linear-gradient(135deg, var(--neon-green) 0%, var(--neon-cyan) 100%);
    --gradient-danger: linear-gradient(135deg, var(--neon-red) 0%, var(--neon-magenta) 100%);

    --glow-green: 0 0 10px rgba(0, 255, 157, 0.7), 0 0 20px rgba(0, 255, 157, 0.4);
    --glow-blue: 0 0 10px rgba(0, 168, 255, 0.7), 0 0 20px rgba(0, 168, 255, 0.4);

    --border-bright: 1px solid rgba(0, 255, 157, 0.5);
    --border-medium: 1px solid rgba(0, 255, 157, 0.3);
    --border-subtle: 1px solid rgba(0, 255, 157, 0.15);

    --header-height: 48px;
    --sidebar-width: 220px;
    --right-panel-width: 280px;
    --base-font-size: 13px;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg-darkest);
    color: var(--text-primary);
    font-family: 'Chakra Petch', sans-serif;
    font-size: var(--base-font-size);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}
h1 { font-size: calc(var(--base-font-size) * 2 * 1.25); }
h2 { font-size: calc(var(--base-font-size) * 1.8 * 1.25); }
h3 { font-size: calc(var(--base-font-size) * 1.6 * 1.25); }
a { color: var(--neon-green); text-decoration: none; }
a:hover { text-shadow: var(--glow-green); }

.mono { font-family: 'Share Tech Mono', monospace; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--neon-green); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--neon-cyan); }

/* ── Buttons ── */
.btn, button, input[type="submit"] {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg-medium);
    color: var(--text-primary);
    border: 1px solid var(--neon-green);
    padding: 8px 20px;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 5px rgba(0, 255, 157, 0.1);
}
.btn:hover, button:hover { background: rgba(0, 255, 157, 0.05); box-shadow: 0 0 10px rgba(0, 255, 157, 0.2); transform: translateY(-1px); }
.btn:active, button:active { transform: translateY(0); }
.btn:disabled, button:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--gradient-primary); color: var(--bg-darkest); border: none; font-weight: 700; }
.btn-primary:hover { color: var(--bg-darkest); box-shadow: var(--glow-green); }
.btn-danger { border-color: var(--neon-red); color: #ff8fa3; }
.btn-danger:hover { background: rgba(255, 51, 102, 0.1); }
.btn-sm { padding: 4px 12px; font-size: 0.8rem; }
.btn-lg { padding: 10px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ── Forms ── */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; margin-bottom: 0.25rem; font-size: 0.85rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }
.form-input {
    width: 100%; padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 157, 0.3);
    border-radius: 4px;
    color: var(--text-bright);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.95rem;
}
.form-input:focus { outline: none; border-color: var(--neon-green); box-shadow: var(--glow-green); }

/* ── Cards ── */
.card {
    background: rgba(8, 8, 16, 0.7);
    border: var(--border-subtle);
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.05), transparent);
    z-index: 0; pointer-events: none;
}
.card > * { position: relative; z-index: 1; }
.card-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1rem; padding-bottom: 0.75rem;
    border-bottom: var(--border-subtle);
}
.card-title {
    font-family: 'Syncopate', sans-serif;
    font-size: 1rem;
    color: var(--neon-green);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ── Grid ── */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ── Layout ── */
.header-bar {
    position: fixed; top: 0; left: 0; width: 100%;
    height: var(--header-height);
    background: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    border-bottom: var(--border-subtle);
}
.logo-link {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none;
}
.logo-img {
    width: 28px; height: 28px;
    filter: drop-shadow(0 0 6px rgba(0, 255, 157, 0.6));
}
.logo-text {
    font-family: 'Syncopate', sans-serif;
    font-size: 1.3rem; font-weight: 700;
    color: var(--neon-green);
    text-shadow: var(--glow-green);
    letter-spacing: 3px;
}

.sidebar {
    position: fixed; top: var(--header-height); left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: rgba(14, 14, 26, 0.9);
    backdrop-filter: blur(10px);
    border-right: var(--border-medium);
    z-index: 900;
    display: flex; flex-direction: column;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-section { padding: 0.5rem 0; }
.nav-section-title {
    font-family: 'Syncopate', sans-serif;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 0.5rem 1.5rem;
    margin-top: 0.5rem;
}
.nav-list { list-style: none; padding: 0; }
.nav-item { margin: 0.15rem 0; }
.nav-link {
    display: flex; align-items: center;
    padding: 0.7rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}
.nav-link i { width: 24px; margin-right: 10px; text-align: center; }
.nav-link:hover { color: var(--text-bright); background: rgba(0, 255, 157, 0.05); }
.nav-link.active { color: var(--neon-green); border-left-color: var(--neon-green); background: rgba(0, 255, 157, 0.1); }

.main-content {
    margin-left: var(--sidebar-width);
    margin-right: var(--right-panel-width);
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    padding: 2rem;
    position: relative; z-index: 1;
}

.right-panel {
    position: fixed; top: var(--header-height); right: 0;
    width: var(--right-panel-width);
    height: calc(100vh - var(--header-height));
    background: rgba(14, 14, 26, 0.9);
    backdrop-filter: blur(10px);
    border-left: var(--border-medium);
    z-index: 900;
    padding: 1.5rem;
    overflow-y: auto;
}

.panel-section { margin-bottom: 1.5rem; }
.panel-title {
    font-family: 'Syncopate', sans-serif;
    font-size: 0.85rem;
    color: var(--neon-green);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex; align-items: center;
}
.panel-title i { margin-right: 0.5rem; }

/* ── Player Stats (right panel) ── */
.user-profile { text-align: center; padding-bottom: 1rem; border-bottom: var(--border-subtle); margin-bottom: 1rem; }
.username { font-size: 1.2rem; font-weight: 700; color: var(--text-bright); }
.rank-badge {
    display: inline-block;
    background: var(--gradient-primary);
    color: var(--bg-darkest);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 2px 10px;
    border-radius: 10px;
    margin-top: 0.25rem;
}

.stat-row { display: flex; justify-content: space-between; align-items: center; margin: 0.5rem 0; }
.stat-icon { width: 20px; text-align: center; margin-right: 8px; }
.stat-name { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; flex: 1; }
.stat-val { font-family: 'Share Tech Mono', monospace; font-size: 0.9rem; font-weight: 700; color: var(--neon-cyan); }

.progress-bar {
    height: 5px; background: rgba(0, 0, 0, 0.3);
    border-radius: 2px; overflow: hidden;
    margin-top: 2px;
}
.progress-fill { height: 100%; transition: width 0.3s ease; }
.progress-green { background: var(--neon-green); }
.progress-blue { background: var(--neon-blue); }
.progress-purple { background: var(--neon-purple); }
.progress-cyan { background: var(--neon-cyan); }
.progress-red { background: var(--neon-red); }

/* ── Wallet balances ── */
.balance-row { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: var(--border-subtle); }
.balance-row:last-child { border-bottom: none; }
.balance-label { color: var(--text-muted); font-size: 0.8rem; }
.balance-value { font-family: 'Share Tech Mono', monospace; font-weight: 700; color: var(--neon-cyan); }

/* ── Info list (right panel) ── */
.info-item {
    background: rgba(12, 12, 24, 0.6);
    border: var(--border-subtle);
    border-radius: 4px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}
.info-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.info-value { font-family: 'Share Tech Mono', monospace; font-size: 1.1rem; font-weight: 600; color: var(--neon-green); }

/* ── Network load ── */
.network-bar {
    height: 20px; background: rgba(0,0,0,0.3);
    border-radius: 3px; overflow: hidden;
    border: 1px solid rgba(0, 255, 157, 0.2);
    margin: 0.5rem 0;
}
.network-fill {
    height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; transition: width 0.5s;
}
.network-low { background: var(--neon-green); color: var(--bg-darkest); }
.network-med { background: var(--neon-yellow); color: var(--bg-darkest); }
.network-high { background: var(--neon-red); color: var(--text-bright); }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.5rem; }

/* ── Terminal ── */
.terminal {
    background: #0a0a12;
    border: var(--border-bright);
    border-radius: 4px;
    box-shadow: var(--glow-green);
    font-family: 'Share Tech Mono', monospace;
    display: flex; flex-direction: column;
    height: calc(100vh - var(--header-height) - 4rem);
}
.terminal-bar {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 12px;
    background: rgba(0,0,0,0.4);
    border-bottom: var(--border-subtle);
}
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #28c840; }
.terminal-title { flex: 1; text-align: center; font-size: 0.8rem; color: var(--text-muted); }

.terminal-body { flex: 1; padding: 1rem; overflow-y: auto; font-size: 0.9rem; line-height: 1.6; }
.terminal-input-row { display: flex; align-items: center; padding: 8px 12px; border-top: var(--border-subtle); }
.terminal-prompt { color: var(--neon-green); margin-right: 8px; }
.terminal-input {
    flex: 1; background: transparent; border: none; color: var(--text-bright);
    font-family: 'Share Tech Mono', monospace; font-size: 0.9rem;
    outline: none;
}

.log-entry { margin-bottom: 2px; }
.log-time { color: var(--text-muted); font-size: 0.75rem; }
.log-success { color: var(--neon-green); }
.log-error { color: var(--neon-red); }
.log-warn { color: var(--neon-yellow); }
.log-info { color: var(--neon-cyan); }

/* ── Recon / Targets ── */
.recon-bar { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem; border-top: var(--border-subtle); }
.target-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.75rem; padding: 0.75rem; }
.target-card {
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid rgba(0, 255, 157, 0.3);
    border-radius: 4px;
    padding: 0.75rem;
    transition: all 0.2s;
}
.target-card:hover { border-color: var(--neon-green); box-shadow: 0 0 8px rgba(0, 255, 157, 0.3); }
.target-name { font-weight: 600; color: var(--neon-green); margin-bottom: 0.5rem; }
.target-stats { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 0.5rem; font-size: 0.75rem; }
.target-stat { background: rgba(0, 255, 157, 0.1); padding: 2px 6px; border-radius: 2px; }
.target-footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; }
.target-reward { color: var(--neon-yellow); }
.target-rate { color: var(--neon-cyan); }

/* ── Tabs ── */
.tabs { display: flex; gap: 0; border-bottom: var(--border-subtle); margin-bottom: 1rem; }
.tab {
    padding: 0.5rem 1rem; cursor: pointer;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    font-size: 0.85rem;
    text-transform: uppercase;
}
.tab:hover { color: var(--text-bright); }
.tab.active { color: var(--neon-green); border-bottom-color: var(--neon-green); }

/* ── Shop / Items ── */
.item-card {
    background: rgba(12, 12, 24, 0.6);
    border: var(--border-subtle);
    border-radius: 4px;
    padding: 1rem;
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 0.5rem;
}
.item-name { font-weight: 600; }
.item-desc { font-size: 0.8rem; color: var(--text-muted); }
.item-cost { font-family: 'Share Tech Mono', monospace; color: var(--neon-yellow); }
.item-owned { font-size: 0.75rem; color: var(--text-muted); }

/* ── Alerts ── */
.alert { padding: 0.75rem 1rem; border-radius: 4px; margin-bottom: 1rem; }
.alert-success { background: rgba(0, 255, 157, 0.1); border: 1px solid var(--neon-green); color: var(--neon-green); }
.alert-error { background: rgba(255, 51, 102, 0.1); border: 1px solid var(--neon-red); color: var(--neon-red); }
.alert-info { background: rgba(0, 168, 255, 0.1); border: 1px solid var(--neon-blue); color: var(--neon-cyan); }

/* ── Landing page ── */
.hero { text-align: center; padding: 4rem 2rem; }
.hero h1 { font-size: 3rem; color: var(--neon-green); text-shadow: var(--glow-green); }
.hero p { font-size: 1.1rem; color: var(--text-secondary); max-width: 600px; margin: 1rem auto; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; margin-top: 2rem; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; max-width: 900px; margin: 0 auto; padding: 2rem; }
.feature-card { text-align: center; padding: 1.5rem; }
.feature-card i { font-size: 2rem; color: var(--neon-green); margin-bottom: 1rem; }
.feature-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.85rem; color: var(--text-muted); }
@media (max-width: 768px) { .features { grid-template-columns: 1fr; } .hero h1 { font-size: 2rem; } }

/* ── Effects ── */
@keyframes pulse { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.pulse { animation: pulse 2s infinite; }
.fade-in { animation: fadeIn 0.3s ease; }

.scan-lines {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(to bottom, transparent 0, transparent 1px, rgba(0,0,0,0.05) 1px, rgba(0,0,0,0.05) 2px);
    pointer-events: none; z-index: 0; opacity: 0.15;
}

/* ── htmx indicators ── */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline; }
.htmx-request.btn { opacity: 0.6; pointer-events: none; }

/* ── Responsive ── */
@media (max-width: 1200px) { :root { --sidebar-width: 200px; --right-panel-width: 250px; } }
@media (max-width: 992px) {
    :root { --right-panel-width: 0; }
    .right-panel { transform: translateX(100%); }
    .main-content { margin-right: 0; }
    .terminal { height: calc(100vh - var(--header-height) - 2rem); }
    .network-bar { height: 16px; }
}
@media (max-width: 768px) {
    :root { --sidebar-width: 0; --base-font-size: 12px; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); width: 280px; z-index: 901; }
    .main-content { margin-left: 0; padding: 1rem; }
    .hero { padding: 2rem 1rem; }
    .hero h1 { font-size: 1.8rem; }
    .card { padding: 1rem; }
    .wallet-grid { grid-template-columns: 1fr; }
    .target-grid { grid-template-columns: 1fr; }
    .item-card { flex-wrap: wrap; gap: 0.5rem; }
    .recon-bar { flex-wrap: wrap; gap: 0.5rem; }
    .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
    .tab { white-space: nowrap; font-size: 0.75rem; padding: 0.5rem 0.75rem; }
    .terminal-input-row { padding: 6px 8px; }
    .terminal-input { font-size: 0.85rem; }
    .terminal-body { font-size: 0.8rem; padding: 0.75rem; }
    .logo-text { font-size: 1rem; }
    .logo-img { width: 22px; height: 22px; }
    .header-bar { height: 42px; }
    :root { --header-height: 42px; }
    .btn, button { padding: 6px 14px; font-size: 0.8rem; }
    .btn-lg { padding: 8px 20px; font-size: 0.9rem; }
}
@media (max-width: 480px) {
    :root { --base-font-size: 11px; }
    .main-content { padding: 0.75rem; }
    .terminal { height: calc(100vh - var(--header-height) - 0.5rem); border-radius: 0; border-width: 1px 0; }
    .terminal-body { max-height: 40vh; }
    .target-grid { grid-template-columns: 1fr; gap: 0.5rem; }
    .target-card { padding: 0.5rem; }
    .target-stats { gap: 0.15rem; }
    .target-stat { font-size: 0.65rem; padding: 2px 4px; }
    .grid-3 { grid-template-columns: 1fr; }
    .card { padding: 0.75rem; margin-bottom: 0.5rem; }
    .hero h1 { font-size: 1.4rem; }
    .hero p { font-size: 0.9rem; }
    .hero-actions { flex-direction: column; gap: 0.5rem; }
    .features { padding: 1rem; }
    .form-input { font-size: 0.9rem; padding: 6px 10px; }
    .tabs { gap: 0; }
    .tab { padding: 0.4rem 0.6rem; font-size: 0.7rem; }
}

.mobile-toggle {
    position: fixed; top: 10px; left: 10px; z-index: 1001;
    width: 36px; height: 36px;
    background: rgba(8,8,16,0.9);
    border: var(--border-bright);
    border-radius: 4px;
    color: var(--neon-green);
    font-size: 1rem;
    cursor: pointer;
    display: none;
    align-items: center; justify-content: center;
}
@media (max-width: 768px) { .mobile-toggle { display: flex; } }

/* ---------- Toasts ---------- */
#toast-container {
    position: fixed; top: 70px; right: 20px; z-index: 9999;
    display: flex; flex-direction: column; gap: 0.5rem; max-width: 340px;
}
.toast {
    padding: 0.75rem 1rem; border-radius: 4px; font-size: 0.85rem;
    background: var(--bg-panel, rgba(15, 15, 30, 0.95));
    transform: translateX(120%);
    transition: transform 0.3s ease;
    border: 1px solid var(--neon-green); color: var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}
.toast.show { transform: translateX(0); }
.toast-error { border-color: var(--neon-red); color: var(--neon-red); }
.toast-info { border-color: var(--neon-blue); color: var(--neon-cyan); }

/* ---------- Glitch (failure feedback) ---------- */
@keyframes glitch {
    0%, 100% { transform: translate(0); text-shadow: none; }
    25% { transform: translate(-2px, 1px); text-shadow: -2px 0 #f0f, 2px 0 #0ff; }
    50% { transform: translate(2px, -1px); text-shadow: 2px 0 #f0f, -2px 0 #0ff; }
    75% { transform: translate(-1px, -1px); text-shadow: -1px 0 #f0f, 1px 0 #0ff; }
}
.glitch { animation: glitch 0.2s steps(2) 1; }

/* ---------- Staggered card reveal ---------- */
@keyframes card-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}
.stagger-in { opacity: 0; animation: card-in 0.25s ease forwards; animation-delay: calc(var(--i, 0) * 60ms); }

/* ---------- Boot overlay ---------- */
#boot-overlay {
    position: fixed; inset: 0; z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-darkest, #0a0a14);
    transition: opacity 0.5s ease;
    font-family: 'Share Tech Mono', monospace;
}
#boot-overlay.done { opacity: 0; pointer-events: none; }
#boot-text { color: var(--neon-green); font-size: 1.2rem; letter-spacing: 0.15em; }

/* ---------- Gas regen ---------- */
.gas-regen { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }
.gas-regen span { color: var(--neon-cyan); }

/* ---------- Focus visibility ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, .tab:focus-visible {
    outline: 1px solid var(--neon-green); outline-offset: 2px;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .toast { transition: none; }
    .glitch, .stagger-in, .pulse, .fade-in { animation: none !important; opacity: 1 !important; }
    .progress-fill, .network-fill { transition: none; }
}

/* ---------- Network load pulse (approaching crash) ---------- */
@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 51, 102, 0.3); }
    50% { box-shadow: 0 0 20px rgba(255, 51, 102, 0.8); }
}
.network-pulse { animation: pulse-red 1s infinite; }

@media (prefers-reduced-motion: reduce) {
    .network-pulse { animation: none !important; }
}

/* ---------- Terminal v2 ---------- */
.ascii-banner {
    color: var(--neon-green); font-size: 0.9rem; line-height: 1.2;
    margin: 0 0 0.5rem 0; opacity: 0.8; user-select: none;
}
.term-scan-timer { margin-left: auto; font-size: 0.75rem; color: var(--neon-cyan); }
.term-scan-timer::before { content: 'SCAN '; color: var(--text-muted); }
.scan-urgent { color: var(--neon-yellow); animation: pulse 1s infinite; }

.delta-up { color: var(--neon-green); font-size: 0.7rem; }
.delta-down { color: var(--neon-red); font-size: 0.7rem; }

#new-entries-pill {
    display: none; position: absolute; bottom: 60px; right: 20px; z-index: 10;
    padding: 3px 12px; border-radius: 12px; font-size: 0.75rem;
    background: var(--neon-green); color: var(--bg-darkest); border: none; cursor: pointer;
}
#new-entries-pill.show { display: block; }
.terminal-body { position: relative; }

@keyframes gold-flash {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 12px rgba(255, 215, 0, 0.7); border-left: 3px solid gold; }
}
.gold-flash { animation: gold-flash 0.8s ease 2; }

.particle {
    position: absolute; bottom: 0; color: gold; font-size: 0.8rem;
    pointer-events: none; animation: float-up 1.2s ease-out forwards;
}
@keyframes float-up {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-40px); }
}
.log-entry { position: relative; }

/* ---------- Terminal-native target rows ---------- */
#targets-section {
    margin-top: 0.5rem; padding-top: 0.5rem;
    border-top: 1px dashed rgba(0, 255, 157, 0.2);
    font-family: 'Share Tech Mono', monospace;
}
.targets-header, .targets-empty { color: var(--text-muted); font-size: 0.8rem; padding: 0.25rem 0; }
.target-row {
    display: grid;
    grid-template-columns: 70px minmax(90px, 1fr) 50px 70px 1.6fr auto;
    gap: 0.6rem; align-items: center;
    padding: 2px 4px; font-size: 0.8rem; cursor: pointer; border-radius: 3px;
}
.target-row:hover { background: rgba(0, 255, 157, 0.06); }
.tr-action { color: var(--neon-red); font-weight: 700; }
.tr-name { color: var(--neon-green); font-weight: 600; }
.tr-rate { color: var(--neon-cyan); }
.tr-reward { color: var(--neon-yellow); }
.tr-stats { color: var(--text-muted); font-size: 0.72rem; white-space: nowrap; overflow: hidden; }
.tr-stat { margin-right: 0.5rem; }
.tr-stat .delta-up, .tr-stat .delta-down { margin-left: 2px; }
@media (max-width: 768px) {
    .target-row { grid-template-columns: 55px 1fr 45px 60px auto; }
    .tr-stats { display: none; }
}
