/* ============================================================================
   GabaScalp Bot Dashboard - Cyberpunk Theme
   Modern, Futuristic, Professional
   ============================================================================ */

:root {
    /* Cyberpunk Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a26;
    --bg-card: #16161f;
    
    /* Neon Accents */
    --neon-blue: #00d9ff;
    --neon-purple: #bd00ff;
    --neon-pink: #ff006e;
    --neon-green: #00ff88;
    --neon-orange: #ff6b35;
    
    /* Gradients */
    --gradient-blue: linear-gradient(135deg, #00d9ff 0%, #0066ff 100%);
    --gradient-purple: linear-gradient(135deg, #bd00ff 0%, #6b00ff 100%);
    --gradient-pink: linear-gradient(135deg, #ff006e 0%, #ff0099 100%);
    --gradient-green: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;
    --text-muted: #6b6b7f;
    
    /* Status Colors */
    --success: #00ff88;
    --danger: #ff006e;
    --warning: #ffaa00;
    --info: #00d9ff;
    
    /* Shadows & Glows */
    --glow-blue: 0 0 20px rgba(0, 217, 255, 0.5);
    --glow-purple: 0 0 20px rgba(189, 0, 255, 0.5);
    --glow-pink: 0 0 20px rgba(255, 0, 110, 0.5);
    --glow-green: 0 0 20px rgba(0, 255, 136, 0.5);
    
    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================================================
   Base Styles
   ============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ============================================================================
   Animated Background
   ============================================================================ */

.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--neon-blue) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--neon-purple) 0%, transparent 70%);
    top: 50%;
    right: -150px;
    animation-delay: 5s;
}

.orb-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--neon-pink) 0%, transparent 70%);
    bottom: -200px;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-30px, 30px) scale(0.9);
    }
}

/* ============================================================================
   Container
   ============================================================================ */

.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* ============================================================================
   Header
   ============================================================================ */

.header {
    background: var(--bg-card);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 16px;
    padding: 0.75rem 1.5rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.version {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--success);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.status-badge.offline {
    background: rgba(255, 0, 110, 0.1);
    border-color: var(--danger);
}

.status-badge.offline .status-indicator {
    background: var(--danger);
}

.wallet-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition-smooth);
}

.wallet-info:hover {
    border-color: var(--neon-blue);
    background: rgba(0, 217, 255, 0.1);
    box-shadow: var(--glow-blue);
    cursor: pointer;
}

.refresh-btn {
    width: 40px;
    height: 40px;
    background: var(--gradient-blue);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition-fast);
    box-shadow: var(--glow-blue);
}

.refresh-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.8);
}

.refresh-btn:active {
    transform: scale(0.95);
}

.refresh-btn i {
    animation: none;
}

.refresh-btn.spinning i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================================
   Notifications
   ============================================================================ */

.notifications-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
}

.notification {
    background: var(--bg-card);
    border-left: 4px solid var(--info);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: slideIn 0.3s ease;
    backdrop-filter: blur(10px);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    border-left-color: var(--success);
}

.notification.error {
    border-left-color: var(--danger);
}

.notification.warning {
    border-left-color: var(--warning);
}

.notification-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.notification-message {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ============================================================================
   Metrics Grid
   ============================================================================ */

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

/* Wide metric card (spans 2 columns) */
.metric-card-wide {
    grid-column: span 2;
}

.metric-content-wide {
    flex: 1;
}

.metric-content-wide .metric-label {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0.5rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.config-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
}

.config-value {
    font-size: 0.7rem;
    color: var(--text-primary);
    font-weight: 700;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.05));
    opacity: 0;
    transition: var(--transition-smooth);
}

.metric-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 217, 255, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.metric-card:hover::before {
    opacity: 1;
}

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.metric-icon.blue {
    background: var(--gradient-blue);
    box-shadow: var(--glow-blue);
}

.metric-icon.purple {
    background: var(--gradient-purple);
    box-shadow: var(--glow-purple);
}

.metric-icon.green {
    background: var(--gradient-green);
    box-shadow: var(--glow-green);
}

.metric-icon.pink {
    background: var(--gradient-pink);
    box-shadow: var(--glow-pink);
}

.metric-icon.orange {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c35 100%);
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

.metric-icon.teal {
    background: linear-gradient(135deg, #00d9ff 0%, #00ff88 100%);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

.metric-icon.success {
    background: var(--gradient-green);
    box-shadow: var(--glow-green);
}

.metric-icon.danger {
    background: var(--gradient-pink);
    box-shadow: var(--glow-pink);
}

.metric-content {
    flex: 1;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, var(--text-primary), var(--neon-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.metric-change {
    font-size: 0.875rem;
    font-weight: 600;
}

.metric-change.positive {
    color: var(--success);
}

.metric-change.negative {
    color: var(--danger);
}

/* ============================================================================
   Charts Section
   ============================================================================ */

.charts-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    transition: var(--transition-smooth);
}

.chart-large {
    grid-column: span 2;
}

.chart-card:hover {
    border-color: rgba(0, 217, 255, 0.3);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-header h3 i {
    color: var(--neon-blue);
}

.timeframe-select {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.timeframe-select:hover {
    border-color: var(--neon-blue);
}

.chart-container {
    position: relative;
    height: 300px;
}

/* ============================================================================
   Sections & Cards
   ============================================================================ */

.positions-section,
.market-prices-section,
.activity-section {
    margin-bottom: 2rem;
}

.section-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header h3 i {
    color: var(--neon-purple);
}

.position-summary {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--success);
    font-size: 0.875rem;
    font-weight: 600;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        box-shadow: 0 0 0 0 var(--success);
    }
    50% {
        box-shadow: 0 0 0 10px transparent;
    }
}

/* ============================================================================
   Tables
   ============================================================================ */

.table-container {
    overflow-x: auto;
}

.positions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.positions-table thead {
    background: var(--bg-secondary);
    border-radius: 8px;
}

.positions-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.positions-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-fast);
}

.positions-table tbody tr:hover {
    background: rgba(0, 217, 255, 0.05);
}

.positions-table td {
    padding: 1rem;
}

.token-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.token-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
}

.side-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
    min-width: 75px;
    text-align: center;
}

.side-badge.yes {
    background: rgba(0, 255, 136, 0.15);
    color: var(--success);
    border: 1px solid var(--success);
}

.side-badge.no {
    background: rgba(255, 0, 110, 0.15);
    color: var(--danger);
    border: 1px solid var(--danger);
}

/* Balanced = equal UP/DOWN exposure (hedged) */
.side-badge.bal {
    background: rgba(189, 0, 255, 0.15);
    color: var(--neon-purple, #bd00ff);
    border: 1px solid var(--neon-purple, #bd00ff);
}

.side-badge.trade {
    background: rgba(0, 217, 255, 0.15);
    color: var(--neon-blue);
    border: 1px solid var(--neon-blue);
}

.exit-badge {
    display: inline-block;
    padding: 0.2em 0.5em;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}
.exit-badge.pre {
    background: rgba(255, 107, 53, 0.25);
    color: var(--neon-orange);
    border: 1px solid rgba(255, 107, 53, 0.5);
}
.exit-badge.end {
    background: rgba(0, 217, 255, 0.2);
    color: var(--neon-blue);
    border: 1px solid rgba(0, 217, 255, 0.4);
}

/* VNZY: Genome Mode badges (Conservative / Normal / Aggressive) */
.badge.genome-mode {
    display: inline-block;
    padding: 0.2em 0.5em;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge.genome-mode.genome-conservative {
    background: rgba(0, 217, 255, 0.2);
    color: var(--neon-blue);
    border: 1px solid rgba(0, 217, 255, 0.4);
}
.badge.genome-mode.genome-normal {
    background: rgba(189, 0, 255, 0.2);
    color: var(--neon-purple, #bd00ff);
    border: 1px solid rgba(189, 0, 255, 0.4);
}
.badge.genome-mode.genome-aggressive {
    background: rgba(0, 255, 136, 0.2);
    color: var(--success);
    border: 1px solid rgba(0, 255, 136, 0.4);
}
.genome-mode-cell { vertical-align: middle; }

.badge-success { background: rgba(0, 255, 136, 0.2); color: var(--success); border: 1px solid rgba(0, 255, 136, 0.4); padding: 0.2em 0.5em; border-radius: 6px; font-size: 0.75rem; font-weight: 600; }
.badge-danger { background: rgba(255, 0, 110, 0.2); color: var(--danger); border: 1px solid rgba(255, 0, 110, 0.4); padding: 0.2em 0.5em; border-radius: 6px; font-size: 0.75rem; font-weight: 600; }

/* TA & Indicator Context panel */
.ta-indicators-panel { padding: 0.5rem 0; }
.ta-indicators-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; margin-bottom: 0.5rem; }
.ta-indicator-card { background: var(--bg-tertiary); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 0.75rem; display: flex; flex-direction: column; gap: 0.25rem; }
.ta-indicator-card .ta-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.ta-indicator-card .ta-value { font-size: 1rem; font-weight: 600; color: var(--neon-blue); }

.exit-price-cell {
    white-space: nowrap;
    font-size: 0.8125rem;
}
.exit-price-cell .exit-badge { margin-right: 0.35rem; }
.side-badge.n\/a {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* V4 Confidence mode badges */
.mode-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}
.mode-badge.offensive {
    background: rgba(0, 255, 136, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}
.mode-badge.defensive {
    background: rgba(0, 217, 255, 0.2);
    color: var(--info);
    border: 1px solid var(--info);
}
.mode-badge.cautious {
    background: rgba(255, 107, 53, 0.2);
    color: var(--neon-orange);
    border: 1px solid var(--neon-orange);
}

.pnl-positive {
    color: var(--success);
    font-weight: 600;
}

.pnl-negative {
    color: var(--danger);
    font-weight: 600;
}

.pnl-neutral {
    color: var(--text-secondary);
    font-weight: 500;
}

.pnl-warning {
    color: var(--warning);
    font-weight: 600;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state p {
    margin-top: 1rem;
}

/* ============================================================================
   Market Prices Grid
   ============================================================================ */

.market-prices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.market-price-card {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    transition: var(--transition-smooth);
    font-size: 0.8125rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.market-price-header-text { min-width: 0; }
.price-target-box {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.price-box-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
    gap: 0.5rem;
    font-size: 0.75rem;
}
.price-box-row .price-label { color: var(--text-secondary); flex-shrink: 0; }
.price-box-row .price-value { font-weight: 600; text-align: right; word-break: break-word; }
.price-box-quality-mode .price-box-row { padding: 0.35rem 0; }
.price-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
}
.price-grid-2col .price-cell {
    padding: 0.35rem 0;
    border-top: none;
}
.price-grid-2col .price-label { font-size: 0.75rem; }
.price-grid-2col .price-value { font-size: 0.8125rem; }
.quality-cell .quality-badge {
    display: inline-block;
    padding: 0.2em 0.5em;
    border-radius: 6px;
    background: rgba(0, 255, 136, 0.15);
    color: var(--neon-green);
    border: 1px solid rgba(0, 255, 136, 0.35);
}
.mode-cell .mode-badge.offensive {
    background: rgba(0, 255, 136, 0.2);
    color: var(--neon-green);
}
.mode-cell .mode-badge.defensive {
    background: rgba(0, 217, 255, 0.2);
    color: var(--neon-blue);
}
.mode-cell .mode-badge.cautious {
    background: rgba(255, 107, 53, 0.2);
    color: var(--neon-orange);
}
.market-price-header-compact { margin-bottom: 0.75rem; }
.market-price-header-compact .market-token-name { font-size: 1rem; }
.market-price-header-compact .market-token-type { font-size: 0.7rem; }
.prob-up { color: var(--neon-green); }
.prob-down { color: var(--neon-pink); }
.delta-positive { color: var(--neon-green); }
.delta-negative { color: var(--neon-pink); }

.market-price-card:hover {
    border-color: var(--neon-blue);
    transform: translateY(-2px);
}

.market-price-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.market-token-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.market-token-name {
    font-weight: 700;
    font-size: 1.125rem;
}

.market-token-type {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.price-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.price-value {
    font-weight: 700;
}

.price-value.yes {
    color: var(--success);
}

.price-value.no {
    color: var(--danger);
}

.price-value.strike {
    color: var(--neon-gold);
    font-size: 1.1rem;
    font-weight: 800;
}

/* ============================================================================
   Activity List
   ============================================================================ */

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: var(--transition-fast);
}

.activity-item:hover {
    border-color: rgba(0, 217, 255, 0.3);
    background: var(--bg-tertiary);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.blue {
    background: rgba(0, 217, 255, 0.15);
    color: var(--neon-blue);
}

.activity-icon.green {
    background: rgba(0, 255, 136, 0.15);
    color: var(--success);
}

.activity-icon.red {
    background: rgba(255, 0, 110, 0.15);
    color: var(--danger);
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.activity-time {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ============================================================================
   Footer
   ============================================================================ */

.footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.separator {
    margin: 0 0.5rem;
    opacity: 0.5;
}

/* ============================================================================
   Buttons
   ============================================================================ */

.filter-btn {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--neon-blue);
    background: var(--bg-tertiary);
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media (max-width: 1024px) {
    .charts-section {
        grid-template-columns: 1fr;
    }
}

/* Mobile styles moved to comprehensive responsive section at end of file */

/* ============================================================================
   Scrollbar Styling
   ============================================================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--neon-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-purple);
}

/* ============================================================================
   Trade History Section
   ============================================================================ */

.trade-history-section {
    margin-bottom: 2rem;
}

.history-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-select {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-select:hover {
    border-color: var(--neon-blue);
}

.group-by-market-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    white-space: nowrap;
}
.group-by-market-cb {
    cursor: pointer;
}

.export-btn {
    background: var(--gradient-blue);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
    box-shadow: var(--glow-blue);
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.8);
}

.trade-stats-bar {
    display: flex;
    gap: 2rem;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-value.success {
    color: var(--success);
}

.stat-value.negative {
    color: var(--danger);
}

.trades-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.trades-table thead {
    background: var(--bg-secondary);
    border-radius: 8px;
}

.trades-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.trades-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-fast);
}

.trades-table tbody tr:hover {
    background: rgba(0, 217, 255, 0.05);
}

.trades-table td {
    padding: 1rem;
}

.token-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.page-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--neon-blue);
    background: var(--bg-tertiary);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Chart adjustments */
.chart-large {
    grid-column: span 2;
}

.charts-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1400px) {
    .chart-large {
        grid-column: span 3;
    }
    
    .charts-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .chart-large {
        grid-column: span 1;
    }
}

/* ============================================================================
   Improved History Stats Cards
   ============================================================================ */

.history-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0;
}

.history-stat-card {
    background: var(--bg-tertiary);
    border: 1px solid rgba(0, 217, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition-smooth);
}

.history-stat-card:hover {
    border-color: var(--neon-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.1);
}

.history-stat-card .stat-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.history-stat-card .stat-icon.blue {
    background: rgba(0, 217, 255, 0.1);
    color: var(--neon-blue);
}

.history-stat-card .stat-icon.green {
    background: rgba(0, 255, 136, 0.1);
    color: var(--neon-green);
}

.history-stat-card .stat-icon.purple {
    background: rgba(189, 0, 255, 0.1);
    color: var(--neon-purple);
}

.history-stat-card .stat-icon.success {
    background: rgba(0, 255, 136, 0.1);
    color: var(--success);
}

.history-stat-card .stat-icon.danger {
    background: rgba(255, 0, 110, 0.1);
    color: var(--danger);
}

.history-stat-card .stat-content {
    flex: 1;
    min-width: 0;
}

.history-stat-card .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
    display: block;
}

.history-stat-card .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-stat-card .stat-value.success {
    color: var(--success);
}

.history-stat-card .stat-value.negative {
    color: var(--danger);
}

/* ============================================================================
   Market Prices Section
   ============================================================================ */

.alerts-controls-section .section-card {
    margin-bottom: 1.5rem;
}
.alerts-feed {
    min-height: 2rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}
.alert-feed-item {
    padding: 0.35rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}
.alert-feed-item i {
    color: var(--text-secondary);
    width: 1rem;
    text-align: center;
}
.alert-feed-item .status-dot.success { color: var(--neon-green); }
.alert-feed-item .status-dot.muted { color: var(--text-muted); }
.alert-feed-time {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.controls-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.control-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 217, 255, 0.3);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
}
.control-btn:hover {
    background: rgba(0, 217, 255, 0.1);
}

.trade-history-enhanced-section .section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}
.trade-history-enhanced-section .export-btn {
    margin-left: auto;
}
.enhanced-summary {
    padding: 0.75rem;
    margin-bottom: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-size: 0.875rem;
}
.enhanced-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}
.enhanced-metric-card {
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
}
.enhanced-metric-card.mode-cautious { border-color: rgba(255, 107, 53, 0.4); }
.enhanced-metric-card.mode-defensive { border-color: rgba(0, 217, 255, 0.4); }
.enhanced-metric-card.mode-offensive { border-color: rgba(0, 255, 136, 0.4); }
.enhanced-metric-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.enhanced-metric-icon {
    font-size: 1.1rem;
    opacity: 0.9;
}
.enhanced-metric-card.mode-cautious .enhanced-metric-icon { color: var(--neon-orange); }
.enhanced-metric-card.mode-defensive .enhanced-metric-icon { color: var(--neon-blue); }
.enhanced-metric-card.mode-offensive .enhanced-metric-icon { color: var(--neon-green); }
.enhanced-metric-title {
    font-weight: 700;
    font-size: 1rem;
}
.enhanced-metric-box {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.enhanced-metric-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    padding: 0.3rem 0;
}
.per-crypto-block {
    margin-bottom: 1.5rem;
}
.per-crypto-block h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}
.per-crypto-block .enhanced-table {
    font-size: 0.8rem;
}

/* V4 Trades Analyzer tabs */
.tabs-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.tab-btn {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.875rem;
    transition: var(--transition-smooth);
}
.tab-btn:hover {
    border-color: var(--color-primary);
    background: rgba(0,217,255,0.1);
}
.tab-btn.active {
    border-color: var(--color-primary);
    background: rgba(0,217,255,0.2);
    color: var(--color-primary);
}
.tab-panel {
    margin-top: 0.5rem;
}
.analyzer-buckets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.analyzer-bucket {
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
}
.analyzer-bucket .bucket-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}
.analyzer-bucket .bucket-value {
    font-weight: 600;
    color: var(--color-primary);
}
.analyzer-bucket .bucket-count {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.market-prices-section {
    margin-bottom: 2rem;
}

.market-prices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

/* ============================================================================
   Crypto Performance Analysis Section
   ============================================================================ */

.crypto-performance-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-subtitle {
    font-size: 0.813rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-weight: 400;
}

.crypto-stats-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    transition: var(--transition-smooth);
}

.crypto-stats-card:hover {
    border-color: rgba(0, 217, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.crypto-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.crypto-performance-card {
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.25rem;
    transition: var(--transition-smooth);
}

.crypto-performance-card:hover {
    border-color: rgba(0, 217, 255, 0.2);
    transform: translateY(-2px);
}

.crypto-performance-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.crypto-performance-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.crypto-performance-header .crypto-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.crypto-performance-stats {
    display: grid;
    gap: 0.75rem;
}

.crypto-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.crypto-stat-row:last-child {
    border-bottom: none;
}

.crypto-stat-label {
    font-size: 0.813rem;
    color: var(--text-muted);
}

.crypto-stat-value {
    font-size: 0.938rem;
    font-weight: 600;
    color: var(--text-primary);
}

.crypto-stat-value.positive {
    color: var(--success);
}

.crypto-stat-value.negative {
    color: var(--danger);
}

.crypto-winrate {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.crypto-winrate-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.crypto-winrate-fill {
    height: 100%;
    background: var(--gradient-green);
    transition: width var(--transition-smooth);
}

@media (max-width: 1200px) {
    .crypto-performance-section {
        grid-template-columns: 1fr;
    }
    
    .crypto-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .crypto-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .history-stats-cards {
        grid-template-columns: 1fr;
    }
    
    /* ========== MOBILE OPTIMIZATIONS ========== */
    
    /* Container & Layout */
    .container {
        padding: 0.5rem;
    }
    
    /* Header */
    .header {
        padding: 0.75rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .logo-text h1 {
        font-size: 1.25rem;
    }
    
    /* Metrics Grid */
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .metric-card {
        padding: 0.75rem;
    }
    
    .metric-card-wide {
        grid-column: span 1;
    }
    
    .config-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .metric-value {
        font-size: 1.25rem;
    }
    
    .metric-label {
        font-size: 0.7rem;
    }
    
    /* Charts */
    .charts-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .chart-large {
        grid-column: span 1;
    }
    
    .chart-container {
        height: 250px;
    }
    
    /* Sections */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .section-header h3 {
        font-size: 1.125rem;
    }
    
    /* Trade History Controls */
    .history-controls {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filter-select, .export-btn {
        width: 100%;
    }
    
    /* Tables */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .trades-table, .positions-table {
        min-width: 800px;
        font-size: 0.813rem;
    }
    
    .trades-table th, .positions-table th {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    .trades-table td, .positions-table td {
        padding: 0.5rem;
    }
    
    /* Market Prices */
    .market-prices-grid {
        grid-template-columns: 1fr;
    }
    
    /* Analytics Sections */
    .chart-stats-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .chart-container-split {
        height: 250px;
    }
    
    .analytics-stats {
        grid-template-columns: 1fr;
    }
    
    .analytics-stat-card {
        padding: 1rem;
    }
    
    /* Risk Metrics */
    .risk-metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .risk-metric-card {
        padding: 1.25rem;
    }
    
    .risk-metric-value {
        font-size: 1.75rem;
    }
    
    /* Crypto Performance */
    .crypto-performance-section-solo .crypto-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .crypto-performance-card {
        padding: 1rem;
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        font-size: 0.813rem;
    }
    
    /* Notifications */
    .notification {
        max-width: 90%;
    }
}

/* ============================================================================
   Tablet Optimizations (769px - 1024px)
   ============================================================================ */

/* Tablet styles moved to comprehensive responsive section at end of file */

/* ============================================================================
   Small Mobile (< 400px)
   ============================================================================ */

/* Small mobile styles moved to comprehensive responsive section at end of file */

/* ============================================================================
   Crypto Performance Solo Section
   ============================================================================ */

.crypto-performance-section-solo {
    margin-bottom: 2rem;
}

.crypto-performance-section-solo .section-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
}

.section-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.crypto-performance-section-solo .crypto-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* ============================================================================
   Method #1 Analytics Section
   ============================================================================ */

.method1-analytics-section {
    margin-bottom: 2rem;
}

.method1-analytics-section .section-card {
    background: var(--bg-card);
    border: 1px solid rgba(0, 217, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    transition: var(--transition-smooth);
}

.method1-analytics-section .section-card:hover {
    border-color: rgba(0, 217, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 217, 255, 0.1);
}

.method1-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.method1-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.method1-card:hover {
    border-color: rgba(0, 217, 255, 0.4);
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.15);
    transform: translateY(-2px);
}

.method1-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.token-info {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.token-logo-small {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.token-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.token-price {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.method1-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.method1-score-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1) 0%, rgba(0, 217, 255, 0.05) 100%);
    border-radius: 8px;
    border: 1px solid rgba(0, 217, 255, 0.2);
    margin-bottom: 0.5rem;
}

.score-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.score-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.score-min {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

.method1-signal-components {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.signal-component {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    font-size: 0.8125rem;
}

.component-label {
    color: var(--text-secondary);
    font-weight: 500;
    flex: 1;
}

.component-value {
    color: var(--text-primary);
    font-weight: 600;
    flex: 1.5;
    text-align: center;
    font-size: 0.75rem;
}

.component-points {
    color: var(--color-orange);
    font-weight: 700;
    font-size: 0.75rem;
    min-width: 40px;
    text-align: right;
}

.method1-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.method1-stat .stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.method1-stat .stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.method1-stat .stat-value.oversold {
    color: var(--color-success);
}

.method1-stat .stat-value.overbought {
    color: var(--color-danger);
}

.method1-stat .stat-value.neutral {
    color: var(--text-secondary);
}

.method1-stat .stat-value.spike {
    color: var(--color-orange);
}

.method1-signals {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ============================================================================
   Dynamic Locking Status Section
   ============================================================================ */

.dynamic-locking-section {
    margin-bottom: 2rem;
}

.dynamic-locking-section .section-card {
    background: var(--bg-card);
    border: 1px solid rgba(189, 0, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    transition: var(--transition-smooth);
}

.dynamic-locking-section .section-card:hover {
    border-color: rgba(189, 0, 255, 0.3);
    box-shadow: 0 8px 32px rgba(189, 0, 255, 0.1);
}

.locking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.locking-card {
    background: linear-gradient(135deg, rgba(189, 0, 255, 0.05) 0%, rgba(0, 217, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.locking-card:hover {
    border-color: rgba(189, 0, 255, 0.4);
    box-shadow: 0 4px 20px rgba(189, 0, 255, 0.15);
    transform: translateY(-2px);
}

.locking-card.locked {
    border-color: rgba(0, 255, 136, 0.4);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05) 0%, rgba(0, 217, 255, 0.05) 100%);
}

.locking-card.hold-mode {
    border-color: rgba(255, 200, 0, 0.4);
    background: linear-gradient(135deg, rgba(255, 200, 0, 0.05) 0%, rgba(189, 0, 255, 0.05) 100%);
}

.locking-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.locking-market-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.locking-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.locking-status-badge.locked {
    background: rgba(0, 255, 136, 0.2);
    color: var(--neon-green);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.locking-status-badge.hold-mode {
    background: rgba(255, 200, 0, 0.2);
    color: #ffc800;
    border: 1px solid rgba(255, 200, 0, 0.3);
}

.locking-status-badge.chasing {
    background: rgba(189, 0, 255, 0.2);
    color: var(--neon-purple);
    border: 1px solid rgba(189, 0, 255, 0.3);
}

.locking-status-badge.not-locked {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.locking-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.locking-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.locking-stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.locking-stat-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.locking-stat-value.positive {
    color: var(--neon-green);
}

.locking-stat-value.negative {
    color: var(--neon-pink);
}

.locking-stat-value.warning {
    color: #ffc800;
}

.locking-placeholder {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

.signal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.signal-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.signal-status {
    font-size: 0.875rem;
    font-weight: 600;
}

.signal-status.allowed {
    color: var(--color-success);
}

.signal-status.blocked {
    color: var(--text-muted);
}

.method1-legend {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.method1-legend .legend-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.method1-legend .legend-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.method1-legend .legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-dot.oversold {
    background: var(--color-success);
    box-shadow: 0 0 8px var(--color-success);
}

.legend-dot.overbought {
    background: var(--color-danger);
    box-shadow: 0 0 8px var(--color-danger);
}

.legend-dot.preferred {
    background: var(--color-success);
    box-shadow: 0 0 8px var(--color-success);
}

.legend-dot.limited {
    background: var(--color-orange);
    box-shadow: 0 0 8px var(--color-orange);
}

.legend-icon {
    font-size: 1rem;
}

/* ============================================================================
   Market Distribution Section with Stats
   ============================================================================ */

.market-distribution-section {
    margin-bottom: 2rem;
}

.market-distribution-section .section-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    transition: var(--transition-smooth);
}

.market-distribution-section .section-card:hover {
    border-color: rgba(0, 217, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.distribution-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* Compact Chart Section */
.compact-section {
    margin-bottom: 2rem;
}

.compact-section .chart-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    transition: var(--transition-smooth);
}

.compact-section .chart-card:hover {
    border-color: rgba(0, 217, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.chart-container-compact {
    max-width: 400px;
    margin: 1.5rem auto 0;
    height: 250px;
    position: relative;
}

.chart-container-compact canvas {
    max-height: 250px;
}

.chart-with-stats {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    transition: var(--transition-smooth);
}

.chart-with-stats:hover {
    border-color: rgba(0, 217, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.chart-stats-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    margin-top: 1rem;
}

.chart-container-split {
    height: 300px;
    position: relative;
}

.distribution-stats {
    display: grid;
    gap: 1rem;
}

.distribution-stat-card {
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition-smooth);
}

.distribution-stat-card:hover {
    border-color: rgba(0, 217, 255, 0.2);
    transform: translateX(4px);
}
.distribution-stat-card.has-shares {
    border-color: rgba(0, 255, 136, 0.4);
    background: rgba(0, 255, 136, 0.08);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.15);
}

.distribution-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.distribution-stat-icon img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.distribution-stat-content {
    flex: 1;
}

.distribution-stat-name {
    font-size: 0.938rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.distribution-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.distribution-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.distribution-stat-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.distribution-stat-value.positive {
    color: var(--success);
}

.distribution-stat-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.distribution-stat-fill {
    height: 100%;
    transition: width var(--transition-smooth);
}

/* ============================================================================
   Analytics Sections with Stats
   ============================================================================ */

.analytics-section {
    margin-bottom: 2rem;
}

.analytics-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.analytics-stat-card {
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.25rem;
    transition: var(--transition-smooth);
}

.analytics-stat-card:hover {
    border-color: rgba(0, 217, 255, 0.2);
    transform: translateY(-2px);
}

.analytics-stat-card .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.analytics-stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.analytics-stat-card .stat-value.positive {
    color: var(--success);
}

.analytics-stat-card .stat-value.negative {
    color: var(--danger);
}

.analytics-stat-card .stat-sublabel {
    font-size: 0.813rem;
    color: var(--text-secondary);
}

/* ============================================================================
   Risk Metrics Section
   ============================================================================ */

.risk-metrics-section {
    margin-bottom: 2rem;
}

.risk-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.risk-metric-card {
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: var(--transition-smooth);
}

.risk-metric-card:hover {
    border-color: rgba(0, 217, 255, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.risk-metric-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.risk-metric-icon.blue {
    background: rgba(0, 217, 255, 0.1);
    color: var(--neon-blue);
}

.risk-metric-icon.green {
    background: rgba(0, 255, 136, 0.1);
    color: var(--neon-green);
}

.risk-metric-icon.success {
    background: rgba(0, 255, 136, 0.1);
    color: var(--success);
}

.risk-metric-icon.danger {
    background: rgba(255, 0, 110, 0.1);
    color: var(--danger);
}

.risk-metric-icon.purple {
    background: rgba(189, 0, 255, 0.1);
    color: var(--neon-purple);
}

.risk-metric-icon.orange {
    background: rgba(255, 107, 53, 0.1);
    color: var(--neon-orange);
}

.risk-metric-content {
    flex: 1;
    min-width: 0;
}

.risk-metric-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.risk-metric-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.risk-metric-desc {
    font-size: 0.813rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.risk-metric-rating {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    background: rgba(0, 217, 255, 0.1);
    color: var(--neon-blue);
}

/* ============================================================================
   Responsive Design Enhancements
   ============================================================================ */

@media (max-width: 768px) {
    /* Compact chart for mobile */
    .chart-container-compact {
        max-width: 100%;
        height: 250px;
    }
    
    .chart-container-compact canvas {
        max-height: 250px;
    }
    
    /* Distribution stats */
    .distribution-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    /* Compact section adjustments */
    .compact-section .chart-card {
        padding: 1rem;
    }
    
    .compact-section .chart-header h3 {
        font-size: 1.1rem;
    }
}

/* ============================================================================
   MOBILE & TABLET RESPONSIVE IMPROVEMENTS
   Professional, Optimized for Small Screens
   ============================================================================ */

/* ========== TABLET (768px - 1024px) ========== */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 1.5rem;
    }
    
    /* Metrics - 4 columns on tablet */
    .metrics-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
    
    /* Charts - single column on tablet */
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .chart-large {
        grid-column: span 1;
    }
    
    /* Analytics stats - 2 columns */
    .analytics-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* History stats - 3 columns */
    .history-stats-cards {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Crypto stats - 2 columns */
    .crypto-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Risk metrics - 2 columns */
    .risk-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== MOBILE (Up to 768px) ========== */
@media (max-width: 768px) {
    /* ===== CONTAINER & GLOBAL SPACING ===== */
    .container {
        padding: 0.75rem;
        max-width: 100%;
    }
    
    section {
        margin-bottom: 1.25rem;
    }
    
    /* ===== HEADER OPTIMIZATION ===== */
    .header {
        padding: 0.75rem;
        margin-bottom: 1rem;
        border-radius: 12px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .header-left, 
    .header-right {
        width: 100%;
    }
    
    .header-right {
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    /* Smaller logo text */
    .logo-text h1 {
        font-size: 1.25rem;
        line-height: 1.2;
    }
    
    .version {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
    }
    
    /* Compact header buttons */
    .status-badge {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
        flex: 1;
        min-width: 100px;
    }
    
    .status-indicator {
        width: 6px;
        height: 6px;
    }
    
    .wallet-info {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
        flex: 1;
        min-width: 100px;
        text-align: center;
    }
    
    .refresh-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        width: auto;
    }
    
    /* ===== KEY METRICS - 2x2 GRID ===== */
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
        margin-bottom: 1rem;
    }
    
    .metric-card {
        padding: 0.75rem;
        border-radius: 10px;
        min-height: auto;
    }
    
    /* Wide cards (Bot Config, etc.) - full width on mobile */
    .metric-card-wide {
        grid-column: span 2;
    }
    
    /* Config grid - single column for readability */
    .config-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    /* Smaller icons */
    .metric-icon {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    /* Compact text */
    .metric-label {
        font-size: 0.65rem;
        margin-bottom: 0.25rem;
        font-weight: 500;
    }
    
    .metric-value {
        font-size: 1.15rem;
        margin-bottom: 0.125rem;
        line-height: 1.2;
    }
    
    .metric-change {
        font-size: 0.65rem;
    }
    
    /* ===== CHART CARDS ===== */
    .chart-card {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .chart-header h3 {
        font-size: 1rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .chart-header h3 i {
        font-size: 0.9rem;
    }
    
    .chart-subtitle {
        font-size: 0.7rem;
        margin-top: 0.25rem;
    }
    
    .chart-controls {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .chart-controls select {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
        width: 100%;
    }
    
    /* ===== PERFORMANCE OVERVIEW & CHARTS ===== */
    .charts-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .chart-container {
        height: 220px;
    }
    
    .chart-container canvas {
        max-height: 220px;
    }
    
    /* ===== ANALYTICS SECTIONS (PROBLEM AREAS) ===== */
    .analytics-section {
        margin-bottom: 1.25rem;
    }
    
    /* Fix: Chart-stats layout - stack vertically */
    .chart-stats-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .chart-container-split {
        height: 200px;
        width: 100%;
    }
    
    /* Fix: Analytics stats - 2x2 grid for compact display */
    .analytics-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
    }
    
    .analytics-stat-card {
        padding: 0.75rem;
        border-radius: 10px;
    }
    
    .stat-label {
        font-size: 0.65rem;
        margin-bottom: 0.375rem;
    }
    
    .stat-value {
        font-size: 1.1rem;
        margin-bottom: 0.125rem;
    }
    
    .stat-sublabel {
        font-size: 0.6rem;
    }
    
    /* ===== LIVE POSITIONS TABLE ===== */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 0.75rem;
        min-width: 600px;
    }
    
    th, td {
        padding: 0.5rem 0.375rem;
    }
    
    .token-cell {
        gap: 0.375rem;
    }
    
    .token-logo {
        width: 18px;
        height: 18px;
    }
    
    .side-badge {
        padding: 0.25rem 0.5rem;
        font-size: 0.65rem;
    }
    
    /* ===== TRADE HISTORY ===== */
    .history-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .trade-filters {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.7rem;
        flex: 1;
        min-width: 70px;
    }
    
    .history-stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
    }
    
    .history-stat-card {
        padding: 0.75rem;
    }
    
    .history-stat-label {
        font-size: 0.65rem;
    }
    
    .history-stat-value {
        font-size: 1rem;
    }
    
    /* ===== PAGINATION ===== */
    .pagination-controls {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .pagination-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .pagination-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    /* ===== MARKET PRICES ===== */
    .market-prices-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .market-price-card {
        padding: 0.875rem;
    }
    
    .price-grid-2col {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }
    
    .exit-badge { font-size: 0.65rem; padding: 0.15em 0.4em; }
    
    .enhanced-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .enhanced-metric-card { padding: 0.75rem; }
    
    .alerts-feed { max-height: 160px; }
    
    .price-header {
        font-size: 0.75rem;
    }
    
    .price-value {
        font-size: 0.95rem;
    }
    
    .price-change {
        font-size: 0.65rem;
    }
    
    /* ===== CRYPTO PERFORMANCE ===== */
    .crypto-performance-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .crypto-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
    }
    
    .crypto-stat-card {
        padding: 0.75rem;
    }
    
    .crypto-stat-header {
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .crypto-logo {
        width: 24px;
        height: 24px;
    }
    
    .crypto-stat-header h4 {
        font-size: 0.8rem;
    }
    
    /* ===== RISK METRICS ===== */
    .risk-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
    }
    
    .risk-metric-card {
        padding: 0.875rem;
    }
    
    .risk-metric-icon {
        width: 2rem;
        height: 2rem;
        font-size: 0.85rem;
    }
    
    .risk-metric-label {
        font-size: 0.65rem;
    }
    
    .risk-metric-value {
        font-size: 1rem;
    }
    
    .risk-metric-sublabel {
        font-size: 0.6rem;
    }
    
    /* ===== NOTIFICATIONS ===== */
    .notifications-container {
        right: 0.75rem;
        left: 0.75rem;
        top: 0.75rem;
        max-width: none;
    }
    
    .notification {
        padding: 0.75rem;
        font-size: 0.75rem;
        border-radius: 10px;
    }
    
    .notification i {
        font-size: 1rem;
    }
    
    /* ===== DISTRIBUTION STATS ===== */
    .distribution-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .distribution-stat-card {
        padding: 0.75rem;
    }
    
    /* ===== SCROLLBAR - THINNER ON MOBILE ===== */
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
    
    /* ===== HIDE BACKGROUND ORBS ON MOBILE ===== */
    .glow-orb {
        display: none;
    }
}

/* ========== SMALL MOBILE (Up to 480px) ========== */
@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }
    
    /* Even more compact metrics */
    .metrics-grid {
        gap: 0.5rem;
    }
    
    .metric-card {
        padding: 0.625rem;
    }
    
    .metric-icon {
        width: 2rem;
        height: 2rem;
        font-size: 0.85rem;
    }
    
    .metric-label {
        font-size: 0.6rem;
    }
    
    .metric-value {
        font-size: 1rem;
    }
    
    .metric-change {
        font-size: 0.6rem;
    }
    
    /* Header even more compact */
    .logo-text h1 {
        font-size: 1.1rem;
    }
    
    /* Analytics stats still 2x2 but more compact */
    .analytics-stats {
        gap: 0.5rem;
    }
    
    .analytics-stat-card {
        padding: 0.625rem;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    /* Chart heights */
    .chart-container {
        height: 180px;
    }
    
    .chart-container-split {
        height: 180px;
    }
    
    /* History stats back to single column on very small screens */
    .history-stats-cards {
        grid-template-columns: 1fr;
    }
    
    /* Crypto stats back to single column on very small screens */
    .crypto-stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Risk metrics back to single column */
    .risk-metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== VERY SMALL MOBILE (Up to 360px) ========== */
@media (max-width: 360px) {
    /* Stack metrics vertically on very small screens */
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    /* Analytics stats single column */
    .analytics-stats {
        grid-template-columns: 1fr;
    }
    
    /* All stat cards full width */
    .metric-card,
    .analytics-stat-card,
    .history-stat-card,
    .crypto-stat-card,
    .risk-metric-card {
        width: 100%;
    }
}

/* ============================================================================
   TREND BIAS ANALYTICS SECTION (V2)
   ============================================================================ */

.trend-bias-section {
    margin-bottom: 2rem;
}

.trend-bias-status {
    margin-left: auto;
}

.trend-bias-status .status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.trend-bias-status .status-badge.observation {
    background: rgba(255, 170, 0, 0.2);
    color: #ffaa00;
    border: 1px solid rgba(255, 170, 0, 0.3);
}

.trend-bias-status .status-badge.active {
    background: rgba(0, 255, 136, 0.2);
    color: var(--neon-green);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.trend-bias-status .status-badge.disabled {
    background: rgba(160, 160, 184, 0.2);
    color: var(--text-secondary);
    border: 1px solid rgba(160, 160, 184, 0.3);
}

.trend-bias-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.trend-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-smooth);
}

.trend-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.trend-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.trend-card .token-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trend-card .token-emoji {
    font-size: 1.25rem;
}

.trend-card .token-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.trend-direction {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.trend-direction .direction-arrow {
    font-size: 1rem;
}

/* Standalone direction arrow colors */
.direction-arrow.bullish {
    color: var(--neon-green);
}

.direction-arrow.bearish {
    color: var(--danger);
}

.direction-arrow.neutral {
    color: var(--text-secondary);
}

/* Direction label colors */
.direction-label.bullish {
    color: var(--neon-green);
}

.direction-label.bearish {
    color: var(--danger);
}

.direction-label.neutral {
    color: var(--text-secondary);
}

.trend-direction.bullish {
    background: rgba(0, 255, 136, 0.15);
    color: var(--neon-green);
}

.trend-direction.bullish .direction-arrow {
    color: var(--neon-green);
}

.trend-direction.bearish {
    background: rgba(255, 0, 110, 0.15);
    color: var(--danger);
}

.trend-direction.bearish .direction-arrow {
    color: var(--danger);
}

.trend-direction.neutral {
    background: rgba(160, 160, 184, 0.15);
    color: var(--text-secondary);
}

.trend-stats {
    margin-bottom: 0.75rem;
}

.trend-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.trend-stat .stat-label {
    color: var(--text-muted);
    min-width: 70px;
}

.trend-stat .stat-value {
    color: var(--text-primary);
    font-weight: 600;
}

.trend-stat .stat-value.confidence {
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.7rem;
}

.trend-stat .stat-value.confidence.high {
    background: rgba(0, 255, 136, 0.15);
    color: var(--neon-green);
}

.trend-stat .stat-value.confidence.medium {
    background: rgba(255, 170, 0, 0.15);
    color: #ffaa00;
}

.trend-stat .stat-value.confidence.low {
    background: rgba(160, 160, 184, 0.15);
    color: var(--text-secondary);
}

.strength-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
}

.strength-fill.bullish {
    background: linear-gradient(90deg, #00d966, var(--neon-green));
}

.strength-fill.bearish {
    background: linear-gradient(90deg, #ff4466, var(--danger));
}

.strength-fill.neutral {
    background: linear-gradient(90deg, #666, #888);
}

.trend-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.action-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.375rem;
    border-radius: 6px;
    font-size: 0.7rem;
}

.action-item.yes {
    background: rgba(0, 255, 136, 0.1);
}

.action-item.no {
    background: rgba(255, 0, 110, 0.1);
}

.action-item .action-label {
    color: var(--text-muted);
    font-size: 0.65rem;
}

.action-item .action-status {
    font-weight: 600;
    font-size: 0.7rem;
}

.action-item .action-status.allowed {
    color: var(--neon-green);
}

.action-item .action-status.preferred {
    color: var(--neon-blue);
    font-weight: 700;
}

.action-item .action-status.skip {
    color: var(--danger);
}

.action-item .action-status.blocked {
    color: var(--danger);
}

.trend-skipped {
    text-align: center;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.trend-skipped .skipped-value {
    color: var(--warning);
    font-weight: 600;
}

.trend-bias-legend {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-top: 1rem;
}

.trend-bias-legend h4 {
    font-size: 0.8rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.trend-bias-legend .legend-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.trend-bias-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.trend-bias-legend .legend-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.trend-bias-legend .legend-icon.bullish {
    color: var(--neon-green);
}

.trend-bias-legend .legend-icon.bearish {
    color: var(--danger);
}

.trend-bias-legend .legend-icon.neutral {
    color: var(--text-secondary);
}

.trend-bias-legend .config-label {
    color: var(--text-muted);
    min-width: 100px;
}

.trend-bias-legend .config-value {
    color: var(--neon-blue);
    font-weight: 600;
}

.trend-bias-legend .config-desc {
    color: var(--text-muted);
    font-size: 0.65rem;
}

/* ============================================================================
   DYNAMIC LOCKING SECTION (V2)
   ============================================================================ */

.lock-targets-overview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.lock-target-card {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid rgba(189, 0, 255, 0.15);
    display: flex;
    flex-direction: column;
}

.lock-card-inner {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.target-header-small {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.target-header-small .target-icon-fa {
    font-size: 0.9rem;
    color: var(--neon-purple);
    opacity: 0.9;
}

.target-header-small .target-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.target-box {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.7rem;
}

.target-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.target-line:last-of-type { border-bottom: none; }

.target-line .label {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.6rem;
    flex-shrink: 0;
}

.target-line .value {
    color: var(--text-primary);
    font-size: 0.7rem;
    font-family: 'Courier New', monospace;
    word-break: break-word;
}

.target-time-small {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.target-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.target-header .target-icon {
    font-size: 1.25rem;
}

.target-header .target-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.target-values {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.target-values > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
}
.target-normal { padding: 0.35rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.target-normal:last-child { border-bottom: none; }

.target-values .value {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.target-normal .value {
    color: var(--text-primary);
}

.target-tightened .value {
    color: var(--neon-green);
}

.target-values .label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.target-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.hold-mode-overview {
    background: rgba(0, 217, 255, 0.05);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 217, 255, 0.1);
}

.hold-mode-overview h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--neon-blue);
    margin-bottom: 0.75rem;
}

.hold-settings-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
}

.hold-setting {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.hold-setting.highlight {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.hold-setting .setting-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: center;
}

.hold-setting .setting-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.hold-setting.highlight .setting-value {
    color: var(--neon-green);
}

.locking-placeholder {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.locking-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.locking-placeholder p {
    margin-bottom: 0.25rem;
}

.locking-placeholder .placeholder-hint {
    font-size: 0.75rem;
    opacity: 0.7;
}

.lock-tightening-info {
    background: rgba(189, 0, 255, 0.05);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid rgba(189, 0, 255, 0.1);
}

.lock-tightening-info h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--neon-purple);
    margin-bottom: 0.5rem;
}

.lock-tightening-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.lock-tightening-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lock-tightening-info li {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.25rem 0;
    padding-left: 1rem;
    position: relative;
}

.lock-tightening-info li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--neon-green);
}

/* Responsive for Trend Bias */
@media (max-width: 1200px) {
    .trend-bias-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trend-bias-legend {
        grid-template-columns: 1fr;
    }
    
    .hold-settings-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .trend-bias-grid {
        grid-template-columns: 1fr;
    }
    
    .lock-targets-overview {
        grid-template-columns: 1fr;
    }
    
    .hold-settings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* V4: Price Target & Prediction, Alerts, Enhanced History, Analyzer */
    .market-prices-grid {
        grid-template-columns: 1fr;
    }
    .alerts-controls-section .controls-row {
        flex-wrap: wrap;
    }
    .trade-history-enhanced-section .per-crypto-tables {
        overflow-x: auto;
    }
    .per-crypto-block .enhanced-table {
        font-size: 0.75rem;
    }
    .analyzer-buckets {
        grid-template-columns: 1fr;
    }
    .tabs-row {
        flex-wrap: wrap;
    }
    .tab-btn {
        flex: 1;
        min-width: 80px;
    }
}