:root {
    --bg-primary: #07090e;
    --bg-secondary: #0d121d;
    --bg-card: rgba(16, 22, 34, 0.75);
    --bg-card-hover: rgba(22, 30, 48, 0.9);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(20, 241, 149, 0.4);
    --sol-purple: #9945ff;
    --sol-green: #14f195;
    --sol-blue: #00c2ff;
    --sol-pink: #f43f5e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: radial-gradient(circle at 15% 15%, rgba(153, 69, 255, 0.12) 0%, transparent 45%),
                radial-gradient(circle at 85% 85%, rgba(20, 241, 149, 0.08) 0%, transparent 45%),
                var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    min-height: 100vh;
    padding-bottom: 60px;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.header {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    background: rgba(7, 9, 14, 0.85);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-badge {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--sol-purple), var(--sol-green));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    box-shadow: 0 0 20px rgba(153, 69, 255, 0.4);
}

.brand-text h1 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, var(--sol-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-text p {
    font-size: 11px;
    color: var(--text-secondary);
}

.header-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mode-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(20, 241, 149, 0.1);
    color: var(--sol-green);
    border: 1px solid rgba(20, 241, 149, 0.25);
}

.mode-pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--sol-green);
    box-shadow: 0 0 8px var(--sol-green);
    animation: pulse 2s infinite;
}

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

/* Nav Tabs */
.tabs-nav {
    display: flex;
    gap: 8px;
    margin: 20px 0 16px 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs-nav::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(153, 69, 255, 0.25), rgba(20, 241, 149, 0.2));
    border-color: rgba(20, 241, 149, 0.4);
    box-shadow: 0 4px 15px rgba(20, 241, 149, 0.15);
}

.tab-content {
    display: none;
    animation: fadeIn 0.25s ease-out;
}

.tab-content.active {
    display: block;
}

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

/* Stat Grid */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    backdrop-filter: blur(12px);
    transition: transform 0.2s, border-color 0.2s;
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.stat-title {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Radar Section */
.radar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.radar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.token-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.token-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.token-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.token-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    background: #1b2333;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.token-meta {
    flex: 1;
    min-width: 0;
}

.token-symbol {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.token-name {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.token-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 12px;
}

.metric-item {
    display: flex;
    flex-direction: column;
}

.metric-label {
    color: var(--text-muted);
    font-size: 11px;
}

.metric-val {
    font-weight: 700;
    color: var(--text-primary);
}

.bot-analysis {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
}

.token-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.btn-trade {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-trade:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-pump {
    background: rgba(20, 241, 149, 0.15);
    border-color: rgba(20, 241, 149, 0.35);
    color: var(--sol-green);
}

.btn-pump:hover {
    background: var(--sol-green);
    color: #000;
    box-shadow: 0 0 12px rgba(20, 241, 149, 0.4);
}

.btn-copy {
    background: rgba(153, 69, 255, 0.15);
    border-color: rgba(153, 69, 255, 0.35);
    color: #d8b4fe;
}

.btn-copy:hover {
    background: var(--sol-purple);
    color: #fff;
    box-shadow: 0 0 12px rgba(153, 69, 255, 0.4);
}

/* General Controls */
.actions-card, .card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, rgba(153, 69, 255, 0.3), rgba(20, 241, 149, 0.25));
    border-color: var(--sol-green);
    color: #fff;
}

.btn-primary:hover {
    box-shadow: 0 0 15px rgba(20, 241, 149, 0.3);
}

/* Console Output */
.console-card {
    background: #06090e;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
}

.console-header {
    background: #0b1019;
    padding: 10px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.console-body {
    padding: 16px;
    max-height: 340px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 12px;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.6;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th {
    text-align: left;
    padding: 10px 12px;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    font-size: 11px;
    text-transform: uppercase;
}

td {
    padding: 11px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.seat-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
}

.badge-chief { background: rgba(153, 69, 255, 0.15); color: #d8b4fe; border: 1px solid rgba(153, 69, 255, 0.3); }
.badge-scout { background: rgba(0, 194, 255, 0.15); color: #7dd3fc; border: 1px solid rgba(0, 194, 255, 0.3); }
.badge-risk { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-sniper { background: rgba(20, 241, 149, 0.15); color: #86efac; border: 1px solid rgba(20, 241, 149, 0.3); }
.badge-exit { background: rgba(245, 158, 11, 0.15); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-default { background: rgba(255, 255, 255, 0.08); color: #cbd5e1; border: 1px solid rgba(255, 255, 255, 0.15); }

/* Toast Notification */
.toast-notice {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    background: #101827;
    color: #fff;
    border: 1px solid var(--sol-green);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    display: none;
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

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

/* Spinner */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .radar-grid {
        grid-template-columns: 1fr;
    }
    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }
}
