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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

header {
  background-color: #64003E;
  color: white;
  padding: 0.65rem max(2rem, calc((100% - 1440px) / 2));
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-logo {
  height: 60px;
  width: auto;
  object-fit: contain;
  margin: -8px 0;
}

.header-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: white;
}

header .subtitle {
  font-size: 0.75rem;
  opacity: 0.9;
  margin: 0;
  color: white;
}

/* Tab Navigation */
.tabs {
  background: white;
  border-bottom: 2px solid #e0e0e0;
  padding: 0 max(2rem, calc((100% - 1440px) / 2));
  display: flex;
  justify-content: flex-start;
  gap: 0.5rem;
}

.tab-btn {
  background: none;
  border: none;
  padding: 1rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  position: relative;
  top: 2px;
}

.tab-btn:hover:not(:disabled) {
  color: #64003E;
  background: #f5f5f5;
}

.tab-btn.active {
  color: #64003E;
  border-bottom-color: #64003E;
}

.tab-btn:disabled {
  color: #ccc;
  cursor: not-allowed;
}

/* Tab Content */
.tab-content {
  min-height: calc(100vh - 250px);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Library View */
.library-view {
  padding: 2rem max(2rem, calc((100% - 1440px) / 2));
}

.library-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e0e0e0;
}

.library-header h2 {
  font-size: 1.8rem;
  color: #64003E;
  margin-bottom: 0.25rem;
}

.library-header .btn-primary {
  width: auto;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
}

.library-table {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.library-table table {
  width: 100%;
  border-collapse: collapse;
}

.library-table th {
  background: #64003E;
  color: white;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.library-table td {
  padding: 1rem;
  border-bottom: 1px solid #e0e0e0;
  font-size: 0.9rem;
}

.library-table tr:last-child td {
  border-bottom: none;
}

.library-table tr:hover {
  background: #f5f5f5;
}

.library-table .empty-state {
  padding: 3rem;
  text-align: center;
  color: #999;
  font-style: italic;
}

/* Create View */
.create-view {
  padding: 2rem max(2rem, calc((100% - 1440px) / 2));
}

.create-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.create-header h2 {
  font-size: 1.5rem;
  color: #64003E;
}

.container {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
}

.panel {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.panel h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #64003E;
}

.help-text {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}

/* Input Panel */
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  margin-bottom: 1rem;
}

textarea:focus {
  outline: none;
  border-color: #64003E;
}

.btn-primary,
.btn-secondary {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background-color: #64003E;
  color: white;
  width: 100%;
}

.btn-primary:hover:not(:disabled) {
  background-color: #4D002E;
}

.btn-primary:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.btn-secondary {
  background-color: #555;
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #333;
}

.btn-secondary:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.btn-delete {
  background-color: #d32f2f;
  color: white;
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-delete:hover {
  background-color: #b71c1c;
}

.status-message {
  font-size: 0.85rem;
  padding: 0.75rem;
  border-radius: 4px;
  margin-top: 1rem;
}

.status-message.loading {
  background: #e3f2fd;
  color: #1976d2;
}

.status-message.success {
  background: #e8f5e9;
  color: #388e3c;
}

.status-message.error {
  background: #ffebee;
  color: #d32f2f;
}

/* Results Panel */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.panel-header .actions {
  display: flex;
  gap: 0.5rem;
}

.panel-header .btn-primary,
.panel-header .btn-secondary {
  width: auto;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.empty-state {
  color: #999;
  font-size: 0.9rem;
  font-style: italic;
  text-align: center;
  padding: 3rem 1rem;
}

/* Supplier Cards */
.supplier-card {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background: #fafafa;
}

.supplier-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.supplier-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e0e0e0;
}

.supplier-header h3 {
  font-size: 1.2rem;
  color: #333;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.unknown {
  background: #e0e0e0;
  color: #666;
}

.status-badge.strong {
  background: #e8f5e9;
  color: #388e3c;
}

.status-badge.weak {
  background: #ffebee;
  color: #d32f2f;
}

.status-badge.noisy {
  background: #fff3e0;
  color: #ef6c00;
}

.status-badge.error {
  background: #ffebee;
  color: #d32f2f;
}

.status-badge.saved {
  background: #e3f2fd;
  color: #1976d2;
}

.section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}

.section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.section label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
  margin-bottom: 0.5rem;
}

.concept-select,
.keyword-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 0.5rem;
}

.concept-select:focus,
.keyword-input:focus {
  outline: none;
  border-color: #64003E;
}

.coverage-result {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.coverage-result.strong {
  background: #e8f5e9;
  border-left: 4px solid #388e3c;
}

.coverage-result.weak {
  background: #ffebee;
  border-left: 4px solid #d32f2f;
}

.coverage-result.noisy {
  background: #fff3e0;
  border-left: 4px solid #ef6c00;
}

.coverage-result strong {
  display: block;
  margin-bottom: 0.25rem;
}

.coverage-result details {
  margin-top: 0.5rem;
}

.coverage-result summary {
  cursor: pointer;
  color: #64003E;
  font-weight: 500;
}

.coverage-result summary:hover {
  text-decoration: underline;
}

.coverage-result ul {
  margin-top: 0.5rem;
  padding-left: 1.5rem;
}

.coverage-result li {
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
}

.article-list {
  list-style: none;
  padding-left: 0;
  margin-top: 0.75rem;
}

.article-list li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.article-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.article-list a {
  display: block;
  color: #64003E;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.article-list a:hover {
  text-decoration: underline;
  color: #4D002E;
}

.article-meta {
  display: block;
  font-size: 0.75rem;
  color: #999;
  font-style: italic;
}

.match-tags {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.match-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 500;
}

.match-tag.company {
  background: #e8f0fe;
  color: #1a73e8;
}

.match-tag.topic {
  background: #fef3e0;
  color: #e67700;
}

.match-tag.no-match {
  background: #f5f5f5;
  color: #999;
  font-style: italic;
}

.warning {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: #fff9e6;
  border-left: 3px solid #ff9800;
  font-size: 0.85rem;
  color: #666;
}

/* Feeds Tab Styles */
#feeds-tab > .container {
  padding: 2rem max(2rem, calc((100% - 1440px) / 2));
}

.checkbox-group {
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 0.75rem;
  background: #fafafa;
}

.checkbox-group label {
  display: block;
  padding: 0.4rem 0;
  font-weight: normal;
  margin-bottom: 0;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  margin-right: 0.5rem;
  cursor: pointer;
}

.checkbox-group:empty::after {
  content: 'No items available. Create companies or topics first.';
  color: #999;
  font-style: italic;
  font-size: 0.85rem;
}

.param-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.param-grid > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.param-grid label {
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

.param-grid select,
.param-grid input {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  min-width: 0;
}

#feedName,
#feedDescription {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

#feedMode {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.feed-card {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background: #fafafa;
}

.feed-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e0e0e0;
}

.feed-header h3 {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 0.25rem;
}

.feed-description {
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
}

.feed-details {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #555;
}

.feed-details p {
  margin-bottom: 0.5rem;
}

.feed-details strong {
  color: #64003E;
}

.feed-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

footer {
  background: #333;
  color: white;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  margin-top: 2rem;
}

/* Responsive */
@media (max-width: 1200px) {
  .container {
    grid-template-columns: 1fr;
  }

  .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .panel-header .actions {
    width: 100%;
  }

  .panel-header .btn-primary,
  .panel-header .btn-secondary {
    flex: 1;
  }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
}

.toast {
  padding: 12px 20px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  animation: slideIn 0.3s ease;
  max-width: 360px;
  border-left: 3px solid;
}

.toast.success {
  background: #f8faf8;
  color: #3d6b3d;
  border-left-color: #6b9b6b;
}

.toast.error {
  background: #faf8f8;
  color: #6b3d3d;
  border-left-color: #a85a5a;
}

.toast.info {
  background: #f8f9fa;
  color: #4a4a4a;
  border-left-color: #999;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* Loading spinner for buttons */
.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Login Screen */
.login-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #5c0931 0%, #7a0d3f 100%);
}

.login-container {
  background: white;
  padding: 3rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  width: 100%;
  max-width: 400px;
}

.login-logo {
  height: 80px;
  margin-bottom: 1rem;
}

.login-container h1 {
  color: #5c0931;
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.login-subtitle {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

#loginForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#loginForm input {
  padding: 0.875rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

#loginForm input:focus {
  outline: none;
  border-color: #5c0931;
}

#loginForm button {
  padding: 0.875rem;
  background: #5c0931;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

#loginForm button:hover {
  background: #7a0d3f;
}

#loginForm button:disabled {
  background: #999;
  cursor: not-allowed;
}

.login-error {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  min-height: 1.25rem;
}

/* ========================================
   HEADER ACTIONS & PROFILE MENU
   ======================================== */

.header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-left: auto;
}

.profile-menu {
  position: relative;
}

.profile-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5a1e3b 0%, #7d2a52 100%);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
}

.profile-btn:hover {
  border-color: white;
  transform: scale(1.05);
}

.profile-initials {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
  overflow: hidden;
}

.profile-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-dropdown-header {
  padding: 1rem;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.profile-email {
  font-size: 0.8125rem;
  color: #666;
  word-break: break-all;
}

.profile-dropdown-divider {
  height: 1px;
  background: #e9ecef;
}

.profile-dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  font-size: 0.875rem;
  color: #333;
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
}

.profile-dropdown-item:hover {
  background: #f5f5f5;
}

.profile-dropdown-item.logout-item {
  color: #c53030;
}

.profile-dropdown-item.logout-item:hover {
  background: #fff5f5;
}

.dropdown-icon {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.dropdown-label {
  flex: 1;
}

.mode-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mode-badge.admin-badge {
  background: #e8f4ea;
  color: #2e7d32;
}

.mode-badge.reader-badge {
  background: #e3f2fd;
  color: #1565c0;
}

/* ========================================
   NEWS STREAM LAYOUT
   ======================================== */

.news-stream-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* News Stream Header */
.news-stream-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.5rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.feed-selector-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.feed-selector-label {
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
}

.feed-selector {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  min-width: 200px;
  background: white;
  cursor: pointer;
}

.feed-selector:focus {
  outline: none;
  border-color: #64003E;
  box-shadow: 0 0 0 2px rgba(100, 0, 62, 0.1);
}

.unread-badge {
  background: #64003E;
  color: white;
  border-radius: 10px;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

/* News Stream List */
.news-stream-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.last-sync-time {
  font-size: 0.75rem;
  color: #888;
}

.last-sync-time:empty {
  display: none;
}

.article-filters {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-toggle-label {
  font-size: 0.85rem;
  color: #666;
}

.lang-toggle-buttons {
  display: flex;
  background: #e9ecef;
  border-radius: 6px;
  padding: 2px;
}

.lang-btn {
  padding: 0.35rem 0.75rem;
  border: none;
  background: transparent;
  font-size: 0.8rem;
  color: #666;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.lang-btn:hover {
  color: #333;
}

.lang-btn.active {
  background: white;
  color: #64003E;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.article-filters select {
  padding: 0.4rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.85rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

.articles-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

/* Article Card */
.article-card {
  background: white;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.article-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.article-card.unread {
  border-left-color: #64003E;
  background: #fffcfe;
}

.article-card.selected {
  background: #f5f0f3;
  box-shadow: 0 2px 8px rgba(100, 0, 62, 0.15);
}

.article-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.article-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
}

.bookmark-icon {
  color: #ffb800;
  font-size: 1rem;
}

.article-card .article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.article-source {
  font-weight: 500;
}

.article-date {
  color: #999;
}

.article-sentiment {
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 500;
}

.sentiment-positive {
  background: #e8f5e9;
  color: #388e3c;
}

.sentiment-negative {
  background: #ffebee;
  color: #d32f2f;
}

.sentiment-neutral {
  background: #f5f5f5;
  color: #666;
}

.article-preview {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: #fff;
  border-top: 1px solid #e0e0e0;
}

.pagination-info {
  font-size: 0.85rem;
  color: #666;
}

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

/* Article Modal */
.article-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
}

.article-modal.open {
  display: block;
}

.article-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.article-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.article-modal-header {
  display: flex;
  justify-content: flex-end;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e0e0e0;
  background: #fafafa;
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: #666;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-close:hover {
  background: #f0f0f0;
  color: #333;
}

.article-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 2rem;
}

.article-detail {
  max-width: 100%;
}

.article-detail-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.article-detail-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
  margin: 0 0 1rem 0;
}

.article-detail-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.article-detail-meta .source {
  font-weight: 500;
  color: #64003E;
}

.article-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.article-body {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #333;
  white-space: pre-wrap;
}

.article-concepts {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}

.article-concepts h4 {
  font-size: 0.9rem;
  color: #666;
  margin: 0 0 0.75rem 0;
}

.concept-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.concept-tag {
  background: #e3f2fd;
  color: #1976d2;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Translation Controls */
.translation-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #f5f5f5;
  border-radius: 6px;
}

.translation-toggle {
  display: flex;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.translation-tab {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.85rem;
  color: #666;
  transition: all 0.2s;
}

.translation-tab:hover {
  background: #d0d0d0;
}

.translation-tab.active {
  background: #7b2d8e;
  color: white;
}

.translation-tab:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.translate-btn {
  white-space: nowrap;
}

.translation-status {
  font-size: 0.8rem;
  color: #666;
  font-style: italic;
}

.article-lang {
  background: #e8e8e8;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  color: #555;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #666;
}

.empty-state p {
  margin: 0.5rem 0;
}

.loading-message,
.error-message {
  text-align: center;
  padding: 2rem;
  color: #666;
}

.error-message {
  color: #d32f2f;
}

/* Responsive News Stream */
@media (max-width: 768px) {
  .news-stream-header {
    flex-direction: column;
    align-items: stretch;
  }

  .feed-selector-section {
    flex-wrap: wrap;
  }

  .feed-selector {
    min-width: 100%;
  }

  .article-filters {
    justify-content: space-between;
  }

  .article-modal-content {
    width: 95%;
    max-height: 95vh;
  }
}
