/* Content.css - Story cards, articles, and content-specific styles */

/* Main content layout - two panel design */
.content-area {
    display: flex;
    gap: 20px;
    padding: 20px;
    padding-top: 90px; /* Extra space to clear the header */
    padding-right: 75px; /* Extra space to clear the sidebar */
}

/* Left panel - Story/Cluster list */
.stories-panel {
    flex: 1;
    max-width: 50%;
    overflow-y: auto;
    height: calc(100vh - 130px); /* Account for header and padding */
}

/* Right panel - Full article view */
.article-panel {
    flex: 1;
    max-width: 50%;
    border: 2px solid #333;
    background: rgba(20, 20, 20, 0.9);
    overflow-y: auto;
    height: calc(100vh - 130px); /* Account for header and padding */
}

/* Panel headers */
.panel-header {
    color: #ccc;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Story cards in left panel */
.story-card {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid #333;
    margin-bottom: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.story-card:hover {
    border-color: #00fff9;
    box-shadow: 0 0 10px rgba(0, 255, 249, 0.2);
}

.story-card.active {
    border-color: white;
    background: rgba(20, 20, 20, 0.8);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Story card content */
.story-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
}

.story-category {
    background: #333;
    padding: 2px 6px;
    border-radius: 2px;
    color: #ccc;
}

.story-article-count {
    color: #888;
}

.story-title {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 10px;
}

.story-summary {
    color: #999;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Bias distribution bar */
.bias-bar {
    height: 3px;
    background: #333;
    border-radius: 1px;
    overflow: hidden;
    display: flex;
    margin-top: 8px;
}

.bias-segment {
    height: 100%;
    transition: all 0.3s ease;
}

.bias-left { background: #00fff9; }
.bias-center { background: #747d8c; }
.bias-right { background: #ff00c1; }

.bias-legend {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 10px;
    color: #666;
}

/* Right panel content */
.article-panel-content {
    padding: 20px;
    height: 100%;
}

.article-panel-header {
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.article-panel-title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
}

.article-panel-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #888;
    font-size: 12px;
}

.coverage-stats {
    display: flex;
    gap: 15px;
}

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

.coverage-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.coverage-dot.left { background: #00fff9; }
.coverage-dot.center { background: #747d8c; }
.coverage-dot.right { background: #ff00c1; }

/* Article list in right panel */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.article-item {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    border-left: 3px solid;
    padding: 12px;
    transition: all 0.3s ease;
}

.article-item:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: white;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.article-item.bias-left {
    border-left-color: #00fff9;
}

.article-item.bias-center {
    border-left-color: #747d8c;
}

.article-item.bias-right {
    border-left-color: #ff00c1;
}

.article-source {
    color: #888;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.article-title {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 8px;
}

.article-title a {
    color: white;
    text-decoration: none;
}

.article-title a:hover {
    color: #00fff9;
}

.article-summary {
    color: #bbb;
    font-size: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-time {
    color: #666;
    font-size: 10px;
    margin-top: 8px;
}

/* Empty states */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #666;
    text-align: center;
}

.empty-state-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

.empty-state-text {
    font-size: 14px;
}

/* Loading states */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    color: #666;
    font-size: 14px;
}

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

@keyframes dots {
    0%, 20% { color: #666; }
    40% { color: #00fff9; }
    100% { color: #666; }
}

/* Scrollbar styling for webkit browsers */
.stories-panel::-webkit-scrollbar,
.article-panel::-webkit-scrollbar {
    width: 6px;
}

.stories-panel::-webkit-scrollbar-track,
.article-panel::-webkit-scrollbar-track {
    background: #111;
}

.stories-panel::-webkit-scrollbar-thumb,
.article-panel::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

.stories-panel::-webkit-scrollbar-thumb:hover,
.article-panel::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Settings Modal */
.settings-modal {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background: rgba(20, 20, 20, 0.95);
    border-left: 2px solid #333;
    z-index: 2000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.settings-modal.open {
    right: 0;
}

.settings-header {
    padding: 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.settings-close {
    background: none;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
}

.settings-close:hover {
    color: #fff;
}

.settings-content {
    padding: 20px;
}

.setting-group {
    margin-bottom: 25px;
}

.setting-label {
    color: #ccc;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.setting-description {
    color: #888;
    font-size: 12px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.setting-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    color: #fff;
    padding: 8px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    border-radius: 4px;
}

.setting-input:focus {
    outline: none;
    border-color: #00fff9;
}

.setting-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.setting-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #00fff9;
}

.setting-checkbox label {
    color: #ccc;
    font-size: 14px;
    cursor: pointer;
}

.settings-actions {
    padding: 20px;
    border-top: 1px solid #333;
    display: flex;
    gap: 10px;
}

.settings-btn {
    padding: 8px 16px;
    border: 1px solid #333;
    background: rgba(0, 0, 0, 0.5);
    color: #ccc;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.settings-btn:hover {
    border-color: #00fff9;
    color: #00fff9;
}

.settings-btn.primary {
    background: #00fff9;
    color: #000;
    border-color: #00fff9;
}

.settings-btn.primary:hover {
    background: #ff00c1;
    border-color: #ff00c1;
}

/* Settings overlay */
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.settings-overlay.open {
    opacity: 1;
    visibility: visible;
}
@media (max-width: 1024px) {
    .content-area {
        flex-direction: column;
        gap: 15px;
    }

    .stories-panel,
    .article-panel {
        max-width: 100%;
        height: 50vh;
    }

    .story-title {
        font-size: 16px;
    }

    .article-panel-title {
        font-size: 20px;
    }
}