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

:root {
    /* More Vibrant Cyberpunk Background */
    --bg-color-1: #151136;
    --bg-color-2: #241d50;
    --bg-color-3: #1b1540;
    
    /* Brighter Glassmorphism Panels */
    --panel-bg: rgba(40, 35, 75, 0.6);
    --panel-border: rgba(0, 229, 255, 0.25);
    --panel-hover-border: rgba(0, 255, 163, 0.8);
    --panel-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.5);
    
    --text-main: #ffffff;
    --text-muted: #c8c8e6;
    --text-highlight: #ffffff;
    
    /* Brighter Neon Colors */
    --green: #00ffa3;
    --green-glow: rgba(0, 255, 163, 0.8);
    --red: #ff3366;
    --red-glow: rgba(255, 51, 102, 0.8);
    --blue: #00e5ff;
    --blue-glow: rgba(0, 229, 255, 0.8);
    --orange: #ffb000;
    --purple: #d15cff;
    
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background: linear-gradient(135deg, var(--bg-color-1), var(--bg-color-2), var(--bg-color-3));
    background-size: 400% 400%;
    animation: gradientBG 20s ease infinite;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 11px;
    line-height: 1.5;
    padding: 12px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Subtle grid overlay for background */
body::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: -1;
}

/* Typography Utilities */
.green { color: var(--green) !important; text-shadow: 0 0 8px var(--green-glow); }
.red { color: var(--red) !important; text-shadow: 0 0 8px var(--red-glow); }
.blue { color: var(--blue) !important; text-shadow: 0 0 8px var(--blue-glow); }
.orange { color: var(--orange) !important; text-shadow: 0 0 8px rgba(255,176,0,0.6); }
.gray { color: var(--text-muted) !important; }
.bold { font-weight: 800; color: var(--text-highlight); letter-spacing: 0.5px;}
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }

/* Header */
.dashboard-header {
    text-align: center;
    margin-bottom: 15px;
    flex-shrink: 0;
    position: relative;
}
.dashboard-header h1 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 4px;
    background: linear-gradient(90deg, var(--green), var(--blue), var(--purple), var(--orange));
    background-size: 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textGradient 10s linear infinite;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}

@keyframes textGradient {
    0% { background-position: 0% center; }
    100% { background-position: 300% center; }
}

.dashboard-header p {
    font-size: 11px;
    color: var(--blue);
    letter-spacing: 1px;
    font-style: italic;
    opacity: 0.8;
}

/* Layout Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 18% 57% 25%;
    grid-template-rows: minmax(700px, calc(100vh - 190px)) 135px;
    gap: 12px;
    flex: 1;
}

.col-left { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; padding-right: 4px; }
.col-middle { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.col-right { grid-column: 3; grid-row: 1; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; padding-right: 4px; }

.row-bottom {
    grid-column: 1 / span 3;
    grid-row: 2;
    display: flex;
    gap: 12px;
}
.row-bottom .panel { flex: 1; }

.middle-bottom-grid {
    display: flex;
    gap: 12px;
    height: 190px;
    flex-shrink: 0;
}
.middle-bottom-grid .panel { flex: 1; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 229, 255, 0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); box-shadow: 0 0 10px var(--blue-glow); }

/* Glassmorphism Panels */
.panel {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--panel-shadow), inset 0 1px 0 rgba(255,255,255,0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}

.panel::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    z-index: 10;
}

.panel:hover {
    border-color: var(--panel-hover-border);
    box-shadow: 0 8px 32px 0 rgba(0, 255, 163, 0.1), inset 0 1px 0 rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.panel-header {
    background: linear-gradient(90deg, rgba(0,0,0,0.5), rgba(0, 229, 255, 0.05));
    color: var(--blue);
    padding: 8px 12px;
    font-size: 10px;
    font-weight: 700;
    border-bottom: 1px solid var(--panel-border);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    text-shadow: 0 0 5px var(--blue-glow);
}

.panel-content {
    padding: 12px;
    flex: 1;
    overflow-y: auto;
}

/* Animations */
@keyframes pulseGlow {
    0% { box-shadow: 0 0 4px var(--green); }
    50% { box-shadow: 0 0 15px var(--green), 0 0 5px #fff; }
    100% { box-shadow: 0 0 4px var(--green); }
}

@keyframes flashUpdate {
    0% { background-color: rgba(0, 255, 163, 0.3); text-shadow: 0 0 10px #fff; }
    100% { background-color: transparent; text-shadow: none; }
}

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

/* Specific Elements */
ul { list-style: none; }
ul li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    font-size: 11px;
    animation: slideIn 0.5s ease backwards;
}
ul li:nth-child(1) { animation-delay: 0.05s; }
ul li:nth-child(2) { animation-delay: 0.1s; }
ul li:nth-child(3) { animation-delay: 0.15s; }
ul li:nth-child(4) { animation-delay: 0.2s; }
ul li:nth-child(5) { animation-delay: 0.25s; }

.bullet {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 10px;
    box-shadow: 0 0 8px currentColor;
}
.bullet.green { background-color: var(--green); animation: pulseGlow 2s infinite; }
.bullet.red { background-color: var(--red); box-shadow: 0 0 8px var(--red); }
.bullet.gray { background-color: var(--text-muted); box-shadow: none; }

/* Tables styled for data clarity */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: 10px;
}
.data-table th, .data-table td {
    padding: 6px 4px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.data-table th {
    color: var(--blue);
    font-weight: 600;
    font-family: var(--font-sans);
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.5px;
}
.data-table tr { transition: background 0.2s; }
.data-table tr:hover {
    background: linear-gradient(90deg, rgba(0,255,163,0.1), transparent);
}
.data-table.small { font-size: 9px; }

/* DOM Table Special styling */
.dom-table th, .dom-table td { text-align: right; padding: 4px 6px; }
.dom-table th:first-child, .dom-table td:first-child { text-align: left; }
.dom-table tbody tr:hover { background: rgba(0,229,255,0.1); }
.dom-summary { 
    padding: 10px; 
    border-top: 1px solid var(--panel-border); 
    background: rgba(0,0,0,0.3);
    border-radius: 0 0 10px 10px;
    font-family: var(--font-mono);
    color: var(--orange);
    text-shadow: 0 0 8px rgba(255,176,0,0.5);
}

/* Flex Utilities */
.flex-row { display: flex; gap: 12px; align-items: center; }
.flex-col { display: flex; flex-direction: column; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* Momentum bars */
.momentum-bar-container {
    width: 100%;
    background-color: rgba(255,255,255,0.05);
    height: 5px;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}
.momentum-bar {
    height: 100%;
    border-radius: 3px;
    box-shadow: 0 0 10px currentColor;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.momentum-bar.green { background-color: var(--green); }
.momentum-bar.red { background-color: var(--red); }

/* Chart Containers */
.chart-container { position: relative; width: 100%; height: 100%; }
.chart-container-small { position: relative; width: 75px; height: 75px; }

.main-chart-panel { flex: 1; display: flex; flex-direction: column; }
.main-chart-container { flex: 1; padding: 0; position: relative; min-height: 400px; }
.sub-chart-container { height: 90px; padding: 0; border-top: 1px solid var(--panel-border); position: relative;}

/* Ticker styling */
.ticker { 
    margin-left: auto;
    color: var(--text-highlight); 
    font-family: var(--font-mono);
    font-size: 11px; 
    background: linear-gradient(90deg, rgba(0,255,163,0.15), rgba(0,229,255,0.15));
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(0,255,163,0.3);
    box-shadow: 0 0 15px rgba(0,255,163,0.1);
}

.sub-header { 
    font-size: 10px; 
    border-top: 1px solid var(--panel-border); 
    border-bottom: none; 
    background: rgba(0,0,0,0.3); 
    color: var(--purple);
    text-shadow: 0 0 5px rgba(176,38,255,0.5);
}

/* Oscillators */
.oscillators-container { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.osc-chart-row { display: flex; flex-direction: column; flex: 1; min-height: 0; position: relative;}
.osc-label { 
    position: absolute;
    top: 4px; left: 6px;
    font-size: 9px; 
    font-weight: 700;
    color: var(--text-highlight); 
    z-index: 10;
    text-shadow: 0 2px 4px #000;
    background: rgba(0,0,0,0.4);
    padding: 2px 6px;
    border-radius: 4px;
}
.osc-canvas-wrapper { flex: 1; position: relative; }

/* Checklist styling */
.checklist div {
    margin-bottom: 8px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    background: rgba(255,255,255,0.02);
    border: 1px solid transparent;
}
.checklist div:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    transform: translateX(5px);
}
.checklist input {
    margin-right: 10px;
    appearance: none;
    width: 16px; height: 16px;
    border: 1px solid var(--blue);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    position: relative;
    background: rgba(0,0,0,0.5);
    transition: all 0.2s;
}
.checklist input:checked {
    background-color: var(--green);
    border-color: var(--green);
    box-shadow: 0 0 10px var(--green-glow);
}
.checklist input:checked::after {
    content: '✓';
    position: absolute;
    color: #000;
    font-size: 12px;
    font-weight: bold;
    top: -1px; left: 3px;
}

/* Overall Sentiment Box */
.overall-sentiment {
    width: 100%; 
    border-top: 1px solid var(--panel-border); 
    padding-top: 15px;
    background: linear-gradient(to right, transparent, rgba(0,255,163,0.1), transparent);
    font-size: 12px;
}

/* Interactive Inputs */
.interactive-input {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 10px;
    width: 65px;
    padding: 2px 4px;
    border-radius: 4px;
    outline: none;
    text-align: right;
    transition: all 0.2s;
}
.interactive-input:focus {
    border-color: var(--green);
    box-shadow: 0 0 5px var(--green-glow);
    background: rgba(0,0,0,0.8);
}
/* Hide arrows in number inputs */
.interactive-input::-webkit-outer-spin-button,
.interactive-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
