/**
 * Telugu News Aggregator - Modern Design
 * Clean, minimalist, and accessible
 */

/* CSS Variables for consistent theming */
:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary-color: #10b981;
  --accent-orange: #f59e0b;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #ffffff;
  --bg-page: #f8fafc;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --text-white: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --transition: all 0.2s ease;
  
  /* Category Colors */
  --cat-politics: #3b82f6;
  --cat-sports: #22c55e;
  --cat-entertainment: #ec4899;
  --cat-business: #f59e0b;
  --cat-crime: #ef4444;
  --cat-health: #14b8a6;
  --cat-technology: #8b5cf6;
  --cat-international: #06b6d4;
  --cat-weather: #6366f1;
  --cat-default: #64748b;
}

/* Dark Mode Theme */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-page: #0f172a;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-light: #64748b;
  --border-color: #334155;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.5), 0 8px 10px -6px rgb(0 0 0 / 0.4);
}

[data-theme="dark"] .slot-section .news-summary li {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

[data-theme="dark"] .slot-section .news-summary li:hover {
  background: linear-gradient(135deg, #334155 0%, #475569 100%);
}

[data-theme="dark"] .date-item:hover {
  background: #334155;
}

[data-theme="dark"] .filter-group label:hover {
  background: #334155;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -50px;
  left: 1rem;
  background: var(--primary-color);
  color: var(--text-white);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  font-weight: 600;
  z-index: 1000;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.skip-link:focus {
  top: 1rem;
}

/* Reset and base styles */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans Telugu', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-page);
  min-height: 100vh;
}

/* Modern Header with Gradient */
header {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  color: var(--text-white);
  padding: 0.75rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.header-title-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.35rem;
  border-radius: var(--radius-lg);
}

/* View Toggle (Desktop Only) */
.view-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 0.25rem;
}

.view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}

.view-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-white);
}

.view-btn.active {
  background: var(--primary-color);
  color: var(--text-white);
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-white);
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(15deg);
}

.theme-toggle .sun-icon {
  display: block;
}

.theme-toggle .moon-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: block;
}

.site-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #fff 0%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.site-subtitle {
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  white-space: nowrap;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
}

/* Main Layout */
main {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 2rem;
  height: fit-content;
}

.dates-section {
  background: var(--bg-card);
  padding: 1rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.dates-section h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.dates-section h2::before {
  content: '📅';
  font-size: 0.9rem;
}

.dates-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.view-mode-selector {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-page);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
}

.sidebar-view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-view-btn:hover {
  color: var(--primary-color);
}

.sidebar-view-btn.active {
  background: var(--primary-color);
  color: var(--text-white);
}

.dates-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
}

.loading-dates,
.no-dates {
  text-align: center;
  padding: 1rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.filter-section {
  background: var(--bg-card);
  padding: 1rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.filter-section h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-section h2::before {
  content: '⚡';
  font-size: 0.9rem;
}

.filter-group {
  margin-bottom: 1rem;
}

.filter-group h3 {
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  margin-bottom: 0.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-page);
  border: 1px solid transparent;
  font-size: 0.9rem;
}

.filter-group label:hover {
  background: #f1f5f9;
  border-color: var(--border-color);
}

.filter-group input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.filter-group input[type="date"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  margin-top: 0.25rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-primary);
  background: var(--bg-card);
  transition: var(--transition);
}

.filter-group input[type="date"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.apply-filters-btn {
  width: 100%;
  padding: 0.625rem 1rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--text-white);
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

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

.apply-filters-btn:active {
  transform: translateY(0);
}

/* Content Area */
.content {
  min-width: 0;
}

.news-header {
  display: none;
}

.news-list {
  background: transparent;
  min-height: 400px;
}

/* Date Card - Modern Glass Effect */
.date-card {
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  padding: 0;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--transition);
}

.date-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.date-header {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0;
  border-bottom: none;
  position: relative;
  overflow: hidden;
}

.date-header .date-icon {
  font-size: 1.75rem;
}

.date-header .news-date {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.025em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.slots-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.slot-section {
  padding: 1.5rem;
  background: var(--bg-card);
  border-left: none;
  border-radius: 0;
  position: relative;
}

.slot-section:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}

.evening-section {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.03) 0%, transparent 100%);
}

.morning-section {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.03) 0%, transparent 100%);
}

.slot-header {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed var(--border-color);
}

.slot-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-white);
  box-shadow: var(--shadow-md);
}

.slot-9pm {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.slot-7am {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #059669 100%);
}

.slot-section .news-summary {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.slot-section .news-summary li {
  position: relative;
  padding: 1rem 1.25rem;
  margin: 0;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--primary-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.slot-section .news-summary li:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.morning-section .news-summary li {
  border-left-color: var(--secondary-color);
}

.news-content {
  color: var(--text-primary);
  font-weight: 400;
}

/* Legacy styling for strong/b tags */
.slot-section .news-summary li strong,
.slot-section .news-summary li b {
  color: var(--primary-color);
  font-weight: 600;
}

.morning-section .news-summary li strong,
.morning-section .news-summary li b {
  color: #059669;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

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

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

.page-info {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  padding: 0 1rem;
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  color: var(--text-white);
  padding: 1.5rem 1rem;
  margin-top: 2rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-text {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.footer-updated {
  font-size: 0.8rem;
  color: var(--text-light);
}

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

.loading::before {
  content: '';
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

/* No News / Error States */
.no-news,
.error {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.error {
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.no-slots {
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem;
  font-style: italic;
}

/* Focus Styles */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  main {
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  main {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .sidebar {
    position: static;
  }

  .site-title {
    font-size: 2rem;
  }

  header {
    padding: 2rem 1rem;
  }

  .date-header {
    padding: 1rem 1.25rem;
    gap: 0.5rem;
  }

  .date-header .date-icon {
    font-size: 1.25rem;
  }

  .date-header .news-date {
    font-size: 1.1rem;
  }

  .slot-section {
    padding: 1rem;
  }

  .slots-container {
    grid-template-columns: 1fr;
  }

  .categorized-news {
    gap: 1rem;
  }

  .category-header {
    padding: 0.6rem 0.85rem;
    font-size: 0.85rem;
  }

  .category-news-list .news-item {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    line-height: 1.7;
  }

  .pagination {
    flex-wrap: wrap;
  }

  .pagination-btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
}

@media (min-width: 768px) {
  .slot-section:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
  }
}

/* Smooth scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-page);
}

::-webkit-scrollbar-thumb {
  background: var(--text-light);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* ===== Month Grouped View ===== */
.month-group {
  margin-bottom: 1rem;
}

.month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--text-white);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.month-header:hover {
  transform: scale(1.02);
}

.month-header .month-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
}

.month-dates {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.5rem;
}

.month-dates.collapsed {
  display: none;
}

/* Date item with news count badge */
.date-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg-page);
  color: var(--text-primary);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.date-item .date-text {
  font-family: inherit;
}

.date-item .news-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 0.35rem;
  background: var(--primary-light);
  color: var(--text-white);
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
}

.date-item:hover {
  background: #f1f5f9;
  border-color: var(--border-color);
}

.date-item.selected {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--text-white);
  border-color: var(--primary-dark);
  font-weight: 600;
}

.date-item.selected:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

.date-item.selected .news-count-badge {
  background: rgba(255, 255, 255, 0.3);
}

/* ===== Grid View Mode (Desktop Only) ===== */
.news-list.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.news-list.grid-view .date-card {
  margin-bottom: 0;
}

.news-list.grid-view .slot-section .news-summary li {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.news-list.grid-view .slot-badge {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
}

/* ===== Load More Button ===== */
.load-more-container {
  text-align: center;
  padding: 1.5rem;
  margin-top: 1rem;
}

.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--text-white);
  border: none;
  border-radius: var(--radius-xl);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

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

.load-more-btn:active {
  transform: translateY(0);
}

.load-more-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.load-more-info {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* News content styling */
.news-content {
  color: var(--text-primary);
  line-height: 1.8;
}

/* ===== Category Groups ===== */
.categorized-news {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.category-group {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-white);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.category-news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-news-list .news-item {
  padding: 1rem 1.25rem;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.category-news-list .news-item:last-child {
  border-bottom: none;
}

.category-news-list .news-item:hover {
  background: var(--bg-page);
}

/* Category Colors */
.category-header.cat-politics {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.category-header.cat-business {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.category-header.cat-crime {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.category-header.cat-sports {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.category-header.cat-entertainment {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.category-header.cat-health {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

.category-header.cat-agriculture {
  background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%);
}

.category-header.cat-technology {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.category-header.cat-international {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.category-header.cat-education {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.category-header.cat-weather {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

.category-header.cat-other {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

/* Category group left border accent */
.category-group.cat-politics { border-left: 4px solid #3b82f6; }
.category-group.cat-business { border-left: 4px solid #f59e0b; }
.category-group.cat-crime { border-left: 4px solid #ef4444; }
.category-group.cat-sports { border-left: 4px solid #22c55e; }
.category-group.cat-entertainment { border-left: 4px solid #ec4899; }
.category-group.cat-health { border-left: 4px solid #14b8a6; }
.category-group.cat-agriculture { border-left: 4px solid #84cc16; }
.category-group.cat-technology { border-left: 4px solid #8b5cf6; }
.category-group.cat-international { border-left: 4px solid #06b6d4; }
.category-group.cat-education { border-left: 4px solid #6366f1; }
.category-group.cat-weather { border-left: 4px solid #0ea5e9; }
.category-group.cat-other { border-left: 4px solid #64748b; }

/* Dark mode category adjustments */
[data-theme="dark"] .category-news-list .news-item {
  background: var(--bg-secondary);
}

[data-theme="dark"] .category-news-list .news-item:hover {
  background: #334155;
}

[data-theme="dark"] .category-group {
  background: var(--bg-secondary);
}

/* Dark mode - brighter category header colors for better visibility */
[data-theme="dark"] .category-header.cat-politics {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

[data-theme="dark"] .category-header.cat-business {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

[data-theme="dark"] .category-header.cat-crime {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
}

[data-theme="dark"] .category-header.cat-sports {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
}

[data-theme="dark"] .category-header.cat-entertainment {
  background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
}

[data-theme="dark"] .category-header.cat-health {
  background: linear-gradient(135deg, #2dd4bf 0%, #14b8a6 100%);
}

[data-theme="dark"] .category-header.cat-agriculture {
  background: linear-gradient(135deg, #a3e635 0%, #84cc16 100%);
}

[data-theme="dark"] .category-header.cat-technology {
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
}

[data-theme="dark"] .category-header.cat-international {
  background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
}

[data-theme="dark"] .category-header.cat-education {
  background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
}

[data-theme="dark"] .category-header.cat-weather {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
}

[data-theme="dark"] .category-header.cat-other {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

/* Dark mode - brighter border accents */
[data-theme="dark"] .category-group.cat-politics { border-left-color: #60a5fa; }
[data-theme="dark"] .category-group.cat-business { border-left-color: #fbbf24; }
[data-theme="dark"] .category-group.cat-crime { border-left-color: #f87171; }
[data-theme="dark"] .category-group.cat-sports { border-left-color: #4ade80; }
[data-theme="dark"] .category-group.cat-entertainment { border-left-color: #f472b6; }
[data-theme="dark"] .category-group.cat-health { border-left-color: #2dd4bf; }
[data-theme="dark"] .category-group.cat-agriculture { border-left-color: #a3e635; }
[data-theme="dark"] .category-group.cat-technology { border-left-color: #a78bfa; }
[data-theme="dark"] .category-group.cat-international { border-left-color: #22d3ee; }
[data-theme="dark"] .category-group.cat-education { border-left-color: #818cf8; }
[data-theme="dark"] .category-group.cat-weather { border-left-color: #38bdf8; }
[data-theme="dark"] .category-group.cat-other { border-left-color: #94a3b8; }

/* ===== Mobile Bottom Navigation ===== */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 0.5rem 0;
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.mobile-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.mobile-nav-btn:hover,
.mobile-nav-btn.active {
  color: var(--primary-color);
}

.mobile-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.mobile-nav-btn svg {
  width: 22px;
  height: 22px;
}

/* ===== Mobile Date Modal ===== */
.mobile-date-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1001;
}

.mobile-date-modal.open {
  display: block;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 70vh;
  background: var(--bg-card);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-page);
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.modal-body {
  padding: 1rem;
  max-height: calc(70vh - 60px);
  overflow-y: auto;
}

.modal-body .month-group {
  margin-bottom: 0.75rem;
}

/* ===== Swipe Indicator ===== */
.swipe-indicator {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  padding: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.swipe-indicator.left {
  left: 1rem;
}

.swipe-indicator.right {
  right: 1rem;
}

.swipe-indicator.visible {
  opacity: 1;
}

/* ===== Mobile Responsive Updates ===== */
@media (max-width: 768px) {
  main {
    grid-template-columns: 1fr;
    padding: 1rem;
    padding-bottom: 5rem; /* Space for bottom nav */
  }

  .sidebar {
    position: static;
    display: none; /* Hide on mobile, use modal instead */
  }

  .mobile-nav {
    display: flex;
  }

  .pagination {
    display: none; /* Use mobile nav instead */
  }

  .header-top {
    flex-direction: row;
    gap: 0.5rem;
  }

  .site-title {
    font-size: 1.25rem;
  }

  .site-subtitle {
    font-size: 0.8rem;
  }

  .view-toggle {
    display: none; /* Hide grid toggle on mobile */
  }

  /* Force list view on mobile - disable grid */
  .news-list.grid-view {
    display: block;
  }

  .news-list.grid-view .date-card {
    margin-bottom: 2rem;
  }

  .date-header .news-date {
    font-size: 1.1rem;
  }

  .slot-section {
    padding: 1rem;
  }

  .slot-section .news-summary li {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .load-more-container {
    padding-bottom: 5rem;
  }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  main {
    grid-template-columns: 260px 1fr;
  }

  .news-list.grid-view {
    grid-template-columns: 1fr;
  }
}

/* Large screens */
@media (min-width: 1200px) {
  .news-list.grid-view {
    grid-template-columns: repeat(2, 1fr);
  }
}
