/* Parent site theme: dark blue-gray, white text, yellow accent */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #FFD700;
    --accent-color: #F5C518;
    --success-color: #5BE0B0;
    --danger-color: #FF4136;
    --warning-color: #f59e0b;
    --info-color: #00BCD4;
    
    --bg-primary: #1A1E29;
    --bg-secondary: #1A1E29;
    --bg-tertiary: #2A2E3D;
    --bg-card: #2A2E3D;
    
    --text-primary: #FFFFFF;
    --text-secondary: #B0B0B0;
    --text-muted: #AAAAAA;
    
    --glass-bg: rgba(42, 46, 61, 0.95);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    
    --neon-glow: 0 0 20px rgba(255, 215, 0, 0.2);
    --neon-text-shadow: none;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

.text-muted {
    color: rgba(250, 253, 255, 0.75) !important;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--bg-primary);
    background-size: 400% 400%;
}

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

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.15), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.1), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.12), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: twinkle 4s ease-in-out infinite;
}

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

.twinkling {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 50px 50px, rgba(255,255,255,0.12), transparent),
        radial-gradient(1px 1px at 100px 100px, rgba(255,255,255,0.08), transparent);
    background-repeat: repeat;
    background-size: 300px 300px;
    animation: twinkle 3s ease-in-out infinite;
}

.clouds {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(60px 60px at 100px 100px, rgba(255,215,0,0.03), transparent),
        radial-gradient(40px 40px at 200px 200px, rgba(0,188,212,0.03), transparent);
    background-repeat: repeat;
    background-size: 400px 400px;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Header – same as parent site */
.gaming-header {
    background: var(--bg-primary);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--glass-shadow);
}

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

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
}

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

.logo-title {
    font-weight: 700;
    font-size: 2rem;
    color: var(--text-primary);
    margin: 0;
}

.logo-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 300;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    background: var(--success-color);
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}

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

.status-text {
    font-weight: 600;
    color: var(--success-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.time-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.refresh-btn {
    background: var(--primary-color);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    color: #1A1E29;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

/* Main Container */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Glass Card Base – parent card style */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Card Headers */
.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--info-color);
}

.card-header h3 {
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    flex: 1;
}

.message-counter {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    color: white;
    box-shadow: var(--neon-glow);
    display:none;
}

/* Card Bodies */
.card-body {
    padding: 1.5rem;
}

/* Highlight Cards */
.highlight-card.positive .header-icon {
    background: linear-gradient(135deg, var(--success-color), #059669);
}

.highlight-card.negative .header-icon {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
}

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

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-border);
    border-top: 3px solid var(--info-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-spinner-large {
    width: 60px;
    height: 60px;
    border: 4px solid var(--glass-border);
    border-top: 4px solid var(--info-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* Tables */
.table-container {
    max-height: 500px;
    overflow-y: auto;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.2);
}

.messages-table, .tickers-table {
    width: 100%;
    border-collapse: collapse;
}

.messages-table td, .tickers-table td, .tickers-table th {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.tickers-table th {
    background: rgba(255, 255, 255, 0.06);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

/* Message Cards */
.message-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 0.5rem 0;
    transition: all 0.3s ease;
}

.message-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-border);
    transform: translateX(4px);
}

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

.message-time {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.time-ago {
    font-weight: 600;
    color: var(--info-color);
    font-size: 0.9rem;
}

.message-tickers {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ticker-badge {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ticker-badge:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: var(--primary-color);
    transform: scale(1.02);
}

.message-content {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.message-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.sentiment-info, .confidence-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sentiment-bar-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sentiment-bar {
    width: 120px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.sentiment-fill {
    height: 100%;
    border-radius: 4px;
    position: absolute;
    transition: all 0.3s ease;
    top: 0;
}

.sentiment-fill.negative {
    background: linear-gradient(90deg, var(--danger-color), #dc2626);
    left: 50%;
    transform: translateX(-100%);
}

.sentiment-fill.positive {
    background: linear-gradient(90deg, var(--success-color), #059669);
    left: 50%;
}

.confidence-bar {
    width: 80px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--warning-color), #f59e0b);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Pagination */
.pagination-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-top: 1px solid var(--glass-border);
    margin-top: 1rem;
}

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

.pagination-controls {
    display: flex;
    gap: 0.5rem;
}

.pagination-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--bg-card);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Ticker View */
.ticker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.ticker-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ticker-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: var(--neon-glow);
}

.ticker-details h2 {
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    margin: 0;
    color: var(--text-primary);
}

.ticker-details p {
    color: var(--text-secondary);
    margin: 0;
}

.back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-btn:hover {
    background: var(--bg-card);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Stat Cards */
.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--info-color);
}

.stat-content h4 {
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.stat-content p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
}

/* Highlight Cards */
.highlight-positive, .highlight-negative {
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1rem;
}

.highlight-positive {
    background: rgba(91, 224, 176, 0.12);
    border: 1px solid rgba(91, 224, 176, 0.35);
}

.highlight-negative {
    background: rgba(255, 65, 54, 0.12);
    border: 1px solid rgba(255, 65, 54, 0.35);
}

.highlight-tickers {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: var(--text-primary);
}

.loading-content p {
    margin-top: 1rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .logo-title {
        font-size: 1.5rem;
    }
    
    .header-controls {
        gap: 1rem;
    }
    
    .main-container {
        padding: 1rem;
    }
    
    .card-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .message-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .pagination-footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .ticker-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Apply animations to elements */
.glass-card {
    animation: fadeInUp 0.6s ease-out;
}

.highlight-card.positive {
    animation: slideInLeft 0.6s ease-out;
}

.highlight-card.negative {
    animation: slideInRight 0.6s ease-out;
}

/* New message highlight */
.new-message {
    animation: newMessagePulse 2s ease-out;
}

@keyframes newMessagePulse {
    0% {
        background: rgba(255, 215, 0, 0.15);
        transform: scale(1.02);
    }
    100% {
        background: rgba(255, 255, 255, 0.05);
        transform: scale(1);
    }
}

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

.table-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.3);
}
