/* 🌌 Crypto AI Intelligence Dashboard - CSP Compliant External CSS */
/* Complete Styles - Extracted from inline CSS for Content Security Policy compliance */

:root {
    --primary-color: #6d28d9;
    --secondary-color: #4338ca;
    --success-color: #10b981;
    --warning-color: #ff8c00;
    --danger-color: #ef4444;
    --dark-bg: #0a0a14;
    --card-bg: rgba(15, 15, 26, 0.95);
    --card-bg-secondary: rgba(20, 20, 35, 0.9);
    --border-color: rgba(75, 85, 99, 0.3);
    --border-gold: rgba(255, 215, 0, 0.3);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --gradient: linear-gradient(135deg, #8b5cf6 0%, #10b981 50%, #6366f1 100%);
    
    /* Casino Golden Palette - Used for Highlights Only */
    --gold-bright: #6d28d9;
    --gold-medium: #4338ca;
    --gold-dark: #5b21b6;
    --gold-glow: rgba(109, 40, 217, 0.2);
    --casino-black: #000000;
    --casino-dark: #1a1a2e;
    --luxury-purple: #4a148c;
    
    /* Aurora Color Palette */
    --aurora-purple: #8b5cf6;
    --aurora-green: #10b981;
    --aurora-blue: #3b82f6;
    --aurora-pink: #ec4899;
    --aurora-cyan: #06b6d4;
    --aurora-yellow: #f59e0b;
    
    /* Gradients */
    --aurora-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    --aurora-gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #8b5cf6 100%);
    --aurora-gradient-green: linear-gradient(135deg, #10b981 0%, #059669 50%, #10b981 100%);
    --aurora-gradient-warm: linear-gradient(135deg, #f59e0b 0%, #f97316 50%, #ef4444 100%);
    --aurora-gradient-cool: linear-gradient(135deg, #06b6d4 0%, #0891b2 50%, #0284c7 100%);
    
    /* Base Colors */
    --bull-color: var(--aurora-green);
    --bear-color: #ef4444;
    
    /* Effects */
    --glow-purple: 0 0 20px rgba(139, 92, 246, 0.3);
    --glow-green: 0 0 20px rgba(16, 185, 129, 0.3);
    --glow-red: 0 0 20px rgba(239, 68, 68, 0.3);
}

/* ===== BASE STYLES ===== */

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

/* ===== KEYFRAMES & ANIMATIONS ===== */

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
}

@keyframes cardPulse {
    0%, 100% { 
        transform: scale(1);
    }
    50% { 
        transform: scale(1.01);
    }
}

@keyframes dataStream {
    0% { transform: translateY(100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(-100%); opacity: 0; }
}

@keyframes sonarPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); box-shadow: 0 0 30px rgba(16, 185, 129, 0.5); }
    100% { transform: scale(1); }
}

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

@keyframes typingPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

body {
    font-family: 'League Spartan', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: radial-gradient(circle at 25% 25%, rgba(139, 92, 246, 0.3) 0%, transparent 50%), 
                radial-gradient(circle at 75% 75%, rgba(16, 185, 129, 0.2) 0%, transparent 50%), 
                linear-gradient(135deg, #000 0%, #0f172a 100%);
    background-attachment: fixed;
    background-size: 100% 100%;
    backdrop-filter: blur(20px);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

/* System Overview in Header */
.system-overview-header {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.metrics-compact {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.metric-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 50px;
}

.metric-value-compact {
    font-size: 1rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

.metric-label-compact {
    font-size: 0.625rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
    line-height: 1;
}

/* Full-width news feed */
.news-feed-card {
    grid-column: 1 / -1;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--casino-black) 0%, var(--casino-dark) 100%);
    border-bottom: 2px solid var(--gold-bright);
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.status-indicators {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Status Indicators - Ultra-Compact Mobile-First Design */
.status-compact {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: rgba(26, 26, 46, 0.9);
    border: 1px solid var(--gold-glow);
    border-radius: 20px;
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.1);
    white-space: nowrap;
    font-weight: 500;
    color: var(--text-primary);
}

.status-all {
    color: var(--text-primary);
    font-weight: 500;
}

#time-compact {
    color: var(--success-color);
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold-bright);
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px var(--gold-glow);
}

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

/* Grid Layout */
.dashboard-main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: start;
    min-height: calc(100vh - 120px);
}

.left-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}

/* Make AI Assistant card flexible but constrained */
.ai-assistant-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 500px;
    max-height: 800px; /* Prevent excessive expansion */
}

.ai-assistant-card .card {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%; /* Use full height of container */
    max-height: 100%; /* Don't exceed container */
}

.ai-assistant-card .chat-container {
    flex: 1;
    height: auto;
    min-height: 400px;
    max-height: calc(100% - 80px); /* Account for card header */
    display: flex;
    flex-direction: column;
}

.right-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Responsive layout */
@media (max-width: 1200px) {
    .dashboard-main {
        grid-template-columns: 1fr;
    }
    
    .right-column {
        order: -1;
    }
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.dashboard-row-flexible {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    align-items: start;
}

.dashboard-row-single {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.card-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.card-large {
    height: fit-content;
    min-height: 400px;
}

.card-compact {
    height: fit-content;
}

.card-compact.events-card {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.events-container {
    flex-grow: 1;
    /* Removed overflow-y: auto and min-height to display events inline without scrolling */
}

.event-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.event-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.event-item:last-child {
    border-bottom: none;
}

/* Reduce event title boldness for better readability */
.event-item strong {
    font-weight: 600; /* Semi-bold instead of bold */
}

.event-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 0.75rem;
}

.event-details.expanded {
    max-height: 200px;
    padding: 0.5rem 0.75rem;
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.15), 
                0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.25), 
                0 4px 20px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 215, 0, 0.6);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #cbd5e1; /* Default color for emojis */
}

.card-title-text {
    background: linear-gradient(135deg, #E6A843 0%, #F4C862 25%, #E6A843 50%, #D49B38 75%, #F1C15B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(230, 168, 67, 0.3);
    filter: drop-shadow(0 0 8px rgba(244, 200, 98, 0.4));
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* News Feed Grid Layout */
.news-feed {
    max-height: none;
    overflow-y: visible;
}

.news-feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    padding: 0;
}

.news-item-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.news-item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.news-item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
}

.news-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-item-image .placeholder-icon {
    font-size: 3rem;
    opacity: 0.7;
}

.news-item-content {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-item-headline {
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item-summary {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.news-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.news-item-meta {
    color: var(--text-secondary);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-item-impact {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* News feed styles - full display */
.news-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.news-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.news-item:last-child {
    border-bottom: none;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.news-headline {
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    flex-grow: 1;
}

.impact-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.impact-high { 
    background: var(--danger-color); 
    color: white; 
}

.impact-medium { 
    background: var(--warning-color); 
    color: white; 
}

.impact-low { 
    background: var(--success-color); 
    color: white; 
}

.news-meta {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.news-summary {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Improved text contrast for readability - Dark theme optimized */
.card-subtitle,
.news-meta,
.news-summary,
.news-item-meta,
.news-item-summary,
.metric-label,
.insight-content,
.event-details {
    color: var(--text-secondary) !important;
}

/* Ensure primary content remains highly visible */
.card-title,
.news-headline,
.news-item-headline,
.metric-value,
#market-outlook,
#market-sentiment,
#additional-insights,
#out-of-box,
#contrarian-trade {
    color: var(--text-primary) !important;
    font-weight: 500;
}

/* Ensure all content areas have dark backgrounds and good contrast */
#market-outlook,
#market-sentiment {
    background: transparent !important;
    color: var(--text-primary) !important;
}

#market-outlook > div {
    background: var(--card-bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    padding: 1.5rem !important;
    border-radius: 12px !important;
    margin-bottom: 1rem !important;
}

#market-outlook > div:hover {
    border-color: var(--border-gold) !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.1) !important;
}

/* Enhanced Chat input styling */
.chat-container {
    height: 500px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    scroll-behavior: smooth;
}

.chat-message {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 12px;
    max-width: 85%;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
    position: relative;
    animation: messageSlideIn 0.3s ease-out;
}

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

.chat-message.user {
    background: linear-gradient(135deg, #4c1d95, #064e3b);
    margin-left: auto;
    text-align: right;
    color: white;
    box-shadow: 0 2px 10px rgba(76, 29, 149, 0.3);
}

.chat-message.ai {
    background: rgba(109, 40, 217, 0.1);
    border-left: 3px solid #6d28d9;
    color: #e2e8f0;
    border: 1px solid rgba(109, 40, 217, 0.2);
}

.chat-message.ai.streaming {
    border-left: 3px solid #10b981;
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}

.chat-message.error {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--danger-color);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.chat-message.search-info {
    background: rgba(139, 92, 246, 0.1);
    border-left: 4px solid #8b5cf6;
    color: #c4b5fd;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    max-width: 70%;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Enhanced message components */
.message-content {
    margin-bottom: 0.5rem;
}

.message-timestamp {
    font-size: 0.7rem;
    opacity: 0.6;
    text-align: right;
}

.message-metadata {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.8;
}

.context-info {
    color: #10b981;
    font-weight: 500;
}

.streaming-indicator {
    color: #8b5cf6;
    font-weight: 500;
}

/* Enhanced typing indicator */
.typing-indicator-enhanced {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-status {
    color: #10b981;
    font-weight: 500;
}

/* Streaming content animation */
.streaming-content {
    min-height: 20px;
}

.streaming-content::after {
    content: '▋';
    color: #10b981;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Error message styling */
.error-content {
    margin-bottom: 0.5rem;
}

.error-timestamp {
    font-size: 0.7rem;
    opacity: 0.6;
    text-align: right;
}

.chat-input-container {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 0;
}

.chat-input {
    flex: 1;
    padding: 0.75rem;
    background: var(--dark-bg);
    border: 1px solid rgba(109, 40, 217, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: #6d28d9;
    box-shadow: 0 0 10px rgba(109, 40, 217, 0.2);
}

.chat-send {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #6d28d9, #059669);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 10px rgba(109, 40, 217, 0.3);
}

.chat-send:hover {
    background: linear-gradient(135deg, #5b21b6, #047857);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(109, 40, 217, 0.5);
}

/* Metrics */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.metric {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Sentiment Gauge */
.sentiment-gauge {
    position: relative;
    width: 200px;
    height: 100px;
    margin: 0 auto;
}

/* Loading States */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Header Updates */
.header {
    background: #000 !important; /* Pure black background */
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-primary);
    gap: 2rem;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo-text {
    background: linear-gradient(135deg, #E6A843 0%, #F4C862 25%, #E6A843 50%, #D49B38 75%, #F1C15B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(230, 168, 67, 0.4);
    filter: drop-shadow(0 0 10px rgba(244, 200, 98, 0.5));
    font-weight: 600;
}

/* Crypto Prices Ticker */
.crypto-ticker-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #1a1a2e 100%);
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    padding: 0;
    margin-bottom: 0.2rem;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

.crypto-ticker-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #E6A843, #F4C862, #E6A843, transparent);
    animation: scanline 3s linear infinite;
}

/* Ensure ticker is immediately visible */
.ticker-content {
    animation-delay: 0s !important;
    visibility: visible !important;
}

@keyframes scanline {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Pinned BTC and ETH Section */
.crypto-pinned-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1rem;
    min-width: 450px;
    height: 60px;
    position: relative;
    background: linear-gradient(
        90deg, 
        rgba(255, 215, 0, 0.08) 0%, 
        rgba(255, 215, 0, 0.06) 60%, 
        rgba(255, 215, 0, 0.03) 80%, 
        rgba(255, 215, 0, 0.01) 95%, 
        transparent 100%
    );
}

.pinned-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 200px;
    min-width: 200px;
    max-width: 200px;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.08);
    border-radius: 8px;
    backdrop-filter: blur(15px);
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.pinned-item:hover {
    background: rgba(255, 215, 0, 0.08);
    border-color: rgba(255, 215, 0, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.15);
}

.crypto-ticker {
    height: 60px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
}

.ticker-content {
    display: flex;
    align-items: center;
    animation: scroll 120s linear infinite;
    gap: 2rem;
    padding: 0 1rem;
    white-space: nowrap;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

@keyframes scroll {
    0% { transform: translateX(0%) translateZ(0); }
    100% { transform: translateX(-50%) translateZ(0); }
}

.crypto-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 223px;
    min-width: 223px;
    max-width: 223px;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 215, 0, 0.1);
    border-radius: 8px;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    will-change: background, border-color, box-shadow;
}

.crypto-item:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
    transform: scale(1.05);
}

.crypto-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;            
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #000;
    font-size: 0.75rem;
}

.crypto-icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.crypto-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.crypto-symbol {
    font-weight: 600;
    color: #fff;
    font-size: 0.875rem;
}

.crypto-rank {
    font-size: 0.625rem;
    color: rgba(255, 215, 0, 0.7);
}

.crypto-price-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 60px;
}

.crypto-price {
    font-weight: 700;
    background: linear-gradient(135deg, #E6A843 0%, #F4C862 25%, #E6A843 50%, #D49B38 75%, #F1C15B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 0.875rem;
}

.crypto-change {
    font-size: 0.75rem;
    font-weight: 600;
}

.crypto-change.positive {
    color: #10b981;
}

.crypto-change.negative {
    color: #ef4444;
}

/* Ensure pinned items also get proper color styling */
.pinned-item .crypto-change.positive {
    color: #10b981;
}

.pinned-item .crypto-change.negative {
    color: #ef4444;
}

/* Professional Navigation Tabs - Matching Card Style */
.nav-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: transparent;
}

.nav-tab {
    background: var(--card-bg);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 12px;
    padding: 0.875rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'League Spartan', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.15), 
                0 4px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
}

.tab-emoji {
    font-size: 1.1rem;
    margin-right: 0.5rem;
    filter: none;
    opacity: 1;
}

.tab-text {
    background: linear-gradient(135deg, #E6A843 0%, #F4C862 25%, #E6A843 50%, #D49B38 75%, #F1C15B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
    font-size: 1.25rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(230, 168, 67, 0.3);
    filter: drop-shadow(0 0 8px rgba(244, 200, 98, 0.4));
}

.nav-tab.active {
    background: radial-gradient(circle at 25% 25%, rgba(139, 92, 246, 0.3) 0%, transparent 50%), 
                radial-gradient(circle at 75% 75%, rgba(16, 185, 129, 0.2) 0%, transparent 50%), 
                linear-gradient(135deg, #000 0%, #0f172a 100%);
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.4), 
                0 0 20px rgba(16, 185, 129, 0.2),
                0 4px 20px rgba(0, 0, 0, 0.4);
    border-color: rgba(139, 92, 246, 0.6);
}

.nav-tab.active .tab-text {
    filter: drop-shadow(0 0 12px rgba(244, 200, 98, 0.6));
}

.nav-tab.active .tab-emoji {
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.5));
}

.nav-tab:hover:not(.active) {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.25), 
                0 4px 20px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 215, 0, 0.6);
}

.nav-tab:hover:not(.active) .tab-text {
    filter: drop-shadow(0 0 8px rgba(244, 200, 98, 0.5));
}

/* Mobile Dashboard Layout */
.mobile-dashboard {
    width: 100%;
}

.tab-content {
    display: none;
}

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

/* Priority Cards (Mobile First) */
.priority-cards {
    display: grid;
    gap: 1.5rem;
}

/* Desktop Layout for Priority Cards */
@media (min-width: 769px) {
    .priority-cards {
        display: flex;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .priority-cards .card:first-child {
        /* Market Sentiment - smaller natural flex */
        flex: 1;
        min-width: 0; /* Allow shrinking */
    }
    
    .priority-cards .card:nth-child(2) {
        /* Market Outlook - larger natural flex */
        flex: 2;
        min-width: 0; /* Allow shrinking */
    }
}

/* Tablet Layout - Stack cards vertically */
@media (max-width: 768px) and (min-width: 481px) {
    .priority-cards {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Secondary Cards - Desktop: 3 columns, Mobile: stacked */
.secondary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Standalone cards that need bottom margin */
.card:not(.secondary-cards .card):not(.priority-cards .card) {
    margin-bottom: 2rem;
}

/* Tablet breakpoint for secondary cards - Stack vertically in portrait mode */
@media (max-width: 1024px) and (min-width: 769px) {
    .secondary-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Ask Me Buttons */
.ask-btn {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.ask-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.5);
}

.ask-btn.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.3);
}

.ask-btn.danger:hover {
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.5);
}

/* Fullscreen ChatBot */
.chatbot-fullscreen {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
}

.chat-header {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}

.chat-title {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(45deg, #8b5cf6, #10b981);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.chat-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

.chat-container-fullscreen {
    flex: 1;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    min-height: 500px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Enhanced Markets List */
.enhanced-markets-container {    
    overflow: hidden;
}

.markets-header-enhanced {
    display: grid;
    grid-template-columns: 100px 1fr 140px 100px 120px;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    color: var(--aurora-purple);
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    align-items: center;
}

.markets-header-enhanced > div {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--aurora-purple);
    font-weight: 600;
}

.markets-header-enhanced > div:first-child {
    text-align: left;
}

.markets-header-enhanced > div:nth-child(3),
.markets-header-enhanced > div:nth-child(4),
.markets-header-enhanced > div:nth-child(5) {
    text-align: right;
}



.legend-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.z-score-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid transparent;
}

/* Z-score styling only for .z-score-indicator elements, not containers */
.z-score-indicator.z-score-extreme-negative {
    background: rgba(220, 38, 38, 0.8);
    color: #ffffff;
    border-color: rgba(220, 38, 38, 1);
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

.z-score-indicator.z-score-high-negative {
    background: rgba(239, 68, 68, 0.7);
    color: #ffffff;
    border-color: rgba(239, 68, 68, 0.8);
}

.z-score-indicator.z-score-negative {
    background: rgba(248, 113, 113, 0.6);
    color: #ffffff;
    border-color: rgba(248, 113, 113, 0.7);
}

.z-score-indicator.z-score-neutral {
    background: rgba(156, 163, 175, 0.3);
    color: #d1d5db;
    border-color: rgba(156, 163, 175, 0.4);
}

.z-score-indicator.z-score-positive {
    background: rgba(34, 197, 94, 0.6);
    color: #ffffff;
    border-color: rgba(34, 197, 94, 0.7);
}

.z-score-indicator.z-score-high-positive {
    background: rgba(16, 185, 129, 0.7);
    color: #ffffff;
    border-color: rgba(16, 185, 129, 0.8);
}

.z-score-indicator.z-score-extreme-positive {
    background: rgba(5, 150, 105, 0.8);
    color: #ffffff;
    border-color: rgba(5, 150, 105, 1);
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
}

/* Prevent Z-score classes from affecting container backgrounds */
.market-change-compact.z-score-extreme-negative,
.market-change-compact.z-score-high-negative,
.market-change-compact.z-score-negative,
.market-change-compact.z-score-neutral,
.market-change-compact.z-score-positive,
.market-change-compact.z-score-high-positive,
.market-change-compact.z-score-extreme-positive {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.market-row-enhanced {
    display: grid;
    grid-template-columns: 120px 1fr 180px 100px 120px;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    align-items: center;
}

.market-row-enhanced:hover {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.08), rgba(99, 102, 241, 0.08));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
    cursor: pointer;
}

@media (min-width: 768px) {
    .market-row-enhanced:hover {
        border-radius: 8px;
        margin: 0 -0.25rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Market expansion details */
.market-expand-details {
    grid-column: 1 / -1;
    background: rgba(16, 185, 129, 0.05);
    border-top: 1px solid rgba(16, 185, 129, 0.2);
    padding: 1rem;
    margin-top: 0.5rem;
}

.price-periods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.period-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.period-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.period-value {
    font-weight: 600;
    font-size: 0.9rem;
}

.additional-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.additional-stats .stat-item {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Expand indicator styling */
.expand-indicator {
    color: #9ca3af;
    font-size: 0.8rem;
    margin-left: 0.5rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.market-row-enhanced:hover .expand-indicator {
    color: #3b82f6;
    transform: scale(1.1);
}

/* Fallback styling for missing coin images */
.crypto-icon.no-image::before,
.market-symbol.no-image::before {
    content: attr(data-symbol);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border-radius: 50%;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Desktop-specific improvements - SINGLE ROW EXCEL-LIKE LAYOUT */
@media (min-width: 768px) {
    .market-row-enhanced {
        margin: 2px 0;
        min-height: 50px;
        transition: all 0.2s ease;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .rank-col {
        text-align: center;
        font-weight: 600;
        color: var(--text-muted);
        font-size: 0.8rem;
    }

.symbol-col {
    display: flex;
    align-items: center;
    width: 100%;
}

.coin-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.coin-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0; /* Allow flex item to shrink below content width */
    flex: 1; /* Take available space */
}

.coin-symbol {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

.coin-name {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    line-height: 1;
    margin-top: 1px;
}



.symbol-col img {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .symbol-col span {
        font-weight: 700;
        font-size: 0.9rem;
        text-transform: uppercase;
    }

    .name-col {
        font-size: 0.82rem;
        color: var(--text-secondary);
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 140px;
        padding-right: 0.5rem;
    }

    .price-col {
        text-align: center;
        font-weight: 700;
        font-family: 'Courier New', monospace;
        font-size: 0.9rem;
        color: var(--text-primary);
    }

    .mcap-col,
    .volume-col {
        text-align: center;
        font-size: 0.8rem;
        color: var(--text-muted);
    }



    .ath-col {
        text-align: center;
        font-size: 0.8rem;
        font-weight: 600;
    }

    .ath-col.positive {
        color: #22c55e;
    }

    .ath-col.negative {
        color: #ef4444;
    }

    .change-col {
        text-align: right;
        font-weight: 700;
        font-size: 0.85rem;
    }

    .change-col.positive {
        color: #22c55e;
    }

    .change-col.negative {
        color: #ef4444;
    }

    /* Timeframe columns */
    .change-24h-col, .change-7d-col, .change-14d-col, 
    .change-30d-col, .change-90d-col, .change-1y-col {
        text-align: center;
        font-weight: 700;
        font-size: 0.7rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1px;
        white-space: nowrap;
        overflow: hidden;
        min-width: 75px;
        width: 75px;
        line-height: 1.1;
    }

    .change-24h-col.positive, .change-7d-col.positive, .change-14d-col.positive, 
    .change-30d-col.positive, .change-90d-col.positive, .change-1y-col.positive {
        color: #22c55e;
    }

    .change-24h-col.negative, .change-7d-col.negative, .change-14d-col.negative, 
    .change-30d-col.negative, .change-90d-col.negative, .change-1y-col.negative {
        color: #ef4444;
    }

    /* Z-score styling for under timeframe percentages */
    .zscore-under-change {
        font-size: 0.6rem;
        font-weight: 600;
        opacity: 0.8;
        line-height: 1;
        margin-top: 1px;
    }

    /* Real-time price update flash effect */
    .price-flash {
        animation: priceFlash 0.3s ease-out;
    }

    @keyframes priceFlash {
        0% { 
            background-color: rgba(16, 185, 129, 0.3);
            transform: scale(1.02);
        }
        100% { 
            background-color: transparent;
            transform: scale(1);
        }
    }

    /* Enhanced Visual Design - "Turbo God Mode" */
    
    /* Market rows with enhanced hover effects */
    .market-row-enhanced {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 6px;
        margin: 2px 0;
        position: relative;
        overflow: hidden;
        background: rgba(0, 0, 0, 0.2);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
        box-sizing: border-box;
    }
    
    .market-row-enhanced::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
        transition: left 0.5s ease;
        z-index: 1;
    }
    
    .market-row-enhanced:hover::before {
        left: 100%;
    }
    
    .market-row-enhanced:hover {
        background: rgba(0, 0, 0, 0.5);
        transform: translateY(-2px) scale(1.001);
        box-shadow: 
            0 4px 16px rgba(255, 255, 255, 0.1),
            0 0 0 1px rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        z-index: 10;
    }
    

    
    .markets-summary-row {
        background: linear-gradient(135deg, 
            rgba(16, 185, 129, 0.18) 0%, 
            rgba(139, 92, 246, 0.18) 50%,
            rgba(99, 102, 241, 0.15) 100%);
        border: 1px solid rgba(16, 185, 129, 0.4);
        border-radius: 12px;
        box-shadow: 
            0 4px 20px rgba(16, 185, 129, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        position: relative;
        overflow: hidden;
        margin-bottom: 0.5rem !important;
        font-weight: 600;
        font-size: 0.8rem;
        color: var(--text-primary);
        padding: 0.5rem 1rem;
    }
    
    .markets-summary-row::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, 
            transparent,
            rgba(16, 185, 129, 0.6),
            rgba(139, 92, 246, 0.6),
            transparent);
    }
    
    /* Enhanced typography */
    .summary-label {
        font-weight: 800;
        background: linear-gradient(135deg, #10b981, #8b5cf6);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        text-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
        font-size: 0.95rem;
        letter-spacing: 0.5px;
    }
    
    /* Enhanced percentage displays */
    .change-24h-col.positive, .change-7d-col.positive, .change-14d-col.positive, 
    .change-30d-col.positive, .change-90d-col.positive, .change-1y-col.positive,
    .summary-avg.positive {
        color: #22c55e;
        text-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
        font-weight: 800;
    }

    .change-24h-col.negative, .change-7d-col.negative, .change-14d-col.negative, 
    .change-30d-col.negative, .change-90d-col.negative, .change-1y-col.negative,
    .summary-avg.negative {
        color: #ef4444;
        text-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
        font-weight: 800;
    }
    
    /* Enhanced Z-score indicators */
    .zscore-under-change {
        font-size: 0.5rem;
        font-weight: 500;
        color: #60a5fa !important;
        opacity: 0.85;
        line-height: 1;
        margin-top: 1px;
        padding: 0px 2px;
        border-radius: 2px;
        background: rgba(0, 0, 0, 0.4);
        border: 1px solid rgba(96, 165, 250, 0.2);
        white-space: nowrap;
    }
    
    /* Enhanced coin symbols and names */
    .symbol-col {
        position: relative;
    }
    
    .symbol-col img {
        transition: all 0.3s ease;
        border: 2px solid transparent;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.05);
    }
    
    .market-row-enhanced:hover .symbol-col img {
        transform: scale(1.1);
        border-color: rgba(139, 92, 246, 0.5);
        box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
    }
    
    .symbol-col span {
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        background: linear-gradient(135deg, #ffffff, #e2e8f0);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    /* Enhanced price displays */
    .price-col {
        font-weight: 800;
        font-family: 'JetBrains Mono', monospace;
        background: linear-gradient(135deg, #fbbf24, #f59e0b);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        letter-spacing: 0.3px;
        transition: all 0.3s ease;
    }
    
    .market-row-enhanced:hover .price-col {
        transform: scale(1.05);
        text-shadow: 0 0 15px rgba(251, 191, 36, 0.5);
    }
    
    /* Enhanced volume and market cap */
    .volume-col, .mcap-col {
        font-weight: 600;
        color: #e2e8f0;
        transition: all 0.3s ease;
    }
    
    .market-row-enhanced:hover .volume-col,
    .market-row-enhanced:hover .mcap-col {
        color: #f1f5f9;
        transform: translateX(2px);
    }
    
    /* Enhanced scrollbar */
    .enhanced-markets-container::-webkit-scrollbar {
        width: 8px;
    }
    
    .enhanced-markets-container::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 4px;
    }
    
    .enhanced-markets-container::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, #8b5cf6, #10b981);
        border-radius: 4px;
        box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
    }
    
    .enhanced-markets-container::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(135deg, #7c3aed, #059669);
    }

    /* Enhanced desktop header - uses shared classes */
    .markets-header-desktop {
        border-radius: 8px 8px 0 0;
        margin-bottom: 0;
        margin-top: 0.5rem;
    }

    /* Summary cell styling */
    .summary-cell {
        text-align: center;
        font-weight: 600;
        font-size: 0.8rem;
    }

    .summary-title {
        font-weight: 700;
        color: var(--text-primary);
    }

    .summary-span-3 {
        grid-column: span 3;
        text-align: left;
        padding-left: 0.5rem;
    }
    
    /* Legend toggle button */
    .legend-toggle-btn {
        background: linear-gradient(135deg, rgba(139, 92, 246, 0.8), rgba(99, 102, 241, 0.8));
        border: 1px solid rgba(139, 92, 246, 0.5);
        border-radius: 6px;
        padding: 0.5rem 1rem;
        color: white;
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        margin-left: 1rem;
    }
    
    .legend-toggle-btn:hover {
        background: linear-gradient(135deg, rgba(139, 92, 246, 1), rgba(99, 102, 241, 1));
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    }
    
    .legend-panel {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1000;
        background: rgba(0, 0, 0, 0.95);
        border: 1px solid rgba(139, 92, 246, 0.3);
        border-radius: 8px;
        padding: 1rem;
        margin-top: 0.5rem;
        backdrop-filter: blur(10px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    }
    
    .markets-sorting-controls {
        position: relative;
    }

    /* Add subtle animations to loading states */
    .loading {
        background: linear-gradient(135deg, 
            rgba(139, 92, 246, 0.1) 0%,
            rgba(16, 185, 129, 0.1) 100%);
        border: 1px solid rgba(139, 92, 246, 0.2);
        border-radius: 8px;
        padding: 2rem;
        text-align: center;
        color: var(--aurora-purple);
        font-weight: 600;
        animation: loadingPulse 2s ease-in-out infinite;
    }
    
    @keyframes loadingPulse {
        0%, 100% {
            opacity: 0.8;
            transform: scale(1);
        }
        50% {
            opacity: 1;
            transform: scale(1.01);
        }
    }

/* Mobile Responsive Enhancements for Multiple Timeframes */
@media (max-width: 767px) {
    .market-row-enhanced {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 12px;
        margin: 8px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .market-row-enhanced:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(139, 92, 246, 0.2);
    }
    
    /* Mobile card layout for timeframes */
    .change-24h-col, .change-7d-col, .change-14d-col,
    .change-30d-col, .change-90d-col, .change-1y-col {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        margin: 4px 0;
    }
    
    .change-24h-col::before { content: "24h: "; opacity: 0.7; font-weight: 600; }
    .change-7d-col::before { content: "7d: "; opacity: 0.7; font-weight: 600; }
    .change-14d-col::before { content: "14d: "; opacity: 0.7; font-weight: 600; }
    .change-30d-col::before { content: "30d: "; opacity: 0.7; font-weight: 600; }
    .change-90d-col::before { content: "90d: "; opacity: 0.7; font-weight: 600; }
    .change-1y-col::before { content: "1y: "; opacity: 0.7; font-weight: 600; }
    
    .zscore-under-change {
        margin-left: auto;
        margin-top: 0;
    }
}

/* Ultra-wide screen optimizations */
@media (min-width: 1600px) {
    .market-grid-base {
        grid-template-columns: 50px 110px 140px 120px 120px 80px 80px 80px 80px 80px 80px 120px;
    }
}

/* Professional glow effects for the entire container */
.enhanced-markets-container {
    position: relative;    
    overflow: hidden;    
    width: 100%;
    border-radius: 12px;
    box-sizing: border-box;
}

/* Markets list area with black background */
.markets-list-enhanced {
    background: rgba(0, 0, 0);
    min-height: 200px;
}

.enhanced-markets-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 18px;
    z-index: -1;
    animation: borderGlow 4s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% {
        opacity: 0.5;
        filter: blur(1px);
    }
    50% {
        opacity: 0.8;
        filter: blur(2px);
    }
}

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

    .zscore-col {
        text-align: center;
    }

    .market-change-compact .change-percentage {
        padding: 0.2rem 0.4rem;
        border-radius: 4px;
        font-size: 0.85rem;
        font-weight: 700;
    }

    .market-change-compact .z-score-compact {
        font-size: 0.7rem;
        padding: 0.1rem 0.3rem;
        border-radius: 3px;
        font-weight: 600;
        background: rgba(255, 255, 255, 0.1) !important;
        color: var(--text-muted) !important;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .z-score-compact {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
        border-radius: 6px;
        font-weight: 600;
    }

    .symbol-info {
        display: flex;
        flex-direction: column;
        gap: 0.1rem;
    }

    .market-info {
        margin-left: 1rem;
        flex: 1;
    }

    .price-periods-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .additional-stats {
        grid-template-columns: repeat(4, 1fr);
    }

    /* REMOVED - These rules are now properly placed in the desktop media query below */

    .markets-summary-row .summary-label {
        font-weight: 800;
        color: var(--aurora-green);
        text-align: center;
    }

    .markets-summary-row .summary-value {
        text-align: right;
        font-weight: 700;
    }

    .markets-summary-row .summary-value.positive {
        color: #22c55e;
    }

    .markets-summary-row .summary-value.negative {
        color: #ef4444;
    }

    .markets-summary-row .summary-timeframe {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 2px;
        text-align: right;
    }

    .markets-summary-row .summary-avg {
        font-size: 0.85rem;
        line-height: 1;
    }

    .markets-summary-row .summary-stddev {
        font-size: 0.65rem;
        opacity: 0.8;
        color: var(--text-muted);
        line-height: 1;
    }

    .header-coin {
        text-align: center !important;
    }

    /* Sortable column styling */
    .sortable-column {
        cursor: pointer;
        user-select: none;
        transition: all 0.2s ease;
        position: relative;
        white-space: nowrap; /* Prevent text wrapping */
        overflow: hidden; /* Hide overflow */
        text-overflow: ellipsis; /* Add ... if text too long */
        display: block; /* Ensure proper display */
    }

    .sortable-column:hover {
        transform: translateY(-1px);
        text-shadow: 0 3px 6px rgba(230, 168, 67, 0.5);
        filter: drop-shadow(0 0 12px rgba(244, 200, 98, 0.6));
    }

    .sortable-column:active {
        transform: translateY(0);
    }

    /* Sort direction indicators using CSS pseudo-elements */
    .sortable-column[data-direction="asc"]::after {
        content: " ↑";
        color: var(--primary-color);
        font-weight: bold;
    }

    .sortable-column[data-direction="desc"]::after {
        content: " ↓";
        color: var(--primary-color);
        font-weight: bold;
    }

    .header-name {
        text-align: left !important;
    }

    .header-price {
        text-align: center !important;
    }

    .header-change {
        text-align: right !important;
    }

    .header-zscore {
        text-align: center !important;
    }

    .header-change-1y {
        text-align: center !important;
    }

    /* Shared market grid layout classes */
    .market-grid-base {
        display: grid !important;
        grid-template-columns: 50px 100px 110px 105px 95px 75px 75px 75px 75px 75px 75px 110px;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .market-grid-header-footer-base {
        background: linear-gradient(135deg, 
            rgba(139, 92, 246, 0.2) 0%,
            rgba(99, 102, 241, 0.15) 50%,
            rgba(16, 185, 129, 0.1) 100%);
        border: 1px solid rgba(139, 92, 246, 0.4);
        box-shadow: 
            0 4px 20px rgba(139, 92, 246, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        font-weight: 700;
        font-size: 0.85rem;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .market-grid-text-base {
        text-align: center;
        padding: 0;
        background: linear-gradient(135deg, #E6A843 0%, #F4C862 25%, #E6A843 50%, #D49B38 75%, #F1C15B 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        text-shadow: 0 2px 4px rgba(230, 168, 67, 0.3);
        filter: drop-shadow(0 0 8px rgba(244, 200, 98, 0.4));
        font-weight: 600;
    }

    /* Coin name truncation - stretch and ellipsis */
    .coin-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
        display: block;
    }

    /* ATH% blue styling for dark mode */
    .ath-blue {
        color: #60A5FA !important;
        font-weight: 600;
    }

    .ath-col.ath-blue {
        color: #60A5FA !important;
    }

    /* Chart column styling */
    .chart-col {
        padding: 2px;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 30px;
    }

    /* Beautiful mini sparkline styling */
    .mini-sparkline {
        width: 100px;
        height: 25px;
        border-radius: 4px;
        background: transparent;
        padding: 2px;
        overflow: hidden;
        position: relative;
    }

    .sparkline-canvas {
        width: 100%;
        height: 100%;
        border-radius: 2px;
    }

    .sparkline-gradient {
        background: linear-gradient(90deg, 
            rgba(16, 185, 129, 0.1) 0%, 
            rgba(16, 185, 129, 0.3) 100%);
    }

    .sparkline-gradient.negative {
        background: linear-gradient(90deg, 
            rgba(239, 68, 68, 0.1) 0%, 
            rgba(239, 68, 68, 0.3) 100%);
    }

    /* Desktop footer - uses shared classes */
    .markets-footer-desktop {
        border-radius: 0 0 8px 8px;
        margin-bottom: 0;
    }



    /* Desktop individual column styling */
    .market-row-enhanced .market-rank {
        font-size: 0.8rem;
        color: var(--text-muted);
        text-align: center;
        font-weight: 600;
    }

    .market-row-enhanced .market-symbol {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .market-row-enhanced .market-symbol img {
        width: 28px;
        height: 28px;
        border-radius: 50%;
    }

    .market-row-enhanced .market-symbol-text {
        font-weight: 700;
        color: var(--text-primary);
        text-transform: uppercase;
        font-size: 0.9rem;
    }

    .market-row-enhanced .market-name {
        font-weight: 600;
        color: var(--text-secondary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .market-row-enhanced .market-price {
        font-weight: 700;
        color: var(--text-primary);
        font-family: 'Courier New', monospace;
        text-align: right;
    }

    .market-row-enhanced .market-vol, 
    .market-row-enhanced .market-mcap, 
    .market-row-enhanced .market-ath {
        font-size: 0.8rem;
        color: var(--text-muted);
        text-align: right;
    }

    .market-row-enhanced .change-percentage {
        text-align: right;
        font-weight: 700;
        font-size: 0.9rem;
    }

    .market-row-enhanced .z-score-compact {
        text-align: center;
        font-weight: 600;
        font-size: 0.75rem;
    }

    /* Enhanced price change styling for desktop */
    .market-change .change-percentage {
        transition: all 0.2s ease;
    }
    
    .market-change .change-percentage:hover {
        transform: scale(1.05);
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
    
    .market-change.positive .change-percentage {
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.15));
        border: 1px solid rgba(34, 197, 94, 0.3);
    }
    
    .market-change.negative .change-percentage {
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.15));
        border: 1px solid rgba(239, 68, 68, 0.3);
    }

.market-symbol {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.market-symbol img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}

.market-symbol-text {
    font-weight: 600;
    color: var(--text-primary);
}

.market-rank {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

.market-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.market-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.market-price {
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
}

.market-change {
    font-weight: 500;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.market-change.positive {
    color: #22c55e;
}

.market-change.negative {
    color: #ef4444;
}

.change-percentage {
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.change-percentage.positive {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.3);
}

.change-percentage.negative {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Sorting Controls */
.markets-sorting-controls {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.sort-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.sort-btn {
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.sort-btn:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.sort-btn.active {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    color: var(--aurora-purple);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

.sort-btn.active:hover {
    background: rgba(139, 92, 246, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Disclaimer Modal */
.disclaimer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    padding: 1rem;
}

.disclaimer-modal {
    background: var(--card-bg);
    border: 2px solid var(--gold-bright);
    border-radius: 16px;
    padding: 2rem;
    max-width: 90vw;
    max-height: 90vh;
    width: 600px;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8),
                0 0 40px rgba(255, 215, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    position: relative;
    margin: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.disclaimer-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.disclaimer-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.disclaimer-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.disclaimer-content {
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.disclaimer-content h3 {
    color: var(--primary-color);
    margin: 1.5rem 0 0.5rem 0;
    font-size: 1.1rem;
}

.disclaimer-content p {
    margin-bottom: 1rem;
}

.disclaimer-highlight {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--danger-color);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.disclaimer-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.disclaimer-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
}

.btn-accept {
    background: var(--success-color);
    color: white;
}

.btn-accept:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-decline {
    background: var(--danger-color);
    color: white;
}

.btn-decline:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Tablet Portrait Optimization - Compact Markets Display */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Container padding optimization for tablet */
    .container {
        padding: 8px;
    }
    
    /* Reduce priority cards gap for tablet */
    .priority-cards {
        gap: 0.5rem;
    }
    
    /* Reduce nav-tabs margin for tablet */
    .nav-tabs {
        margin-bottom: 1rem;
    }
    
    /* Reduce card padding to maximize valuable width space */
    .card {
        padding: 0.5rem;
    }
    
    /* Enhanced Markets Container - Tablet Portrait Optimization */
    .enhanced-markets-container {
        font-size: 0.75rem;
        line-height: 1.2;
    }
    
    /* Tablet-optimized grid layout - optimized coin and chart columns */
    .market-grid-base {
        grid-template-columns: 30px 80px 70px 70px 65px 55px 55px 55px 55px 55px 55px 80px;
        gap: 0.15rem;
        padding: 0.25rem;
        font-size: 0.7rem;
    }
    
    /* Markets header and footer adjustments */
    .markets-header-desktop,
    .markets-footer-desktop,
    .markets-summary-row {
        font-size: 0.6rem;
        padding: 0.25rem;
        gap: 0.15rem;
    }
    
    .markets-header-desktop > div,
    .markets-footer-desktop > div {
        font-size: 0.6rem;
        font-weight: 600;
        letter-spacing: 0.2px;
        line-height: 1;
        padding: 0.1rem;
    }
    
    /* Individual market row adjustments */
    .market-row-enhanced {
        padding: 0.25rem;
        font-size: 0.65rem;
        min-height: 32px;
    }
    
    /* Rank column - ultra compact */
    .market-rank,
    .rank-col {
        font-size: 0.55rem;
        font-weight: 600;
        text-align: center;
        padding: 0.1rem;
    }
    
    /* Symbol column - compact but readable */
    .symbol-col {
        padding: 0.1rem;
    }
    
    .market-symbol img,
    .coin-image {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }
    
    .coin-main {
        gap: 0.2rem;
        align-items: center;
    }
    
    .coin-symbol {
        font-size: 0.65rem;
        font-weight: 700;
        line-height: 1;
    }
    
    .coin-name {
        font-size: 0.48rem;
        line-height: 1;
        max-width: 70px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .coin-info {
        min-width: 0;
        flex: 1;
        max-width: 70px;
    }
    
    /* Price column - prominent */
    .price-col {
        font-size: 0.65rem;
        font-weight: 700;
        padding: 0.1rem;
        text-align: right;
    }
    
    /* Market Cap and Volume - compact */
    .mcap-col,
    .volume-col {
        font-size: 0.55rem;
        font-weight: 500;
        text-align: right;
        padding: 0.1rem;
    }
    
    /* ATH column - sized to match timeframe columns */
    .ath-col {
        font-size: 0.58rem;
        font-weight: 600;
        text-align: center;
        padding: 0.1rem;
        min-width: 55px;
        width: 55px;
    }
    
    /* All timeframe change columns - compact to fit chart in 810px */
    .change-24h-col,
    .change-7d-col, 
    .change-14d-col,
    .change-30d-col, 
    .change-1y-col {
        font-size: 0.58rem;
        font-weight: 700;
        min-width: 55px;
        width: 55px;
        line-height: 1;
        gap: 1px;
        padding: 0.1rem;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    /* Z-score indicators under timeframes - minimal */
    .zscore-under-change {
        font-size: 0.45rem;
        font-weight: 500;
        padding: 0px;
        border-radius: 1px;
        margin-top: 0px;
        line-height: 1;
        opacity: 0.7;
    }
    
    /* Chart column - optimized sparkline for tablet fit */
    .chart-col {
        padding: 0.05rem;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 28px;
        width: 80px;
    }
    
    .mini-sparkline {
        width: 72px;
        height: 22px;
        border-radius: 3px;
        overflow: hidden;
    }
    
    .sparkline-canvas {
        width: 100%;
        height: 100%;
        border-radius: 1px;
    }
    
    /* Summary row specific styling - ultra compact */
    .markets-summary-row {
        padding: 0.25rem;
        font-size: 0.6rem;
        margin-bottom: 0.2rem;
    }
    
    .summary-label {
        font-size: 0.65rem;
        font-weight: 700;
    }
    
    .summary-cell {
        font-size: 0.55rem;
        padding: 0.1rem 0.05rem;
        line-height: 1;
    }
    
    .summary-timeframe {
        gap: 0px;
    }
    
    .summary-avg {
        font-size: 0.6rem;
        line-height: 1;
    }
    
    .summary-stddev {
        font-size: 0.45rem;
        line-height: 1;
    }
    
    /* Market change percentages - readable but compact */
    .change-percentage {
        font-size: 0.55rem;
        font-weight: 700;
        padding: 0.05rem 0.1rem;
        border-radius: 2px;
        line-height: 1;
    }
    
    /* Z-score compact indicators */
    .z-score-compact {
        font-size: 0.45rem;
        font-weight: 500;
        padding: 0.02rem 0.08rem;
        border-radius: 1px;
    }
    
    /* Sortable column headers */
    .sortable-column {
        font-size: 0.65rem;
        letter-spacing: 0.2px;
    }
    
    .sortable-column::after {
        font-size: 0.7rem;
    }
    
    /* Reduced hover effects for tablet touch interface */
    .market-row-enhanced:hover {
        transform: translateY(-1px);
        border-radius: 4px;
        margin: 0 -0.1rem;
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }
    
    /* Sorting controls for tablet */
    .markets-sorting-controls {
        margin-bottom: 0.5rem;
        padding: 0.4rem;
    }
    
    .sort-btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.65rem;
    }
    
    /* Legend toggle button */
    .legend-toggle-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.65rem;
        margin-left: 0.5rem;
    }
    
    /* Ensure all text remains readable */
    .enhanced-markets-container * {
        font-size: inherit;
        line-height: 1.1;
    }
    
    /* Specific width constraints to ensure fit */
    .enhanced-markets-container {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Crypto Ticker Tablet Optimizations for 810x1080 Portrait Mode */
    .crypto-ticker-container {
        margin-bottom: 0.5rem;
    }
    
    /* Make pinned BTC/ETH section more compact */
    .crypto-pinned-section {
        min-width: 300px;
        padding: 0 0.5rem;
        gap: 0.5rem;
        height: 50px;
    }
    
    .pinned-item {
        width: 140px;
        min-width: 140px;
        max-width: 140px;
        padding: 0.2rem 0.5rem;
        gap: 0.5rem;
    }
    
    .pinned-item .crypto-icon {
        width: 24px;
        height: 24px;
    }
    
    .pinned-item .crypto-symbol {
        font-size: 0.75rem;
    }
    
    .pinned-item .crypto-rank {
        font-size: 0.55rem;
    }
    
    .pinned-item .crypto-price {
        font-size: 0.75rem;
    }
    
    .pinned-item .crypto-change {
        font-size: 0.65rem;
    }
    
    /* Make scrolling ticker more compact */
    .crypto-ticker {
        height: 50px;
    }
    
    .crypto-item {
        width: 140px;
        min-width: 140px;
        max-width: 140px;
        padding: 0.2rem 0.5rem;
        gap: 0.5rem;
    }
    
    .crypto-item .crypto-icon {
        width: 24px;
        height: 24px;
    }
    
    .crypto-item .crypto-symbol {
        font-size: 0.75rem;
    }
    
    .crypto-item .crypto-rank {
        font-size: 0.55rem;
    }
    
    .crypto-item .crypto-price {
        font-size: 0.75rem;
    }
    
    .crypto-item .crypto-change {
        font-size: 0.65rem;
    }
    
    .ticker-content {
        gap: 1rem;
        padding: 0 0.5rem;
    }
}

/* Responsive - Mobile-First Ultra-Compact */
@media (max-width: 768px) {
    .container {
        padding: 8px;
    }
    
    .dashboard-row {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.5rem;
        justify-content: space-between;
    }
    
    .logo {
        font-size: 0.9rem;
        flex-shrink: 1;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .logo-img {
        height: 20px; /* Half the original desktop size */
        width: auto;
        flex-shrink: 0;
    }
    
    .logo-text {
        display: inline; /* Show text on mobile now */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
        flex-shrink: 1;
    }
    
    .status-indicators {
        flex: 0 0 auto;
    }
    
    .status-compact {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
        border-radius: 16px;
        gap: 0.3rem;
    }
    
    .status-dot {
        width: 6px;
        height: 6px;
    }
    
    #time-compact {
        font-size: 0.65rem;
    }

    .nav-tabs {
        position: sticky;
        top: 0;
        z-index: 100;
        margin-bottom: 1rem;
        padding: 6px;
        gap: 4px;
    }

    .nav-tab {
        padding: 1rem 0.5rem;
        font-size: 0.9rem;
        min-height: 70px;
    }
    
    .tab-icon {
        font-size: 1.4rem;
    }
    
    .tab-text {
        font-size: 0.75rem;
        letter-spacing: 0.3px;
    }

    .priority-cards,
    .secondary-cards {
        gap: 1.5rem;
        display: grid; /* Ensure stacked layout on mobile */
    }
    
    .priority-cards {
        margin-bottom: 2rem; /* Add bottom margin for mobile */
    }
    
    .secondary-cards {
        grid-template-columns: 1fr; /* Single column on mobile */
    }
    
    .priority-cards .card:first-child,
    .priority-cards .card:nth-child(2) {
        /* Reset flex properties on mobile */
        flex: none;
    }

    .card {
        padding: 1rem;
    }

    .card-title {
        font-size: 1rem;
    }

    .chat-header {
        padding: 1rem;
    }

    .chat-title {
        font-size: 1.25rem;
    }

    .chat-container-fullscreen {
        min-height: 400px;
        padding: 1rem;
    }

    /* Touch-friendly buttons */
    .ask-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
        min-height: 44px;
        min-width: 44px;
    }

    .chat-send {
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
        min-height: 44px;
    }

    /* Optimize ticker for mobile */
    .crypto-ticker {
        height: 60px;
    }
    
    .ticker-content {
        padding: 0 1rem; /* Maintain spacing on mobile */
        gap: 1rem; /* Slightly less gap on mobile */
        margin: 0 1rem; /* Add margin to match desktop version */
    }

    .crypto-item {
        min-width: 160px;
        padding: 0.5rem 0.75rem;
    }

    .crypto-icon {
        width: 24px;
        height: 24px;
    }

    /* Mobile market list - Enhanced with proper layout */
    .markets-header-desktop,
    .markets-footer-desktop,
    .markets-summary-row {
        display: none !important;
    }
    
    .market-row-enhanced {
        padding: 0.75rem;
        display: block;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        transition: background 0.2s ease;
    }

    .market-row-enhanced:hover {
        background: rgba(139, 92, 246, 0.05);
    }

    .market-left {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 0.5rem;
        max-width: 180px;
    }

    .market-symbol {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-shrink: 0;
    }

    .market-symbol img {
        width: 28px;
        height: 28px;
        border-radius: 50%;
    }

    .symbol-info {
        display: flex;
        flex-direction: column;
        gap: 0.1rem;
    }

    .market-symbol-text {
        font-size: 0.9rem;
        font-weight: 600;
    }

    .market-rank {
        font-size: 0.7rem;
        margin-left: auto;
    }

    .market-info {
        grid-column: 2;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        text-align: right;
        max-width: 120px;
    }

    .market-name {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100px;
    }

    .market-price {
        font-size: 0.9rem;
        font-weight: 600;
        margin-bottom: 0.25rem;
    }

    .market-change {
        font-size: 0.8rem;
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
        justify-content: flex-end;
    }

    .z-score-indicator {
        font-size: 0.6rem;
        padding: 0.1rem 0.25rem;
    }

    .market-right {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .market-stats {
        display: flex;
        flex-direction: column;
        gap: 0.1rem;
        text-align: right;
        min-width: 50px;
    }

    /* Hide volume and market cap columns on mobile */
    .market-volume,
    .market-cap {
        display: none;
    }

    /* Hide desktop header on mobile */
    .markets-header-enhanced {
        display: none;
    }

    .market-vol {
        font-size: 0.6rem;
        color: var(--text-muted);
        line-height: 1;
    }

    .market-mcap {
        font-size: 0.6rem;
        color: var(--text-muted);
        line-height: 1;
    }

    .market-ath {
        font-size: 0.6rem;
        line-height: 1;
        font-weight: 500;
    }

    .market-ath.positive {
        color: var(--aurora-green);
    }

    .market-ath.negative {
        color: #ef4444;
    }

    /* Compact Z-Score Background Colors */
    .market-change-compact {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0.4rem;
        border-radius: 6px;
        text-align: center;
        min-width: 60px;
        min-height: 40px;
    }

    /* Z-Score Background Colors */
    .market-change-compact.z-score-extreme-negative {
        background: rgba(239, 68, 68, 0.25);
        border: 1px solid rgba(239, 68, 68, 0.4);
    }

    .market-change-compact.z-score-high-negative {
        background: rgba(239, 68, 68, 0.18);
        border: 1px solid rgba(239, 68, 68, 0.3);
    }

    .market-change-compact.z-score-negative {
        background: rgba(239, 68, 68, 0.12);
        border: 1px solid rgba(239, 68, 68, 0.2);
    }

    .market-change-compact.z-score-neutral {
        background: rgba(156, 163, 175, 0.08);
        border: 1px solid rgba(156, 163, 175, 0.15);
    }

    .market-change-compact.z-score-positive {
        background: rgba(16, 185, 129, 0.12);
        border: 1px solid rgba(16, 185, 129, 0.2);
    }

    .market-change-compact.z-score-high-positive {
        background: rgba(16, 185, 129, 0.18);
        border: 1px solid rgba(16, 185, 129, 0.3);
    }

    .market-change-compact.z-score-extreme-positive {
        background: rgba(16, 185, 129, 0.25);
        border: 1px solid rgba(16, 185, 129, 0.4);
    }

    .change-percentage {
        font-size: 0.75rem;
        font-weight: 700;
        line-height: 1;
        margin-bottom: 0.15rem;
    }

    .z-score-compact {
        font-size: 0.6rem;
        font-weight: 500;
        opacity: 0.8;
        line-height: 1;
    }

    /* Mobile statistics summary */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-item {
        padding: 0.5rem;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    .legend-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .z-score-indicator {
        font-size: 0.65rem;
        padding: 0.1rem 0.3rem;
    }
    

    
    .stat-label {
        font-size: 0.6rem;
        margin-bottom: 0.1rem;
    }
    
    .stat-value {
        font-size: 0.75rem;
    }
    
    .legend-info {
        display: none; /* Hide legend on mobile for space */
    }

    /* Mobile sorting controls */
    .markets-sorting-controls {
        margin: 0.5rem;
        padding: 0.5rem;
    }

    .sort-buttons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.25rem;
    }

    .sort-btn {
        padding: 0.4rem 0.5rem;
        font-size: 0.7rem;
        text-align: center;
    }

    /* Mobile disclaimer styling */
    .disclaimer-modal {
        margin: 1rem;
        padding: 1.5rem;
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
    }

    .disclaimer-title {
        font-size: 1.25rem;
    }

    .disclaimer-content {
        font-size: 0.875rem;
        line-height: 1.5;
    }

    .disclaimer-actions {
        gap: 0.75rem;
    }

    .disclaimer-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.875rem;
        min-width: 100px;
        flex: 1;
    }
}

/* Ultra-compact for very small screens */
@media (max-width: 480px) {
    .header-content {
        padding: 0 10px;
        gap: 0.4rem;
    }
    
    .logo {
        font-size: 0.8rem;
        gap: 0.4rem;
    }
    
    .logo-img {
        height: 24px !important;
        width: auto;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .status-compact {
        padding: 0.25rem 0.5rem;
        font-size: 0.65rem;
        border-radius: 14px;
    }
    
    .status-dot {
        width: 5px;
        height: 5px;
    }
    
    #time-compact {
        font-size: 0.6rem;
    }

    .container {
        padding: 10px;
    }

    .nav-tab {
        padding: 0.5rem 0.25rem;
        font-size: 0.7rem;
    }

    .card {
        padding: 0.75rem;
    }

    .crypto-ticker-container {
        margin-bottom: 1rem;
        flex-direction: column;
    }

    .crypto-pinned-section {
        height: 50px;
        min-width: auto;
        width: 100%;
        border-right: none;
        padding: 0 0.5rem;
        background: transparent;
    }

    .pinned-item {
        width: 160px;
        min-width: 160px;
        max-width: 160px;
        padding: 0.2rem 0.6rem;
    }

    .crypto-ticker {
        height: 50px;
    }

    .crypto-item {
        min-width: 140px;
        width: 140px;
        max-width: 140px;
        padding: 0.2rem 0.6rem;
    }

    .market-left {
        max-width: 160px;
    }
    
    .market-info {
        max-width: 100px;
    }
    
    .market-name {
        max-width: 100px;
        font-size: 0.7rem;
    }
    
    .market-symbol-text {
        font-size: 0.75rem;
    }
    
    .market-price {
        font-size: 0.75rem;
    }
    
    .market-stats {
        font-size: 0.6rem;
    }
    
    .market-vol, .market-mcap {
        font-size: 0.55rem;
    }
    
    /* Consolidated mobile rules from removed duplicate @media block */
    .dashboard-row-flexible {
        grid-template-columns: 1fr !important;
    }
    
    .card-stack {
        gap: 0.5rem;
    }
    
    .insight-content {
        padding: 1rem;
        font-size: 0.875rem;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .nav-tabs {
        margin-bottom: 0.5rem;
    }

    .chat-container-fullscreen {
        min-height: 300px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-title,
    .nav-tab.active,
    .market-price {
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .money-symbol {
        display: none !important;
    }
}

/* Direct styling for insight containers - more compact */
#additional-insights,
#out-of-box,
#contrarian-trade {
    padding: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #cbd5e1;
}

#additional-insights,
#out-of-box {
    background: rgba(139, 92, 246, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.1);
}

#contrarian-trade {
    background: rgba(239, 68, 68, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.1);
}

.trade-recommendation {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}


.risk-level {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--bear-color);
    font-weight: 600;
}

.risk-indicator {
    display: flex;
    gap: 2px;
}

.risk-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bear-color);
}

/* Highlight Styles for Key Elements */
.highlight-bull {
    color: var(--bull-color) !important;
    font-weight: bold;
    text-shadow: var(--glow-green);
}

.highlight-bear {
    color: var(--bear-color) !important;
    font-weight: bold;
    text-shadow: var(--glow-red);
}

.highlight-target {
    background: var(--aurora-gradient-green);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

.highlight-important {
    background: var(--aurora-gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* Market Sentiment & Outlook Enhancements */
.sentiment-score-section {
    transition: background-color 0.3s ease;
}

.sentiment-score-section:hover {
    background: rgba(139, 92, 246, 0.1) !important;
}

/* Enhanced outlook cards */
#market-outlook > div {
    transition: all 0.2s ease;
    border: 1px solid transparent;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

#market-outlook > div:hover {
    background: rgba(139, 92, 246, 0.1) !important;
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: var(--glow-purple);
    transform: translateY(-2px);
}

/* Bull/Bear styling */
.outlook.bull, .highlight-bull {
    color: var(--bull-color) !important;
    font-weight: bold;
    text-shadow: var(--glow-green);
}

.outlook.bear, .highlight-bear {
    color: var(--bear-color) !important;
    font-weight: bold;
    text-shadow: var(--glow-red);
}

/* Price Target Highlights */
.price-target, .highlight-target {
    background: var(--aurora-gradient-green);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

/* Impact Score Stars */
.impact-stars {
    color: var(--aurora-yellow);
    text-shadow: 0 0 5px rgba(245, 158, 11, 0.5);
}

/* Enhanced emoji visibility */
.bull-bear-emoji {
    font-size: 1.1em;
    margin-right: 0.3rem;
}

/* Mobile responsive overrides consolidated above */

/* Improved scrollbars for modern browsers */
.news-feed::-webkit-scrollbar,
.events-container::-webkit-scrollbar {
    width: 6px;
}

.news-feed::-webkit-scrollbar-track,
.events-container::-webkit-scrollbar-track {
    background: rgba(139, 92, 246, 0.1);
}

.news-feed::-webkit-scrollbar-thumb,
.events-container::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 3px;
}

.news-feed::-webkit-scrollbar-thumb:hover,
.events-container::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.5);
}

/* Optimized Casino-Style Animations - Reduced CPU impact */
@keyframes cardPulse {
    0%, 100% { 
        transform: scale(1);
    }
    50% { 
        transform: scale(1.01);
    }
}

/* Optimized Interactive Hover Effects */
.card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 215, 0, 0.5);
    transition: all 0.3s ease;
}

/* Data Stream Animation */
.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #8b5cf6, transparent);
    animation: dataStream 2s ease-in-out infinite;
}

/* Optimized Working Indicators */
.status-dot {
    position: relative;
}

.status-dot::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    animation: sonarPulse 3s linear infinite;
}

/* Simplified Glowing Borders - Static for better performance */
.priority-card {
    position: relative;
    border: 2px solid rgba(255, 215, 0, 0.4);
}

/* Simplified Action Buttons */
.ask-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Priority card content width constraints */
.priority-card {
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.priority-card * {
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
}

.ask-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.4);
}

/* Simplified typing indicator - reduced CPU usage */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 1rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #6d28d9;
    border-radius: 50%;
    animation: typingPulse 1.5s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.3s; }
.typing-dot:nth-child(3) { animation-delay: 0.6s; }

/* Success Animation */
.success-animation {
    animation: successPulse 0.6s ease-in-out;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.1) 25%, 
        rgba(255, 215, 0, 0.1) 50%, 
        rgba(255, 255, 255, 0.1) 75%);
    background-size: 200% 100%;
    animation: skeleton 2s linear infinite;
}

/* Simplified title styling - removed CPU-intensive glow effect */
.card-title {
    position: relative;
}

/* Optimized hover transitions */
.nav-tab:hover,
.ask-btn:hover,
.market-row-enhanced:hover {
    transition: all 0.3s ease;
}

/* End of @media (max-width: 480px) block */
}

/* CSP-compliant CSS classes for inline styles */
.hidden { display: none !important; }
.summary-explanation {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    padding: 0.5rem 0;
}

/* Market data styling */
.positive { color: #10b981; }
.negative { color: #ef4444; }
.markets-list-enhanced .error-message {
    padding: 2rem;
    text-align: center;
    color: #ef4444;
    font-size: 1rem;
}
.markets-list-enhanced .error-message small {
    color: #9ca3af;
    display: block;
    margin-top: 0.5rem;
}

/* Ticker loading state */
.loading-ticker {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
}

/* Crypto symbol styling */
.crypto-symbol {
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-cell {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.25rem 0.25rem;
    line-height: 1.2;
}

.summary-cell:first-child {
    text-align: left;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    padding-left: 1rem;
    font-size: 0.8rem;
}

.summary-title {
    grid-column: span 3;
    text-align: center;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* Color coding for summary row percentages */
.summary-cell.positive {
    color: #10b981 !important;
    font-weight: 700;
}

.summary-cell.negative {
    color: #ef4444 !important;
    font-weight: 700;
}
.outlook-timestamp { font-size: 0.7rem; color: var(--text-muted); text-align: right; }
.insight-card-hidden { display: none; }
.contrarian-trade-content { padding: 1rem; background: rgba(239, 68, 68, 0.05); border-radius: 8px; border: 1px solid rgba(239, 68, 68, 0.1); font-size: 0.95rem; line-height: 1.6; color: #cbd5e1; }
.ai-header { text-align: center; padding: 0.75rem 0 1rem 0; border-bottom: 1px solid rgba(139, 92, 246, 0.2); margin-bottom: 1rem; }
.ai-title { font-size: 1.1rem; font-weight: 600; background: linear-gradient(45deg, #8b5cf6, #10b981); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.ai-subtitle { color: rgba(255, 255, 255, 0.6); font-size: 0.8rem; margin-top: 0.25rem; }

.legend-panel-hidden { display: none; }
.chat-input-hidden { display: none; }
.chat-messages-hidden { display: none; }
.no-data-message { padding: 2rem; text-align: center; color: #f59e0b; }
.no-data-small { color: #9ca3af; }
.error-message { padding: 1rem; text-align: center; color: #ef4444; }

/* Duplicate @media block removed - already exists above */
