/* Modern 2025 Design System */
:root {
    /* Primary Color Palette - Modern Blues & Teals */
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-200: #bae6fd;
    --primary-300: #7dd3fc;
    --primary-400: #38bdf8;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --primary-800: #075985;
    --primary-900: #0c4a6e;
    
    /* Accent Colors */
    --accent-electric: #06b6d4;
    --accent-neon: #10b981;
    --accent-warning: #f59e0b;
    --accent-error: #ef4444;
    
    /* Neutral Palette */
    --neutral-0: #ffffff;
    --neutral-50: #f8fafc;
    --neutral-100: #f1f5f9;
    --neutral-200: #e2e8f0;
    --neutral-300: #cbd5e1;
    --neutral-400: #94a3b8;
    --neutral-500: #64748b;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1e293b;
    --neutral-900: #0f172a;
    
    /* Glass Effects */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-neon: 0 0 20px rgba(6, 182, 212, 0.5);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-electric) 0%, var(--primary-600) 100%);
    --gradient-surface: linear-gradient(135deg, var(--neutral-50) 0%, var(--neutral-100) 100%);
    --gradient-dark: linear-gradient(135deg, var(--neutral-800) 0%, var(--neutral-900) 100%);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--neutral-900) 0%, var(--primary-900) 50%, var(--neutral-900) 100%);
    min-height: 100vh;
    color: var(--neutral-100);
    overflow-x: hidden;
}

/* Animated background particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(6, 182, 212, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(16, 185, 129, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(14, 165, 233, 0.3), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(6, 182, 212, 0.2), transparent);
    background-size: 200px 200px;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(-10px) rotate(-1deg); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
    color: var(--neutral-100);
    position: relative;
}

.header::before {
    content: '';
    width:80px;
    height: 80px;
    background-image: url('/static/MattGPT.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    filter: drop-shadow(0 0 15px rgba(6, 182, 212, 0.5));
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.5)); }
    50% { filter: drop-shadow(0 0 30px rgba(6, 182, 212, 0.8)); }
}

.header-text {
    text-align: center;
}

.header h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 4px;
    background: linear-gradient(135deg, var(--accent-electric), var(--primary-400), var(--accent-neon));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    letter-spacing: -0.025em;
}

.header p {
    font-size: 0.95rem;
    opacity: 0.9;
    font-weight: 500;
    color: var(--neutral-300);
}

.agent-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), var(--glass-shadow);
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: calc(100vh - 100px);
    position: relative;
}

.agent-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-electric), transparent);
    animation: scan 3s ease-in-out infinite;
}

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

.input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.processing-indicator {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary-50);
    border-radius: var(--radius-md);
    color: var(--primary-700);
    font-size: 0.875rem;
    margin-top: 8px;
}

.processing-indicator.show {
    display: flex;
}

.table-toggle {
    padding: 16px 24px;
    background: var(--gradient-surface);
    border-bottom: 1px solid var(--neutral-200);
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.toggle-btn {
    padding: 10px 20px;
    border: 1px solid var(--neutral-300);
    background: var(--neutral-0);
    color: var(--neutral-700);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.toggle-btn:hover {
    background: var(--neutral-50);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.toggle-btn.active {
    background: var(--gradient-primary);
    color: var(--neutral-0);
    border-color: var(--primary-500);
}

.data-table {
    display: none;
    margin: 24px;
    background: var(--neutral-0);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--neutral-200);
    align-self: flex-start;
    flex: 1 1 auto;
}

.data-table.show {
    display: block;
}

.refresh-btn {
    padding: 8px 16px;
    background: var(--gradient-accent);
    color: var(--neutral-0);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition-normal);
}

.refresh-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.modal-action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
    border: 1px solid transparent;
}

.read-btn {
    background: var(--gradient-primary);
    color: var(--neutral-0);
    border-color: var(--primary-400);
}

.read-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 15px rgba(2, 132, 199, 0.4);
}

.discuss-btn {
    background: var(--gradient-accent);
    color: var(--neutral-0);
    border-color: var(--accent-electric);
}

.discuss-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 15px rgba(6, 182, 212, 0.4);
}

.agent-status {
    background: var(--gradient-primary);
    color: var(--neutral-0);
    padding: 16px 24px;
    text-align: center;
    font-weight: 600;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    position: relative;
    overflow: hidden;
}

.agent-status::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.status-indicators {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 12px;
    font-size: 0.875rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-neon);
    box-shadow: 0 0 10px var(--accent-neon);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.status-dot.pending {
    background: var(--accent-warning);
    box-shadow: 0 0 10px var(--accent-warning);
}

.status-dot.error {
    background: var(--accent-error);
    box-shadow: 0 0 10px var(--accent-error);
}

.search-controls {
    padding: 5px 8px;
    background: var(--gradient-surface);
    border-bottom: 1px solid var(--neutral-200);
    color: var(--neutral-700);
    gap: 12px;
    align-items: center;
    display: flex;
    backdrop-filter: blur(10px);
}

.action-buttons {
    padding: 5px 8px;
    background: var(--gradient-surface);
    border-bottom: 1px solid var(--neutral-200);
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    backdrop-filter: blur(10px);
}

.action-btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    min-width: 200px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid transparent;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.action-btn:hover::before {
    width: 300px;
    height: 300px;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.action-btn span {
    position: relative;
    z-index: 1;
}

.whats-going-on {
    background: var(--gradient-primary);
    color: var(--neutral-0);
    border-color: var(--primary-400);
}

.whats-going-on:hover {
    box-shadow: var(--shadow-xl), 0 0 20px rgba(2, 132, 199, 0.4);
}

.week-review {
    background: linear-gradient(135deg, var(--accent-warning), #d97706);
    color: var(--neutral-0);
    border-color: var(--accent-warning);
}

.week-review:hover {
    box-shadow: var(--shadow-xl), 0 0 20px rgba(245, 158, 11, 0.4);
}

.daily-podcast {
    background: linear-gradient(135deg, var(--accent-error), #dc2626);
    color: var(--neutral-0);
    border-color: var(--accent-error);
}

.daily-podcast:hover {
    box-shadow: var(--shadow-xl), 0 0 20px rgba(239, 68, 68, 0.4);
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--neutral-0);
}

/* Streaming interface styles */
.streaming-content {
    min-height: 1.5em;
    line-height: 1.6;
}

.streaming-cursor {
    display: inline-block;
    background: var(--primary-600);
    color: var(--primary-600);
    margin-left: 2px;
    animation: blink 1s infinite;
    font-weight: bold;
}

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

.message.assistant .streaming-content {
    color: var(--neutral-700);
}

/* Ensure streaming messages format properly */
.streaming-content strong {
    font-weight: 700;
}

.streaming-content em {
    font-style: italic;
}

/* Add subtle animation to streaming messages */
.message.assistant:has(.streaming-cursor) {
    animation: streamingGlow 2s ease-in-out infinite;
}

@keyframes streamingGlow {
    0%, 100% {
        box-shadow: var(--shadow-md);
    }
    50% {
        box-shadow: var(--shadow-md), 0 0 15px rgba(6, 182, 212, 0.2);
    }
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: var(--neutral-0);
    min-height: 0;
}

.messages-container::-webkit-scrollbar {
    width: 6px;
}

.messages-container::-webkit-scrollbar-track {
    background: var(--neutral-100);
}

.messages-container::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: var(--radius-full);
}

.messages-container::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-400);
}

.message {
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    max-width: 100%;
    animation: messageSlide 0.3s ease-out;
}

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

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--neutral-0);
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--neutral-0);
}

.message.assistant .message-avatar {
    background: var(--gradient-accent);
    box-shadow: var(--shadow-md), 0 0 20px rgba(6, 182, 212, 0.3);
}

.message.assistant .message-content {
    color: var(--neutral-700);
}

.message.user .message-avatar {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-md), 0 0 20px rgba(2, 132, 199, 0.3);
}

.message-content {
    background: var(--neutral-0);
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    max-width: 75%;
    line-height: 1.6;
    border: 1px solid var(--neutral-200);
    position: relative;
}

.message-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-accent);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.message.user .message-content {
    background: var(--gradient-primary);
    color: var(--neutral-0);
    border-color: var(--primary-400);
}

.message.user .message-content::before {
    background: rgba(255, 255, 255, 0.3);
}

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

.articles-table, .search-table {
    display: none;
    margin: 24px;
    background: var(--neutral-0);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--neutral-200);
}

.articles-table.show, .search-table.show {
    display: block;
}

.table-header {
    background: var(--gradient-primary);
    color: var(--neutral-0);
    padding: 20px 24px;
    font-weight: 600;
    font-size: 1.125rem;
}

.search-header {
    background: var(--gradient-accent);
    color: var(--neutral-0);
    padding: 20px 24px;
    font-weight: 600;
    font-size: 1.125rem;
}

.week-review-header {
    background: linear-gradient(90deg, var(--accent-warning), #d97706);
    color: var(--neutral-0);
    padding: 20px 24px;
    font-weight: 600;
    font-size: 1.125rem;
    text-align: center;
    margin-bottom: 40px;
}

.week-review-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.week-review-header h2 {
    font-size: 1.25rem;
    margin-bottom: 24px;
}

.week-review-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 24px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    margin-top: 4px;
}

.article-item, .search-item {
    border-bottom: 1px solid var(--neutral-200);
    padding: 24px;
    transition: all var(--transition-fast);
    position: relative;
}

.article-item:hover, .search-item:hover {
    background: var(--neutral-50);
    transform: translateX(4px);
}

.article-item::before, .search-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-accent);
    transform: scaleY(0);
    transition: transform var(--transition-normal);
}

.article-item:hover::before, .search-item:hover::before {
    transform: scaleY(1);
}

.article-item:last-child, .search-item:last-child {
    border-bottom: none;
}

.article-title, .search-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--neutral-800);
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-meta, .search-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 0.875rem;
    color: var(--neutral-500);
}

.relevance-score {
    background: var(--primary-100);
    color: var(--primary-700);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.75rem;
    border: 1px solid var(--primary-200);
}

.boost-score {
    background: linear-gradient(135deg, var(--accent-error), #dc2626);
    color: var(--neutral-0);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.75rem;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.boost-score::before {
    content: "🔥 ";
}

.search-score {
    background: var(--gradient-accent);
    color: var(--neutral-0);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.75rem;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.article-summary, .search-summary {
    color: var(--neutral-600);
    margin-bottom: 20px;
    line-height: 1.6;
}

.article-actions, .search-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--neutral-0);
    border-color: var(--primary-400);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 15px rgba(2, 132, 199, 0.4);
}

.btn-secondary {
    background: var(--gradient-surface);
    color: var(--neutral-700);
    border-color: var(--neutral-300);
}

.btn-secondary:hover {
    background: var(--neutral-100);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--gradient-accent);
    color: var(--neutral-0);
    border-color: var(--accent-electric);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 15px rgba(6, 182, 212, 0.4);
}

.input-area {
    padding: 24px;
    border-top: 1px solid var(--neutral-200);
    background: var(--neutral-0);
}

.input-container {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.message-input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-full);
    font-size: 1rem;
    resize: none;
    max-height: 120px;
    background: var(--neutral-50);
    transition: all var(--transition-normal);
    font-family: inherit;
}

.message-input:focus {
    outline: none;
    border-color: var(--primary-500);
    background: var(--neutral-0);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
    transform: translateY(-1px);
}

.send-btn {
    padding: 16px 24px;
    background: var(--gradient-primary);
    color: var(--neutral-0);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-normal);
    font-size: 1rem;
    box-shadow: var(--shadow-md);
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(2, 132, 199, 0.4);
}

.send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--shadow-sm);
}

.thinking-indicator {
    display: none;
    align-items: center;
    gap: 12px;
    margin: 24px;
    font-style: italic;
    color: var(--neutral-500);
    padding: 16px;
    /*background: var(--glass-bg);
    backdrop-filter: blur(20px);*/
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.thinking-indicator.show {
    display: flex;
}

.thinking-dots::after {
    content: '';
    animation: thinking 1.5s infinite;
}

@keyframes thinking {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    90%, 100% { content: ''; }
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.search-btn {
    padding: 12px 20px;
    background: var(--gradient-accent);
    color: var(--neutral-0);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.search-status {
    display: none;
    padding: 16px 24px;
    background: var(--primary-50);
    border-bottom: 1px solid var(--primary-200);
    color: var(--primary-700);
    font-size: 0.875rem;
    font-weight: 500;
}

.search-status.show {
    display: block;
}

/* Week Review Specific Styles */
.week-review-container {
    display: none;
    margin: 24px;
    background: var(--neutral-0);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--neutral-200);
}

.week-review-container.show {
    display: block;
}

.week-review-content {
    padding: 32px;
}

.week-review-summary {
    background: var(--gradient-surface);
    padding: 28px 36px;
    border-radius: var(--radius-lg);
    margin: 0 auto 32px auto;
    border-left: 4px solid var(--accent-warning);
    box-shadow: var(--shadow-md);
    line-height: 1.7;
    max-width: 100%;
}

.week-review-summary h3 {
    color: var(--neutral-800);
    margin-bottom: 16px;
    font-size: 1.5rem;
    font-weight: 700;
}

.week-review-summary p {
    color: var(--neutral-600);
    line-height: 1.7;
    margin-bottom: 16px;
}

.word-clouds-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(20px, 4vw, 40px);
    margin-bottom: 40px;
    justify-items: center;
    width: 100%;
}

.summary-section {
    margin-bottom: 24px;
}

.summary-section:last-child {
    margin-bottom: 0;
}

.summary-header {
    margin: 0 0 8px 0 !important;
    font-weight: 700 !important;
    color: var(--neutral-800) !important;
    font-size: 1.1em !important;
}

.summary-text {
    margin: 0 0 12px 0 !important;
    line-height: 1.7 !important;
}

.summary-text:last-child {
    margin-bottom: 0 !important;
}

@media (max-width: 768px) {
    .word-clouds-container {
        grid-template-columns: 1fr;
        gap: 24px;
        flex-direction: column;
        align-items: center;
    }
    
    .container {
        padding: 16px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 100%;
        max-width: 300px;
    }
}

.word-cloud-modal {
    background: var(--neutral-50);
    border-radius: var(--radius-md);
    border: 2px solid #e5e7eb;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40vh;
    min-height: 350px;
    max-height: none;
    flex: 0 0 350px;
    position: relative;
    width: 100%;
}

.word-cloud-stats-modal {
    text-align: center;
    font-size: 0.875rem;
    margin-bottom: 24px;
    flex: 0 0 auto;
}

.word-cloud-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--neutral-800);
    margin-bottom: 24px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.word-cloud {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--neutral-0);
    border-radius: var(--radius-md);
    border: 2px dashed var(--neutral-300);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.word-cloud-column {
    flex: 1;
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.word-cloud-column .data-table {
    width: 100% !important;
    max-width: 400px !important;
    margin: 16px auto 0 auto !important; /* Center with top margin */
    align-self: center; /* Ensure it centers within the flex column */
}

.word-cloud-column h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    text-align: center;
}

.word-cloud svg {
    max-width: 100%;
    height: auto;
}

.word-cloud-stats {
    margin-top: 16px;
    font-size: 0.875rem;
    color: var(--neutral-500);
    text-align: center;
}

.week-review-meta {
    background: var(--primary-50);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--primary-200);
    margin-top: 32px;
}

.week-review-meta h4 {
    color: var(--primary-700);
    margin-bottom: 16px;
    font-weight: 700;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meta-label {
    color: var(--neutral-600);
    font-weight: 600;
}

.meta-value {
    color: var(--primary-700);
    font-weight: 700;
}

.loading-cloud {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--neutral-500);
    font-style: italic;
}

.loading-cloud .progress-spinner {
    margin-bottom: 12px;
}

/* Enhanced Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    pointer-events: none;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    position: absolute;
    pointer-events: auto;
    background: var(--neutral-0);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    min-width: 400px;
    min-height: 300px;
    max-width: 100vw;
    max-height: 100vh;
    resize: both;
    overflow: hidden;
    border: 1px solid var(--neutral-200);
}

.modal-header {
    background: var(--gradient-primary);
    color: var(--neutral-0);
    padding: 20px 24px;
    font-weight: 700;
    cursor: move;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-header:active {
    cursor: grabbing;
}

.modal-close {
    pointer-events: auto !important;
    background: none;
    border: none;
    color: var(--neutral-0);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 1001;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-content {
    height: calc(100% - 140px);
    overflow-y: auto;
    padding: 0;
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--neutral-100);
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: var(--radius-full);
}

.modal-filters {
    padding: 20px 24px;
    background: var(--gradient-surface);
    border-bottom: 1px solid var(--neutral-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: nowrap;
}

.modal-search-section {
    flex: 1;
    position: relative;
    max-width: 300px;
    min-width: 200px;
}

.modal-search-input {
    width: 100%;
    padding: 8px 30px 8px 12px;
    border: 2px solid var(--neutral-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    outline: none;
    background: var(--neutral-0);
    transition: all var(--transition-normal);
    font-family: inherit;
}

.modal-search-input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.modal-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 16px;
    color: var(--neutral-500);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 2px;
    transition: all var(--transition-fast);
    z-index: 1;
}

.modal-search-clear:hover {
    background: var(--neutral-200);
    color: var(--neutral-700);
}

/* Responsive adjustments for modal search */
@media (max-width: 768px) {
    .modal-search-section {
        max-width: none;
        order: -1; /* Put search at top on mobile */
        margin-bottom: 8px;
    }
}

.filter-section, .sort-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-section label, .sort-section label {
    font-weight: 700;
    color: var(--neutral-700);
    font-size: 0.875rem;
    min-width: 60px;
}

.filter-buttons, .sort-buttons {
    display: flex;
    gap: 8px;
}

.filter-btn, .sort-btn {
    width: 120px;
    padding: 4px 8px;
    border: 1px solid var(--neutral-300);
    background: var(--neutral-0);
    color: var(--neutral-700);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-weight: 600;
    white-space: nowrap;
}

.filter-btn:hover, .sort-btn:hover {
    background: var(--neutral-50);
    border-color: var(--neutral-400);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.filter-btn.active, .sort-btn.active {
    background: var(--gradient-primary);
    color: var(--neutral-0);
    border-color: var(--primary-500);
    box-shadow: 0 0 15px rgba(2, 132, 199, 0.3);
}

.filter-btn.active:hover, .sort-btn.active:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md), 0 0 20px rgba(2, 132, 199, 0.4);
}

.filter-btn[data-filter="boosted"] {
    position: relative;
}

/*.filter-btn[data-filter="boosted"]:before {
    content: "🔥 ";
    margin-right: 4px;
}*/

.modal-header-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.word-clouds-section {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    margin: 30px 0 !important;
    max-width: 900px !important; /* Limit width for better centering */
    justify-items: center !important;
}

.data-table h3 {
    text-align: center !important;
    margin-bottom: 15px !important;
}

.frequency-table {
    width: 100% !important;
    margin: 0 auto !important;
    border-collapse: collapse;
}

.data-tables-section {
    display: flex;
    justify-content: center;
    grid-template-columns: 1fr 1fr !important;
    gap: 30px !important;
    margin: 30px auto !important;
    max-width: 900px !important;
    justify-items: center !important;
}

.data-table {
    width: 100% !important;
    max-width: 450px !important;
}

.podcast-listen-btn, .podcast-download-btn {
    background: var(--primary-600);
    color: var(--neutral-0);
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: flex;              /* Changed from inline-block */
    align-items: center;        /* Added for vertical centering */
    justify-content: center;    /* Added for horizontal centering */
    width: 120px;
    box-sizing: border-box;
}

.podcast-listen-btn:hover, .podcast-download-btn:hover {
    background: var(--primary-700);
    transform: translateY(-1px);
}

.podcast-player {
    margin-top: 10px;
    padding: 15px;
    background: var(--neutral-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--neutral-200);
}

/* Dark mode overrides for podcast player */
.dark-mode .podcast-listen-btn {
    background: var(--accent-electric);
    color: var(--neutral-0);
}

.dark-mode .podcast-listen-btn:hover {
    background: var(--primary-700);
}

.dark-mode .podcast-player {
    background: var(--neutral-800) !important;
    border-color: var(--neutral-600) !important;
}

.dark-mode [id^="player-"] {
    background: var(--neutral-800) !important;
    border-color: var(--neutral-600) !important;
}

.dark-mode audio {
    filter: invert(1) hue-rotate(180deg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .word-clouds-section {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .data-tables-section {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .word-cloud-modal,
    .data-table {
        max-width: 100% !important;
    }
}

.week-review-modal-content {
    color: var(--neutral-700);
    padding: 16px 20px;
    max-width: 100%;
    margin: 0 auto;
}

.week-review-section {
    margin-bottom: 40px;
    padding: 0 20px; /* Additional horizontal buffer for summary text */
}

.week-review-modal-content h1,
.week-review-modal-content h2,
.week-review-modal-content h3 {
    color: var(--neutral-800) !important;
    padding: 0 !important;
    margin-top: 0 !important;
    text-align: center;
}

.week-review-modal-content p {
    padding: 0 !important;
    margin-left: 0 !important;
    text-indent: 0 !important;
}

.week-review-header h1,
.week-review-header h2 {
    color: var(--neutral-800) !important;
    text-align: center;
}

.summary-content {
    padding: 28px 36px; /* Increased internal padding for summary text */
    background: var(--gradient-surface);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--accent-warning);
    box-shadow: var(--shadow-md);
    line-height: 1.7;
    margin: 0 auto; /* Center the summary box */
    max-width: 100%; /* Ensure it doesn't overflow */
}

/* Fix table text */
.frequency-table {
    color: var(--neutral-700) !important;
    width: 100% !important;
    margin: 0 auto !important;
}

.frequency-table th,
.frequency-table td {
    color: var(--neutral-700) !important;
    padding: 10px 12px;
    border-bottom: 1px solid var(--neutral-200);
}

.frequency-table th {
    background: var(--primary-100);
    font-weight: 600;
}

.frequency-table th:nth-child(1),
.frequency-table td:nth-child(1) {
    text-align: left !important;
}

.frequency-table th:nth-child(2),
.frequency-table td:nth-child(2) {
    text-align: center !important;
}

.modal-print-btn {
    background: var(--gradient-accent);
    color: var(--neutral-0);
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-normal);
}

.modal-print-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.input-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #6b7280;
    font-size: 14px;
    flex: 1;
}

.input-progress-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.progress-messages {
     max-height: 200px;
     overflow-y: auto;
     border: 1px solid var(--neutral-200);
     border-radius: var(--radius-md);
     background: var(--neutral-50);
}

.progress-message-line {
     padding: 8px 16px;
     border-bottom: 1px solid var(--neutral-200);
     font-size: 0.875rem;
     line-height: 1.4;
 }

 .progress-message-line:last-child {
     border-bottom: none;
     font-weight: 600;
 }

.current-events-container {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.current-events-header {
    text-align: center;
    margin-bottom: 20px;
}

.current-events-header h2 {
    color: #1e40af;
    margin: 0 0 8px 0;
    font-size: 1.5em;
}

.current-events-header .date-info {
    color: #64748b;
    font-size: 0.9em;
    font-weight: 500;
}

.current-events-sections {
    display: grid;
    gap: 20px;
}

.current-events-section {
    background: white;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e2e8f0;
}

.current-events-section h3 {
    color: #1f2937;
    margin: 0 0 12px 0;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.keywords-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keyword-tag {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.85em;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.keyword-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 0.8em;
}

.hot-topics-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hot-topics-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hot-topics-list li:last-child {
    border-bottom: none;
}

.topic-name {
    font-weight: 500;
    color: #374151;
}

.topic-score {
    background: #fef3c7;
    color: #92400e;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
}

.summary-content {
    line-height: 1.6;
    color: #374151;
}

.news-links {
    margin-top: 15px;
}

.news-link {
    display: block;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    text-decoration: none;
    color: #1f2937;
    transition: all 0.2s;
}

.news-link:hover {
    background: #f1f5f9;
    border-color: #3b82f6;
    transform: translateY(-1px);
}

.news-link-title {
    font-weight: 500;
    margin-bottom: 4px;
}

.news-link-source {
    font-size: 0.85em;
    color: #6b7280;
}

.proceed-button-container {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.proceed-button {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.proceed-button:hover {
    background: linear-gradient(135deg, #047857, #065f46);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.proceed-button:active {
    transform: translateY(0);
}

/* Star Button Styling */
.star-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
    border: 1px solid transparent;
    background: #f3f4f6;
    color: #9ca3af;
    border-color: #d1d5db;
    position: relative;
}

.star-btn::before {
    content: "★";
    font-size: 1.2em;
    transition: all var(--transition-normal);
    color: #d4af37; /* Muted gold for off state */
    text-shadow: none;
    transform: scale(1);
}

.star-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 15px rgba(212, 175, 55, 0.3);
    background: #e5e7eb;
    border-color: #d4af37;
}

.star-btn:hover::before {
    color: #f59e0b;
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
    transform: scale(1.1);
}

.star-btn.active {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #ffffff;
    border-color: #f59e0b;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.star-btn.active::before {
    color: #ffffff;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.8),
                 0 0 24px rgba(245, 158, 11, 0.6);
    transform: scale(1.15);
}

.star-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.7), var(--shadow-lg);
}

.star-btn {
    /* Ensure smooth transitions between all states */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 44px; /* Ensure good touch target */
    user-select: none; /* Prevent text selection */
}

.star-btn::before {
    /* Smooth star transitions */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pressed/Focus states for accessibility */
.star-btn:focus {
    outline: 2px solid rgba(245, 158, 11, 0.5);
    outline-offset: 2px;
}

.star-btn:active {
    transform: translateY(0px);
    transition-duration: 0.1s;
}

/* Disabled state (optional) */
.star-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.star-btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

.filter-starred {
    min-width: 44px !important;
    max-width: 50px !important;
    padding: 8px 12px !important;
    font-size: 1.2rem !important;
    font-weight: bold !important;
}

/* ===================================================================== */
/* INTEREST MANAGEMENT STYLES */
/* ===================================================================== */

/* Interest Management Mode Indicator */
.interest-mode-indicator {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    padding: 12px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

.mode-badge {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Interest Choice Buttons */
.interest-choice-buttons {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 0px 0;
    flex-wrap: wrap;
}

.interest-choice-buttons button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    width: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    vertical-align: middle;
}

.btn-primary {
    background: linear-gradient(135deg, #0284c7 0%, #075985 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.btn-secondary {
    background: ##f3f4f6;
    color: #6366f1;
    border: 1px solid #a5b4fc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

/* Interest Display Styling */
.interest-item-chat {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    margin: 8px 0;
    border-left: 4px solid #0ea5e9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.interest-item-chat:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.interest-header-chat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.interest-name-chat {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.1rem;
}

.interest-weight-chat {
    font-weight: 800;
    color: #0284c7;
    font-size: 1.2rem;
    background: rgba(2, 132, 199, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
}

.weight-bar-chat {
    font-size: 0.8rem;
    margin: 8px 0;
    line-height: 1;
}

.interest-category-chat {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-high {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.category-medium {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.category-low {
    background: rgba(148, 163, 184, 0.1);
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* URL link styling */
.url-link {
    color: var(--primary-500);
    text-decoration: none;
    border-bottom: 1px solid var(--primary-200);
    transition: all var(--transition-normal);
    word-break: break-all;
}

.url-link:hover {
    color: var(--primary-600);
    border-bottom-color: var(--primary-500);
    background: rgba(14, 165, 233, 0.05);
    padding: 2px 4px;
    border-radius: 4px;
    transform: translateY(-1px);
}

/* Scrolling behavior ONLY for progress message boxes */
.message.progress-message-box .message-content {
    max-height: 75px;
    overflow-y: auto;
    padding-right: 10px;
}

.message.progress-message-box .message-content::-webkit-scrollbar {
    width: 6px;
}

.message.progress-message-box .message-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.message.progress-message-box .message-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.message.progress-message-box .message-content::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Animation for smooth appearance */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .interest-choice-buttons {
        flex-direction: column;
        align-items: center;
    }

    .interest-choice-buttons button {
        width: 100%;
        max-width: 280px;
    }

    .interest-header-chat {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .interest-weight-chat {
        align-self: flex-end;
    }
}

@media (min-width: 768px) {
    .current-events-sections {
        grid-template-columns: 1fr 1fr;
    }

    .summary-section {
        grid-column: span 2;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 20px;
    }
    
    .agent-container {
        height: calc(100vh - 140px);
    }
}

@media (max-width: 768px) {
    .modal-filters {
        flex-direction: column;
        gap: 16px;
        padding: 16px 20px;
    }

    .filter-section, .sort-section {
        width: 100%;
        justify-content: center;
    }

    .message-content {
        max-width: 85%;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-btn {
        min-width: unset;
    }
}

/* Print styles for modal content */
@media print {
    .modal-overlay, .modal-header, .modal-filters {
        display: none !important;
    }
    
    .modal-container {
        position: static !important;
        max-width: none !important;
        max-height: none !important;
        box-shadow: none !important;
        border: none !important;
    }
    
    .modal-content {
        height: auto !important;
        overflow: visible !important;
    }
}