:root {
    --bg-color: #000000;
    --card-bg: #111;
    --card-border: #fff;
    --text-primary: #fff;
    --text-inverse: #000;

    /* Acid Palette */
    --acid-green: #ccff00;
    --hot-pink: #ff00ff;
    --cyan: #00ffff;
    --yellow: #ffff00;

    --font-heading: 'Courier New', monospace;
    --font-body: 'Courier New', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    padding: 2rem;
    min-height: 100vh;
    overflow-x: hidden;
    text-transform: uppercase;
    /* YELLING MODE */
}

/* CRT Scanline Overlay */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%,
            rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    border: 2px solid var(--card-border);
    padding: 20px;
    box-shadow: 10px 10px 0px var(--card-border);
    /* Hard Shadow */
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 4px solid var(--card-border);
}

h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    text-shadow: 2px 2px 0px var(--hot-pink), -2px -2px 0px var(--cyan);
    letter-spacing: -2px;
}

.subtitle {
    color: var(--acid-green);
    font-weight: bold;
    background: #000;
}

/* Controls */
.controls {
    display: flex;
    gap: 0;
    /* Connected inputs */
}

input[type="text"] {
    background: #000;
    border: 2px solid #fff;
    color: var(--acid-green);
    padding: 12px;
    width: 350px;
    font-family: inherit;
    font-size: 1.1rem;
    border-right: none;
}

input[type="text"]:focus {
    background: #1a1a1a;
    outline: none;
}

button {
    background: var(--acid-green);
    color: #000;
    border: 2px solid #fff;
    padding: 10px 30px;
    cursor: pointer;
    font-weight: 900;
    font-size: 1.2rem;
    font-family: inherit;
    transition: all 0.1s;
}

button:hover {
    background: var(--hot-pink);
    color: #fff;
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0px #fff;
}

button:active {
    transform: translate(0, 0);
    box-shadow: none;
}

/* Marquee Bar */
.marquee-container {
    background: var(--yellow);
    color: #000;
    font-weight: bold;
    padding: 5px 0;
    margin-bottom: 20px;
    border: 2px solid #fff;
    font-size: 1.1rem;
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #000;
    border: 2px solid #fff;
    padding: 1rem;
    box-shadow: 6px 6px 0px var(--card-border);
    transition: transform 0.2s;
}

.stat-card:nth-child(even) {
    transform: rotate(1deg);
}

.stat-card:nth-child(odd) {
    transform: rotate(-1deg);
}

.stat-card:hover {
    transform: rotate(0deg) scale(1.05);
    background: #111;
    z-index: 10;
}

.stat-title {
    color: #fff;
    background: #000;
    display: inline-block;
    padding: 2px 5px;
    margin-bottom: 5px;
    font-size: 0.9rem;
    border: 1px solid #fff;
}

.stat-value {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -1px;
}

.text-green {
    color: var(--acid-green);
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.2);
}

.text-red {
    color: var(--hot-pink);
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.2);
}

/* Main Grid */
.main-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.section-box {
    background: #000;
    border: 2px solid #fff;
    padding: 0;
    height: 100%;
    box-shadow: 8px 8px 0px var(--cyan);
}

.section-header {
    background: #fff;
    color: #000;
    padding: 10px;
    border-bottom: 2px solid #fff;
}

.section-title {
    font-weight: 900;
    font-size: 1.2rem;
}

/* Lists */
.token-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    /* Tight packing */
    max-height: 400px;
    overflow-y: auto;
    background: #000;
}

.list-row {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #333;
    transition: all 0.1s;
    cursor: crosshair;
}

.list-row:hover {
    background: var(--acid-green);
    color: #000;
}

.list-row:hover .text-green,
.list-row:hover .text-red {
    color: #000;
    text-shadow: none;
    font-weight: 900;
}

.symbol-col {
    font-weight: 900;
}

.pnl-col {
    font-family: inherit;
}

/* Table */
.data-table-container {
    background: #000;
    border: 2px solid #fff;
    box-shadow: -8px 8px 0px var(--hot-pink);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    background: #111;
    color: var(--cyan);
    padding: 15px;
    border-bottom: 2px solid #fff;
    font-weight: bold;
}

td {
    padding: 15px;
    border-bottom: 1px solid #333;
    font-weight: bold;
}

tr:hover {
    background: var(--hot-pink);
    color: #fff;
}

tr:hover td span,
tr:hover td {
    color: #fff !important;
    /* Force white on hover */
    text-shadow: 2px 2px 0px #000;
}

/* Helpers */
.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.dim {
    color: #666;
    font-size: 0.8rem;
}

/* Chart */
.chart-container {
    position: relative;
    height: 320px;
    width: 100%;
    background: #000;
    padding: 10px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #000;
    border-left: 1px solid #fff;
}

::-webkit-scrollbar-thumb {
    background: var(--acid-green);
    border: 2px solid #000;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--hot-pink);
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinning {
    display: inline-block;
    animation: spin 0.5s linear infinite;
    /* Faster spin for chaos */
}

/* Share Card Template (Hidden by default, rendered by JS) */
.share-card-container {
    position: fixed;
    left: -9999px;
    top: 0;
    width: 1000px;
    /* Horizontal / Landscape */
    height: 600px;
    background-color: #050505;
    /* Cyber Grid Background */
    background-image:
        linear-gradient(rgba(204, 255, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(204, 255, 0, 0.05) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, rgba(204, 255, 0, 0.15), transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(255, 0, 255, 0.15), transparent 40%);
    background-size: 50px 50px, 50px 50px, 100% 100%, 100% 100%;
    border: 12px solid #fff;
    padding: 50px;
    display: flex;
    justify-content: space-between;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    color: #fff;
    z-index: 10000;
}

.share-card-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.9);
    pointer-events: none;
    z-index: 1;
}

/* Left Column: Branding + Big PnL */
.share-body {
    display: flex;
    /* Override previous column layout */
    width: 100%;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.share-left {
    flex: 6;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.share-right {
    flex: 4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    border-left: 4px solid rgba(255, 255, 255, 0.2);
    padding-left: 40px;
}

.share-header h1 {
    font-size: 3.5rem;
    line-height: 1;
    text-shadow: 4px 4px 0px var(--hot-pink);
    margin-bottom: 5px;
}

.share-header p {
    color: var(--acid-green);
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.share-stat {
    text-align: left;
    margin: 0;
}

.share-stat .label {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: #888;
}

.share-stat .value {
    font-size: 6rem;
    font-weight: 900;
    color: var(--acid-green);
    text-shadow: 6px 6px 0px #fff;
    line-height: 0.9;
}

.share-row {
    width: 100%;
    margin-bottom: 30px;
    border: none;
    padding: 0;
}

.share-row div {
    text-align: right;
    margin-bottom: 20px;
}

.share-row .label {
    font-size: 1rem;
    color: #888;
    display: block;
}

.share-row .val {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
}

.wallet-badge {
    background: #111;
    color: var(--cyan);
    padding: 10px 20px;
    border: 2px solid var(--cyan);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    align-self: flex-start;
}

.share-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    margin: 0;
}

.qrcode-box {
    background: #fff;
    padding: 10px;
    border: 4px solid var(--acid-green);
}

.scan-me {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--hot-pink);
}