/* ============================================================
   style.css — Memecoin Insider Bot Design System
   Premium dark theme with glassmorphism & neon accents
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ─── Design Tokens ──────────────────────────────────────── */
:root {
    /* Core palette */
    --bg-primary: #06060e;
    --bg-secondary: #0c0c1a;
    --bg-tertiary: #111128;
    --bg-card: rgba(12, 12, 26, 0.75);
    --bg-card-hover: rgba(18, 18, 40, 0.85);
    --bg-glass: rgba(16, 16, 36, 0.55);
    --bg-input: rgba(20, 20, 44, 0.8);

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(0, 240, 255, 0.25);
    --border-active: rgba(0, 240, 255, 0.5);

    /* Text */
    --text-primary: #e8e8f0;
    --text-secondary: #9d9db8;
    --text-muted: #5c5c7a;
    --text-inverse: #06060e;

    /* Accents */
    --accent-cyan: #00f0ff;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-green: #00ff88;
    --accent-red: #ff3366;
    --accent-orange: #ff8c00;
    --accent-yellow: #ffd700;

    /* Gradients */
    --gradient-brand: linear-gradient(135deg, #00f0ff, #8b5cf6, #ec4899);
    --gradient-green: linear-gradient(135deg, #00ff88, #00d4aa);
    --gradient-red: linear-gradient(135deg, #ff3366, #ff6644);
    --gradient-header: linear-gradient(135deg, #0a0a1a 0%, #111133 50%, #0a0a1a 100%);
    --gradient-card: linear-gradient(145deg, rgba(15,15,35,0.9) 0%, rgba(10,10,25,0.7) 100%);
    --gradient-glow-cyan: radial-gradient(ellipse at center, rgba(0,240,255,0.15) 0%, transparent 70%);
    --gradient-glow-purple: radial-gradient(ellipse at center, rgba(139,92,246,0.1) 0%, transparent 70%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow-cyan: 0 0 20px rgba(0, 240, 255, 0.15);
    --shadow-glow-green: 0 0 20px rgba(0, 255, 136, 0.15);
    --shadow-glow-red: 0 0 20px rgba(255, 51, 102, 0.15);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Z-indexes */
    --z-dropdown: 100;
    --z-modal: 200;
    --z-toast: 300;

    /* Sidebar width */
    --sidebar-width: 340px;
    --watchlist-width: 300px;
}

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

html {
    font-size: 14px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        var(--gradient-glow-cyan),
        var(--gradient-glow-purple);
    background-position: 30% 20%, 70% 80%;
    background-size: 60% 60%, 50% 50%;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
    animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0% { opacity: 0.4; }
    100% { opacity: 0.7; }
}

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ─── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 700; color: var(--text-primary); line-height: 1.2; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 0.95rem; }

.mono { font-family: var(--font-mono); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-cyan { color: var(--accent-cyan); }
.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }
.text-purple { color: var(--accent-purple); }
.text-gradient {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Layout ─────────────────────────────────────────────── */
#app {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(6, 6, 14, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: var(--space-sm) var(--space-lg);
}

.header-inner {
    max-width: 1800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    min-height: 52px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.header-logo .logo-icon {
    font-size: 1.5rem;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.header-logo .logo-text {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.header-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.header-search input {
    width: 100%;
    padding: 8px 14px 8px 36px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    outline: none;
    transition: all 0.25s ease;
}

.header-search input:focus {
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow-glow-cyan);
}

.header-search input::placeholder { color: var(--text-muted); }

.header-search .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.header-stats {
    display: flex;
    gap: var(--space-lg);
    margin-left: auto;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.stat-pill .stat-value {
    color: var(--accent-cyan);
    font-weight: 600;
    font-family: var(--font-mono);
}

.stat-pill.live {
    border-color: rgba(0, 255, 136, 0.3);
}

.stat-pill.live .stat-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0,255,136,0.5); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(0,255,136,0); }
}

/* ─── Main Grid ──────────────────────────────────────────── */
.main-grid {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr var(--watchlist-width);
    gap: 0;
    flex: 1;
    max-width: 1800px;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 1200px) {
    .main-grid {
        grid-template-columns: 300px 1fr;
    }
    .watchlist-panel { display: none; }
}

@media (max-width: 768px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    .scanner-panel { display: none; }
    .header-stats { display: none; }
    .header-search { max-width: 200px; }
}

/* ─── Panel Base ─────────────────────────────────────────── */
.panel {
    border-right: 1px solid var(--border-subtle);
    height: calc(100vh - 53px);
    overflow-y: auto;
    position: sticky;
    top: 53px;
}

.panel:last-child { border-right: none; }

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-md);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    background: rgba(6, 6, 14, 0.9);
    backdrop-filter: blur(12px);
    z-index: 10;
}

.panel-header h3 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.panel-content {
    padding: var(--space-sm);
}

/* ─── Scanner Panel (left) ───────────────────────────────── */
.scanner-panel {
    background: rgba(8, 8, 18, 0.5);
}

.filter-bar {
    display: flex;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--border-subtle);
    flex-wrap: wrap;
}

.filter-chip {
    padding: 3px 10px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-chip:hover { border-color: var(--accent-cyan); color: var(--text-secondary); }
.filter-chip.active {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.sort-select {
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-family: var(--font-sans);
    cursor: pointer;
    outline: none;
}

/* Token list items */
.token-list {
    display: flex;
    flex-direction: column;
}

.token-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px var(--space-md);
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.token-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: background 0.2s;
}

.token-item:hover {
    background: var(--bg-card-hover);
}

.token-item:hover::before {
    background: var(--accent-cyan);
}

.token-item.active {
    background: rgba(0, 240, 255, 0.05);
}

.token-item.active::before {
    background: var(--accent-cyan);
}

.token-item.new-token {
    animation: slideInLeft 0.4s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.token-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.token-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.token-name {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.token-name .symbol {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.75rem;
}

.token-meta {
    display: flex;
    gap: var(--space-sm);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.token-right {
    text-align: right;
    flex-shrink: 0;
}

.token-price {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
}

.token-change {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    margin-top: 2px;
}

.positive { color: var(--accent-green); }
.negative { color: var(--accent-red); }
.neutral { color: var(--text-muted); }

.token-sparkline {
    width: 50px;
    height: 24px;
    flex-shrink: 0;
}

/* Score badge */
.score-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 600;
    font-family: var(--font-mono);
}

.score-moon { background: rgba(0,255,136,0.15); color: var(--accent-green); }
.score-hot { background: rgba(0,240,255,0.15); color: var(--accent-cyan); }
.score-building { background: rgba(255,170,0,0.15); color: var(--accent-orange); }
.score-risky { background: rgba(255,102,68,0.15); color: #ff6644; }
.score-dead { background: rgba(255,51,102,0.15); color: var(--accent-red); }

.boost-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 5px;
    border-radius: var(--radius-full);
    font-size: 0.6rem;
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-purple);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* ─── Detail Panel (center) ──────────────────────────────── */
.detail-panel {
    background: transparent;
    overflow-y: auto;
    border-right: 1px solid var(--border-subtle);
}

.detail-panel .panel-content {
    padding: var(--space-md);
}

.detail-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    gap: var(--space-md);
    padding: var(--space-2xl);
    text-align: center;
}

.detail-empty .empty-icon {
    font-size: 3rem;
    opacity: 0.3;
}

.detail-empty p {
    font-size: 0.9rem;
    max-width: 300px;
}

/* Token header in detail */
.detail-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.detail-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-default);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-icon img { width: 100%; height: 100%; object-fit: cover; }

.detail-title-block { flex: 1; }
.detail-title {
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.detail-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: 2px;
}

.detail-subtitle .address {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
    transition: color 0.2s;
}

.detail-subtitle .address:hover { color: var(--accent-cyan); }

.detail-price-block {
    text-align: right;
}

.detail-price {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
}

.detail-price-change {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Chart container */
.chart-container {
    width: 100%;
    height: 350px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    margin-bottom: var(--space-lg);
    position: relative;
    background: var(--bg-secondary);
}

.chart-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.chart-container .chart-overlay {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    display: flex;
    gap: var(--space-xs);
    z-index: 5;
}

.chart-timeframe {
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-sans);
    backdrop-filter: blur(8px);
}

.chart-timeframe:hover, .chart-timeframe.active {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* Score cards row */
.score-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

@media (max-width: 900px) {
    .score-cards { grid-template-columns: repeat(2, 1fr); }
}

.score-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.score-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--card-accent, var(--accent-cyan));
    opacity: 0.5;
}

.score-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.score-card-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-sm);
}

.score-card-value {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-mono);
    line-height: 1;
}

.score-card-grade {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: var(--space-xs);
}

.score-ring {
    width: 60px;
    height: 60px;
    position: relative;
    margin: 0 auto var(--space-sm);
}

.score-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-ring-bg {
    fill: none;
    stroke: var(--border-subtle);
    stroke-width: 4;
}

.score-ring-fill {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.score-ring-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.85rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

/* ─── Info Sections ──────────────────────────────────────── */
.info-section {
    margin-bottom: var(--space-lg);
}

.info-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-sm);
}

.info-item {
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    backdrop-filter: blur(8px);
}

.info-item-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.info-item-value {
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-mono);
    margin-top: 2px;
}

/* Safety flags */
.flag-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.flag-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

.flag-item.flag-positive {
    background: rgba(0, 255, 136, 0.08);
    color: var(--accent-green);
    border-left: 2px solid var(--accent-green);
}

.flag-item.flag-negative {
    background: rgba(255, 51, 102, 0.08);
    color: var(--accent-red);
    border-left: 2px solid var(--accent-red);
}

/* Social links */
.social-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.social-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 8px 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    backdrop-filter: blur(8px);
    transition: all 0.2s;
}

.social-item:hover {
    border-color: var(--border-hover);
}

.social-item-icon {
    font-size: 1.1rem;
    width: 28px;
    text-align: center;
}

.social-item-info { flex: 1; }

.social-item-platform {
    font-size: 0.8rem;
    font-weight: 600;
}

.social-item-handle {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.social-item a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-size: 0.75rem;
    transition: opacity 0.2s;
}

.social-item a:hover { opacity: 0.8; }

.social-item-score {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Hype signals */
.signal-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.signal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

.signal-item.signal-positive {
    background: rgba(0, 240, 255, 0.06);
    border-left: 2px solid var(--accent-cyan);
}

.signal-item.signal-negative {
    background: rgba(255, 51, 102, 0.06);
    border-left: 2px solid var(--accent-red);
}

.signal-text { font-weight: 500; }
.signal-value {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ─── Watchlist Panel (right) ────────────────────────────── */
.watchlist-panel {
    background: rgba(8, 8, 18, 0.5);
}

.watchlist-empty {
    text-align: center;
    padding: var(--space-2xl) var(--space-md);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.watchlist-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 8px var(--space-md);
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: background 0.2s;
}

.watchlist-item:hover { background: var(--bg-card-hover); }

.watchlist-actions {
    display: flex;
    gap: var(--space-xs);
}

/* Webhook section in watchlist */
.webhook-section {
    border-top: 1px solid var(--border-subtle);
    padding: var(--space-md);
    margin-top: var(--space-md);
}

.webhook-log {
    max-height: 200px;
    overflow-y: auto;
}

.webhook-log-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.75rem;
}

.webhook-log-item .log-status {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.webhook-log-item .log-status.success { background: var(--accent-green); }
.webhook-log-item .log-status.failure { background: var(--accent-red); }

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-glass);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    white-space: nowrap;
}

.btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-sm { padding: 4px 10px; font-size: 0.7rem; border-radius: var(--radius-sm); }

.btn-primary {
    background: rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.3);
    color: var(--accent-cyan);
}

.btn-primary:hover {
    background: rgba(0, 240, 255, 0.2);
    box-shadow: var(--shadow-glow-cyan);
}

.btn-success {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
    color: var(--accent-green);
}

.btn-danger {
    background: rgba(255, 51, 102, 0.1);
    border-color: rgba(255, 51, 102, 0.3);
    color: var(--accent-red);
}

.btn-icon {
    padding: 6px;
    border-radius: var(--radius-sm);
    min-width: 30px;
    justify-content: center;
}

/* ─── Modal ──────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
    padding: var(--space-lg);
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    max-width: 520px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

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

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

.modal-header h2 { font-size: 1.1rem; }

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px;
    transition: color 0.2s;
}

.modal-close:hover { color: var(--text-primary); }

.modal-body {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--border-subtle);
}

/* ─── Form Elements ──────────────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-input, .form-select {
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus {
    border-color: var(--accent-cyan);
}

.form-input::placeholder { color: var(--text-muted); }

.form-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

/* Toggle switch */
.toggle {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
}

.toggle-input { display: none; }

.toggle-slider {
    width: 36px;
    height: 20px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    position: relative;
    transition: all 0.25s;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.25s;
}

.toggle-input:checked + .toggle-slider {
    background: rgba(0, 240, 255, 0.2);
    border-color: var(--accent-cyan);
}

.toggle-input:checked + .toggle-slider::after {
    transform: translateX(16px);
    background: var(--accent-cyan);
}

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

/* ─── Toast Notifications ────────────────────────────────── */
#toast-container {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column-reverse;
    gap: var(--space-sm);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: auto;
    max-width: 360px;
    font-size: 0.85rem;
}

.toast-show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success { border-left: 3px solid var(--accent-green); }
.toast-error { border-left: 3px solid var(--accent-red); }
.toast-warning { border-left: 3px solid var(--accent-orange); }
.toast-info { border-left: 3px solid var(--accent-cyan); }

.toast-icon { font-size: 1rem; flex-shrink: 0; }
.toast-message { color: var(--text-primary); }

/* ─── Loading States ─────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg,
        var(--bg-tertiary) 25%,
        rgba(255,255,255,0.05) 50%,
        var(--bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-text { height: 14px; width: 80%; }
.skeleton-text.short { width: 50%; }
.skeleton-circle { width: 32px; height: 32px; border-radius: 50%; }

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-subtle);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ─── Dev Wallet Section ─────────────────────────────────── */
.dev-history {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.dev-token {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    font-size: 0.8rem;
}

.dev-token.dead {
    opacity: 0.5;
    border-left: 2px solid var(--accent-red);
}

.dev-token.alive {
    border-left: 2px solid var(--accent-green);
}

/* ─── Market Data Grid ───────────────────────────────────── */
.market-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
}

@media (max-width: 900px) {
    .market-grid { grid-template-columns: repeat(2, 1fr); }
}

.market-item {
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px var(--space-md);
    backdrop-filter: blur(8px);
}

.market-item-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.market-item-value {
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-mono);
}

/* ─── Buy/Sell Pressure Bar ──────────────────────────────── */
.pressure-bar {
    display: flex;
    height: 6px;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: var(--bg-tertiary);
    margin-top: var(--space-xs);
}

.pressure-buy {
    background: var(--accent-green);
    transition: width 0.5s ease;
}

.pressure-sell {
    background: var(--accent-red);
    transition: width 0.5s ease;
}

.pressure-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ─── Quick Action Bar (detail panel) ────────────────────── */
.quick-actions {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

/* ─── Empty/Loading States ───────────────────────────────── */
.scanner-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    gap: var(--space-md);
    color: var(--text-muted);
}

.scanner-loading .loading-text {
    font-size: 0.85rem;
    animation: fadeInOut 2s ease-in-out infinite;
}

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

/* ─── Responsive tweaks ──────────────────────────────────── */
@media (max-width: 768px) {
    .header-inner { gap: var(--space-sm); }
    .header-logo .logo-text { display: none; }
    .score-cards { grid-template-columns: 1fr 1fr; }
    .chart-container { height: 250px; }
    .market-grid { grid-template-columns: 1fr 1fr; }
}
