@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.app-container {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    background: rgba(26, 26, 62, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-left {
    flex: 1;
}

.header-center {
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
}

.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

.app-header h1 {
    font-size: 24px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}


.logout-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-1px);
}

.log-toggle-btn {
    background: rgba(103, 126, 234, 0.8);
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-right: 10px;
}

.log-toggle-btn:hover {
    background: rgba(103, 126, 234, 1);
    transform: translateY(-1px);
}

/* Compact Stream Stats */
.stream-stats-compact {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 15px;
    border-radius: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #888;
}

.status-dot.connected {
    background-color: #4caf50;
    animation: pulse 2s infinite;
}

.status-dot.receiving {
    background-color: #2196f3;
    animation: pulse 1s infinite;
}

.status-dot.disconnected {
    background-color: #f44336;
}

.status-dot.pending {
    background-color: #ff9800;
}

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

.status-text {
    font-weight: 500;
    color: #fff;
}

.stat-compact {
    color: #b0b0b0;
    font-size: 12px;
}

.stat-compact span {
    color: #fff;
    font-weight: 500;
}

.chunk-counter {
    background: rgba(102, 126, 234, 0.2);
    padding: 4px 10px;
    border-radius: 15px;
    margin-left: 10px;
}

.chunk-counter #chunk-count {
    font-weight: 600;
    color: #667eea;
}

/* Controls Section */
.controls-section {
    background: rgba(26, 26, 62, 0.6);
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.controls-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: start;
}

.controls-left {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.controls-right {
    display: flex;
    justify-content: center;
    align-items: center;
}

.input-row-compact {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.input-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.input-row:last-child {
    margin-bottom: 0;
}

input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
    max-width: 600px;
}

textarea {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
    resize: vertical;
    font-family: inherit;
    max-width: 600px;
    min-height: 80px;
}

textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

input[type="text"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Stream Viewer */
.stream-viewer {
    width: 280px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.viewer-controls {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
}

.mute-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.mute-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.viewer-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

#stopBtn {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

#stopBtn:hover {
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.3);
}

.hidden {
    display: none !important;
}

#status-container {
    margin-top: 10px;
    padding: 10px 15px;
    background: rgba(33, 150, 243, 0.1);
    border-left: 3px solid #2196f3;
    border-radius: 5px;
    font-size: 13px;
    color: #81c9ff;
}

#status-container:empty {
    display: none;
}

/* Main Content Layout */
.main-content {
    flex: 1;
    display: flex;
    gap: 20px;
    padding: 20px;
    min-height: 0;
    overflow: hidden;
}

.left-panel {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
}

#captions-container {
    height: calc(250px + 500px + 180px + 2 * 12px);
    max-height: calc(250px + 500px + 180px + 2 * 12px);
}

.right-panel {
    flex: 1;
    overflow: hidden;
}

/* Panels */
.panel {
    background: rgba(26, 26, 62, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.panel h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Analysis Grid */
.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 250px 500px 180px;
    gap: 12px;
    height: 100%;
    padding-right: 10px;
    align-content: start;
}

/* Grid layout assignments */
#summary-panel {
    grid-column: 1 / 3;
    grid-row: 1;
}

#moments-panel {
    grid-column: 3;
    grid-row: 1;
}

#fact-check-panel {
    grid-column: 1 / -1;
    grid-row: 2;
}

#banners-panel {
    grid-column: 1;
    grid-row: 3;
}

#sentiment-panel {
    grid-column: 2;
    grid-row: 3;
}

#emotion-panel {
    grid-column: 3;
    grid-row: 3;
}

.analysis-panel {
    background: rgba(26, 26, 62, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.analysis-panel h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Content Boxes */
.content-box {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

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

.content-box::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.content-box::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 3px;
}

.content-box::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

.content-box p {
    margin-bottom: 10px;
    line-height: 1.5;
    font-size: 13px;
    color: #e0e0e0;
}

/* Fact Check Cards */
.fact-check-card {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #ff9800;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
    font-size: 13px;
}

.fact-check-card h5 {
    color: #ff9800;
    margin: 10px 0 5px 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fact-check-card ul {
    list-style: none;
    padding: 0;
}

.fact-check-card li {
    margin-bottom: 8px;
}

.fact-check-card a {
    color: #81c9ff;
    text-decoration: none;
    font-weight: 500;
}

.fact-check-card a:hover {
    text-decoration: underline;
}

/* Loader */
#loader {
    display: none !important;
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border-left-color: #667eea;
    animation: spin 1s ease infinite;
    margin: 0 auto 15px;
}

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

#loader p {
    color: #fff;
    font-size: 14px;
    margin: 0;
}

/* Responsive adjustments for larger screens */
@media (min-width: 1600px) {
    .analysis-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: 250px 500px 180px;
    }
}

/* All content boxes have consistent scrolling behavior */
.content-box {
    max-height: none;
}

/* Transcript specific styling */
#captions-box p {
    background: rgba(255, 255, 255, 0.03);
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 2px solid rgba(102, 126, 234, 0.5);
}

/* Key moments styling */
#moments-box p strong {
    color: #667eea;
    font-size: 11px;
}

/* Banner styling */
#banner-box p {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid #667eea;
    font-style: italic;
}

/* Debug Log Styles */
.debug-toggle {
    background: rgba(255, 165, 0, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    color: #ffa500;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.debug-toggle:hover {
    background: rgba(255, 165, 0, 0.2);
    border-color: rgba(255, 165, 0, 0.5);
    transform: translateY(-1px);
}

/* Prompt Editor Styles */
.prompt-toggle, .diff-toggle {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4caf50;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prompt-toggle:hover, .diff-toggle:hover {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.5);
    transform: translateY(-1px);
}

.prompt-selector {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
}

.prompt-selector:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.prompt-editor-container, .diff-viewer-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    max-width: 900px;
    height: 70vh;
    background: rgba(15, 15, 35, 0.98);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 12px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.prompt-editor-container.hidden, .diff-viewer-container.hidden {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    pointer-events: none;
}

.prompt-editor-header, .diff-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(76, 175, 80, 0.1);
    border-bottom: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: 12px 12px 0 0;
}

.prompt-editor-header h3, .diff-viewer-header h3 {
    color: #4caf50;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.prompt-editor-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.prompt-save-btn, .prompt-reset-btn {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4caf50;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prompt-save-btn:hover, .prompt-reset-btn:hover {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.5);
}

.prompt-close-btn, .diff-close-btn {
    background: rgba(255, 67, 54, 0.1);
    border: 1px solid rgba(255, 67, 54, 0.3);
    color: #ff4336;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prompt-close-btn:hover, .diff-close-btn:hover {
    background: rgba(255, 67, 54, 0.2);
    border-color: rgba(255, 67, 54, 0.5);
}

.prompt-editor-content, .diff-viewer-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.prompt-textarea {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
    padding: 15px;
    resize: none;
    overflow-y: auto;
}

.prompt-textarea:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Diff Viewer Styles */
.diff-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 12px;
}

.diff-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.diff-added-legend, .diff-removed-legend {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.diff-added-legend {
    background: rgba(76, 175, 80, 0.3);
}

.diff-removed-legend {
    background: rgba(244, 67, 54, 0.3);
}

.diff-display {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    overflow-y: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.diff-line {
    display: block;
    padding: 2px 5px;
    margin: 1px 0;
}

.diff-added {
    background: rgba(76, 175, 80, 0.1);
    border-left: 3px solid #4caf50;
}

.diff-removed {
    background: rgba(244, 67, 54, 0.1);
    border-left: 3px solid #f44336;
}

.diff-unchanged {
    color: rgba(255, 255, 255, 0.7);
}

.debug-log-container {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 500px;
    max-width: 90vw;
    height: 400px;
    background: rgba(15, 15, 35, 0.98);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.debug-log-container.hidden {
    transform: translateY(100%);
}

.debug-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(255, 165, 0, 0.1);
    border-bottom: 1px solid rgba(255, 165, 0, 0.2);
    border-radius: 12px 12px 0 0;
}

.debug-log-header h3 {
    color: #ffa500;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.debug-clear-btn {
    background: rgba(255, 67, 54, 0.1);
    border: 1px solid rgba(255, 67, 54, 0.3);
    color: #ff4336;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.debug-clear-btn:hover {
    background: rgba(255, 67, 54, 0.2);
    border-color: rgba(255, 67, 54, 0.5);
}

.debug-log {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 11px;
    line-height: 1.5;
}

.debug-entry {
    margin-bottom: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
    word-wrap: break-word;
}

.debug-entry.debug-info {
    color: #64b5f6;
}

.debug-entry.debug-error {
    color: #ff5252;
    background: rgba(255, 82, 82, 0.1);
}

.debug-entry.debug-success {
    color: #81c784;
    background: rgba(129, 199, 132, 0.1);
}

.debug-entry.debug-network {
    color: #ba68c8;
}

.debug-entry.debug-data {
    color: #4db6ac;
}

.debug-entry.debug-status {
    color: #ffb74d;
}

.debug-entry.debug-system {
    color: #9575cd;
    font-weight: 500;
}

.debug-entry.debug-backend {
    color: #4fc3f7;
    background: rgba(79, 195, 247, 0.05);
}

.debug-entry.debug-progress {
    color: #aed581;
}

.debug-time {
    color: #757575;
    margin-right: 8px;
}

.debug-type {
    color: #9e9e9e;
    margin-right: 8px;
    font-weight: 500;
}

/* Scrollbar styling for analysis grid */
.analysis-grid::-webkit-scrollbar {
    width: 8px;
}

.analysis-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.analysis-grid::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 4px;
}

.analysis-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

/* Scrollbar styling for debug log */
.debug-log::-webkit-scrollbar {
    width: 8px;
}

.debug-log::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.debug-log::-webkit-scrollbar-thumb {
    background: rgba(255, 165, 0, 0.3);
    border-radius: 4px;
}

.debug-log::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 165, 0, 0.5);
}

/* Analysis Log Container */
.analysis-log-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.analysis-log-container.hidden {
    display: none;
}

.analysis-log-header {
    background: rgba(26, 26, 62, 0.95);
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.analysis-log-header h3 {
    margin: 0;
    color: #e0e0e0;
    font-size: 18px;
    font-weight: 600;
}

.analysis-log-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.download-log-btn,
.clear-log-btn,
.close-log-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-log-btn:hover {
    background: rgba(103, 126, 234, 0.8);
    color: #fff;
}

.clear-log-btn:hover {
    background: rgba(244, 67, 54, 0.8);
    color: #fff;
}

.close-log-btn {
    font-size: 18px;
    font-weight: bold;
    padding: 8px 12px;
}

.close-log-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.analysis-log-content {
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 0 0 12px 12px;
    max-width: 90vw;
    max-height: 80vh;
    width: 1200px;
    height: 700px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.log-stats-bar {
    background: rgba(103, 126, 234, 0.1);
    padding: 15px 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.log-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-label {
    color: #9e9e9e;
    font-size: 13px;
    font-weight: 500;
}

.log-stat span:last-child {
    color: #667eea;
    font-weight: 600;
    font-size: 14px;
}

.log-sections {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.log-section {
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.log-section h4 {
    margin: 0;
    padding: 12px 16px;
    background: rgba(103, 126, 234, 0.1);
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.log-section-content {
    padding: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.log-entry {
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border-left: 3px solid rgba(103, 126, 234, 0.5);
}

.log-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.log-entry-meta {
    font-size: 12px;
    color: #9e9e9e;
}

.log-entry-content {
    color: #e0e0e0;
    line-height: 1.4;
    font-size: 14px;
}

.log-timestamp {
    color: #667eea;
    font-weight: 500;
    font-size: 12px;
}

.fact-check-entry {
    border-left-color: rgba(255, 193, 7, 0.5);
}

.moment-entry {
    border-left-color: rgba(76, 175, 80, 0.5);
}

.sentiment-entry {
    border-left-color: rgba(233, 30, 99, 0.5);
}

.emotion-entry {
    border-left-color: rgba(156, 39, 176, 0.5);
}

.banner-entry {
    border-left-color: rgba(255, 87, 34, 0.5);
}

.search-results {
    margin-top: 8px;
    padding-left: 12px;
}

.search-result {
    margin-bottom: 6px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    font-size: 12px;
}

.search-result a {
    color: #81c784;
    text-decoration: none;
}

.search-result a:hover {
    text-decoration: underline;
}

.empty-log {
    text-align: center;
    color: #9e9e9e;
    font-style: italic;
    padding: 20px;
}

/* Scrollbar styling for log sections */
.log-sections::-webkit-scrollbar,
.log-section-content::-webkit-scrollbar {
    width: 8px;
}

.log-sections::-webkit-scrollbar-track,
.log-section-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.log-sections::-webkit-scrollbar-thumb,
.log-section-content::-webkit-scrollbar-thumb {
    background: rgba(103, 126, 234, 0.3);
    border-radius: 4px;
}

.log-sections::-webkit-scrollbar-thumb:hover,
.log-section-content::-webkit-scrollbar-thumb:hover {
    background: rgba(103, 126, 234, 0.5);
}

/* Responsive design for log viewer */
@media (max-width: 768px) {
    .analysis-log-content {
        width: 95vw;
        height: 85vh;
    }
    
    .log-stats-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .analysis-log-controls {
        flex-direction: column;
        gap: 5px;
    }
    
    .download-log-btn,
    .clear-log-btn {
        font-size: 12px;
        padding: 6px 10px;
    }
}