/* Q Levels VIP - Premium Trading Dashboard CSS */

:root {
    --q-bg-primary: #0a0e17;
    --q-bg-secondary: #0f1520;
    --q-bg-card: #141b2d;
    --q-bg-hover: #1a2238;
    --q-border: #1e2a45;
    --q-border-light: #2a3a5a;
    
    --q-text-primary: #ffffff;
    --q-text-secondary: #8b95a8;
    --q-text-muted: #5a6578;
    
    --q-green: #00d4aa;
    --q-green-light: #00ffcc;
    --q-green-dark: #00a080;
    --q-green-bg: rgba(0, 212, 170, 0.15);
    
    --q-red: #ff4757;
    --q-red-light: #ff6b7a;
    --q-red-dark: #cc3a47;
    --q-red-bg: rgba(255, 71, 87, 0.15);
    
    --q-blue: #4a90d9;
    --q-blue-light: #6ba8f0;
    --q-cyan: #00d4ff;
    --q-cyan-bg: rgba(0, 212, 255, 0.15);
    
    --q-purple: #9d7aff;
    --q-purple-bg: rgba(157, 122, 255, 0.15);
    
    --q-orange: #ff9f43;
    --q-orange-bg: rgba(255, 159, 67, 0.15);
    
    --q-yellow: #ffd32a;
    
    --q-font-display: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Consolas', monospace;
    --q-font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    --q-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --q-shadow-glow: 0 0 20px rgba(0, 212, 170, 0.2);
    
    --q-radius: 12px;
    --q-radius-sm: 8px;
}

/* Container */
.q-vip-container {
    font-family: var(--q-font-body);
    background: var(--q-bg-primary);
    border-radius: var(--q-radius);
    border: 1px solid var(--q-border);
    overflow: hidden;
    box-shadow: var(--q-shadow);
}

/* Header */
.q-vip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--q-bg-secondary) 0%, var(--q-bg-card) 100%);
    border-bottom: 1px solid var(--q-border);
}

.q-vip-header.q-compact {
    padding: 12px 20px;
}

.q-vip-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.q-logo-vip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--q-green) 0%, var(--q-cyan) 100%);
    color: var(--q-bg-primary);
    font-family: var(--q-font-display);
    font-weight: 700;
    font-size: 20px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.4);
}

.q-title-text {
    font-family: var(--q-font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--q-text-primary);
    letter-spacing: 2px;
}

.q-vip-badge {
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--q-orange) 0%, var(--q-yellow) 100%);
    color: var(--q-bg-primary);
    font-family: var(--q-font-display);
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 1px;
}

.q-date-badge {
    padding: 6px 12px;
    background: var(--q-bg-card);
    border: 1px solid var(--q-border);
    border-radius: 6px;
    color: var(--q-text-secondary);
    font-family: var(--q-font-display);
    font-size: 12px;
}

.q-vip-price-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.q-symbol {
    font-family: var(--q-font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--q-text-primary);
}

.q-current-price {
    font-family: var(--q-font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--q-text-primary);
}

.q-price-change {
    font-family: var(--q-font-display);
    font-size: 14px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
}

.q-price-change.positive {
    color: var(--q-green);
    background: var(--q-green-bg);
}

.q-price-change.negative {
    color: var(--q-red);
    background: var(--q-red-bg);
}

.q-market-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--q-bg-card);
    border: 1px solid var(--q-border);
    border-radius: 20px;
}

.q-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--q-text-muted);
}

.q-market-status.open .q-status-dot {
    background: var(--q-green);
    box-shadow: 0 0 8px var(--q-green);
    animation: pulse 2s infinite;
}

.q-market-status.closed .q-status-dot {
    background: var(--q-red);
}

.q-market-status.pre .q-status-dot,
.q-market-status.post .q-status-dot {
    background: var(--q-orange);
}

.q-status-text {
    font-family: var(--q-font-display);
    font-size: 11px;
    font-weight: 600;
    color: var(--q-text-secondary);
    letter-spacing: 1px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Chart Section */
.q-vip-chart-section {
    padding: 20px;
    border-bottom: 1px solid var(--q-border);
}

.q-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.q-section-title {
    font-family: var(--q-font-display);
    font-size: 12px;
    font-weight: 600;
    color: var(--q-text-secondary);
    letter-spacing: 2px;
}

.q-chart-controls {
    display: flex;
    gap: 4px;
}

.q-range-btn {
    padding: 6px 14px;
    background: var(--q-bg-card);
    border: 1px solid var(--q-border);
    border-radius: 6px;
    color: var(--q-text-secondary);
    font-family: var(--q-font-display);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.q-range-btn:hover {
    background: var(--q-bg-hover);
    border-color: var(--q-border-light);
}

.q-range-btn.active {
    background: var(--q-green-bg);
    border-color: var(--q-green);
    color: var(--q-green);
}

.q-line-chart-container,
.q-line-chart-wrapper {
    background: var(--q-bg-secondary);
    border-radius: var(--q-radius-sm);
    border: 1px solid var(--q-border);
    overflow: hidden;
}

.q-levels-bars-container,
.q-levels-bars-wrapper {
    position: relative;
    background: var(--q-bg-secondary);
    border-radius: var(--q-radius-sm);
    border: 1px solid var(--q-border);
    overflow: hidden;
}

/* Legend */
.q-respect-legend,
.q-levels-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
    padding: 10px 16px;
    background: var(--q-bg-card);
    border-radius: 6px;
}

.q-legend-item {
    font-family: var(--q-font-display);
    font-size: 11px;
    color: var(--q-text-secondary);
}

.q-legend-bull { color: var(--q-green); }
.q-legend-bear { color: var(--q-red); }
.q-legend-flip { color: var(--q-cyan); }
.q-legend-resistance { color: var(--q-green); }
.q-legend-support { color: var(--q-purple); }
.q-legend-maxpain { color: var(--q-blue); }
.q-legend-flip-bar { color: var(--q-cyan); }
.q-legend-abs { color: var(--q-orange); }
.q-legend-control { font-weight: 600; }

/* Q Levels Section */
.q-vip-levels-section {
    padding: 20px;
    border-bottom: 1px solid var(--q-border);
}

.q-levels-header {
    margin-bottom: 16px;
}

/* Bar Chart Visualization */
.q-bars-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 100%;
    padding: 40px 20px 60px;
    position: relative;
}

.q-bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 80px;
}

.q-bar {
    width: 50px;
    border-radius: 6px 6px 0 0;
    position: relative;
    transition: all 0.3s ease;
    min-height: 20px;
}

.q-bar:hover {
    transform: scaleX(1.1);
    filter: brightness(1.2);
}

.q-bar.resistance {
    background: linear-gradient(180deg, var(--q-green-light) 0%, var(--q-green-dark) 100%);
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.3);
}

.q-bar.support {
    background: linear-gradient(180deg, #b794f6 0%, #7c3aed 100%);
    box-shadow: 0 0 15px rgba(157, 122, 255, 0.3);
}

.q-bar.maxpain {
    background: linear-gradient(180deg, var(--q-blue-light) 0%, var(--q-blue) 100%);
    box-shadow: 0 0 15px rgba(74, 144, 217, 0.3);
}

.q-bar.flip {
    background: linear-gradient(180deg, #00ffff 0%, #00a0a0 100%);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.q-bar.abs {
    background: linear-gradient(180deg, var(--q-orange) 0%, #cc7030 100%);
    box-shadow: 0 0 15px rgba(255, 159, 67, 0.3);
}

.q-bar-value {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--q-font-display);
    font-size: 11px;
    font-weight: 600;
    color: var(--q-text-primary);
    white-space: nowrap;
}

.q-bar-label {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--q-font-display);
    font-size: 10px;
    font-weight: 600;
    color: var(--q-text-secondary);
    text-align: center;
}

.q-bar-sublabel {
    display: block;
    font-size: 9px;
    color: var(--q-text-muted);
    margin-top: 2px;
}

/* Price Line Indicator */
.q-price-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--q-orange);
    box-shadow: 0 0 10px var(--q-orange);
    z-index: 10;
}

.q-price-line::after {
    content: attr(data-price);
    position: absolute;
    right: 10px;
    top: -10px;
    padding: 4px 10px;
    background: var(--q-orange);
    color: var(--q-bg-primary);
    font-family: var(--q-font-display);
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
}

/* Respect Panel */
.q-respect-panel {
    padding: 20px;
}

.q-respect-header {
    margin-bottom: 12px;
}

.q-respect-signals {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.q-signal-card {
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--q-border);
    background: var(--q-bg-card);
}

.q-signal-card.bullish {
    border-color: var(--q-green);
    background: var(--q-green-bg);
}

.q-signal-card.bearish {
    border-color: var(--q-red);
    background: var(--q-red-bg);
}

.q-signal-type {
    font-family: var(--q-font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.q-signal-card.bullish .q-signal-type { color: var(--q-green); }
.q-signal-card.bearish .q-signal-type { color: var(--q-red); }

.q-signal-level {
    font-family: var(--q-font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--q-text-primary);
}

.q-signal-time {
    font-size: 10px;
    color: var(--q-text-muted);
    margin-top: 4px;
}

/* No Signals State */
.q-no-signals {
    text-align: center;
    padding: 30px;
    color: var(--q-text-muted);
    font-family: var(--q-font-display);
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .q-vip-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .q-vip-title {
        justify-content: center;
    }
    
    .q-bar {
        width: 35px;
    }
    
    .q-bar-value {
        font-size: 9px;
    }
    
    .q-bars-chart {
        padding: 30px 10px 50px;
    }
}

/* TV Chart Overrides */
.tv-lightweight-charts {
    border-radius: var(--q-radius-sm);
}
