/* Enhanced styles for cluster visualization */

/* Add padding to body for fixed ticker tape */
body {
    padding-bottom: 50px;
}

/* Remove container margins for full-width layout */
.container {
    max-width: none;
    padding: 0;
    margin: 0;
}

/* Header with full width and minimal vertical space */
.header {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.header .container {
    max-width: none;
    padding: 0 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.header .logo {
    margin-bottom: 0;
    flex-shrink: 0;
}

.header .logo-icon {
    width: 32px;
    height: 32px;
}

.header .logo-text h1 {
    font-size: 1.5rem;
    margin: 0;
}

.header .logo-subtitle {
    font-size: 0.7rem;
}

.header .header-description {
    display: none; /* Hide description to save space */
}

.header .stats-bar {
    display: flex;
    gap: 2rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    margin: 0;
    flex: 1;
    justify-content: flex-end;
}

.header .stat-item {
    gap: 0.125rem;
}

.header .stat-value {
    font-size: 1.25rem;
}

.header .stat-label {
    font-size: 0.7rem;
}

/* Keep footer container with padding */
.footer .container {
    max-width: 1400px;
    padding: 0 2rem;
    margin: 0 auto;
}

/* CTA banner with some padding */
.cta-banner {
    margin: 0;
    border-radius: 0;
}

/* Data disclaimer */
.section-header {
    padding: 0 1.5rem;
    margin-top: 1.5rem;
}

.data-disclaimer {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.5rem;
    font-style: italic;
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 0;
    margin: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    margin: 0;
}

.filter-group select,
.filter-group input {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #475569;
    background: #0f172a;
    color: #f1f5f9;
    font-size: 0.875rem;
    min-width: 120px;
}

.filter-group input[type="text"] {
    min-width: 200px;
}

.filter-group input[type="number"] {
    min-width: 80px;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Treemap styles */
#treemap-container {
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    margin: 0;
}

.treemap-tooltip {
    max-width: 300px;
    line-height: 1.4;
}

/* Grid view enhancements */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

.topic-card {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #334155;
    position: relative;
    overflow: hidden;
}

.topic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #22c55e);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.topic-card:hover::before {
    transform: scaleX(1);
}

.topic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border-color: #3b82f6;
}

.sentiment-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.sentiment-indicator.bullish {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.sentiment-indicator.bearish {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.sentiment-indicator.neutral {
    background: #64748b;
}

.sentiment-indicator.mixed {
    background: linear-gradient(45deg, #22c55e 25%, #ef4444 25%, #ef4444 50%, #22c55e 50%, #22c55e 75%, #ef4444 75%);
    background-size: 10px 10px;
}

/* List view styles */
.topics-table {
    width: 100%;
    border-collapse: collapse;
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.topics-table thead {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
}

.topics-table th {
    padding: 1rem;
    text-align: left;
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.topics-table tbody tr {
    border-bottom: 1px solid #334155;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.topics-table tbody tr:hover {
    background: #334155;
}

.topics-table td {
    padding: 1rem;
    color: #e2e8f0;
    font-size: 0.875rem;
}

.sentiment-bar {
    display: flex;
    width: 100px;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    background: #0f172a;
}

.sentiment-bar .bullish {
    background: #22c55e;
}

.sentiment-bar .bearish {
    background: #ef4444;
}

.sentiment-bar .neutral {
    background: #64748b;
}

/* Source type badges */
.source-type-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.source-type-badge.news {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.source-type-badge.reddit {
    background: rgba(255, 107, 53, 0.2);
    color: #ff9b70;
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.source-type-badge.speculative {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.source-type-badge.earnings {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Symbol badges */
.symbol-badge {
    display: inline-block;
    padding: 0.2rem 0.4rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.25rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.symbol-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* Price widget container */
.price-widget {
    margin: 2rem 0;
    padding: 1rem;
    background: #1e293b;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.tradingview-widget-container {
    width: 100%;
    height: 400px;
}

/* Market heatmap */
.market-heatmap {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 2px;
    padding: 1rem;
    background: #0f172a;
    border-radius: 12px;
}

.heatmap-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.heatmap-cell:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.heatmap-symbol {
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
}

.heatmap-value {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

/* TradingView Ticker Tape */
.tradingview-ticker-tape {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 46px;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    background: #1e293b;
}

.tradingview-ticker-tape .tradingview-widget-container {
    width: 100%;
    height: 46px;
    overflow: hidden;
}

/* Symbol selector for price chart */
.symbol-selector-container {
    margin: 1rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.symbol-selector-container label {
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.875rem;
}

.symbol-selector-container select {
    padding: 0.5rem 1rem;
    background: #0f172a;
    color: #f1f5f9;
    border: 1px solid #475569;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    min-width: 150px;
}

.symbol-selector-container select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Price chart container */
.price-chart-container {
    margin: 1.5rem 0;
    background: #1e293b;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.price-chart-container h3 {
    color: #f1f5f9;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.price-chart-container .tradingview-widget-container {
    width: 100%;
    height: 600px;
    min-height: 600px;
}

.price-chart-container .tradingview-widget-container #tradingview_chart {
    width: 100% !important;
    height: 600px !important;
}

.price-chart-info {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid #3b82f6;
    border-radius: 4px;
    color: #cbd5e1;
    font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header .container {
        padding: 0 1rem;
        gap: 1rem;
    }

    .header .stats-bar {
        gap: 1rem;
        width: 100%;
        justify-content: space-between;
    }

    .header .stat-value {
        font-size: 1rem;
    }

    .header .stat-label {
        font-size: 0.65rem;
    }

    .filters-container {
        flex-direction: column;
        padding: 1rem;
    }

    .filter-group {
        width: 100%;
    }

    .topics-grid {
        grid-template-columns: 1fr;
    }

    .topics-table {
        font-size: 0.75rem;
    }

    .topics-table th,
    .topics-table td {
        padding: 0.5rem;
    }

    .sentiment-bar {
        width: 60px;
    }
}

/* Animation classes */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.update-indicator {
    animation: pulse 2s infinite;
}

/* Loading states */
.skeleton-loader {
    background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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