:root {
  --rss-bg: #0b0c10;
  --rss-bg-alt: #161925;
  --rss-border: #2c3140;
  --custom-font-size: 1rem;
}

/* Schriftgröße über Variable (gilt für alle Viewports: Smartphone, iPad, Desktop) */
html {
  font-size: var(--custom-font-size);
}

body {
  font-size: var(--custom-font-size);
}

.feed-name,
a.feed-name {
  font-size: var(--custom-font-size);
}

ul.dropdown-menu,
ul.dropdown-menu[aria-labelledby="feedsDropdown"] {
  font-size: var(--custom-font-size);
}

ul.dropdown-menu .dropdown-item-text,
ul.dropdown-menu .dropdown-item {
  font-size: var(--custom-font-size);
}

.entry-title,
a.entry-title {
  font-size: calc(var(--custom-font-size) * 1.1);
}

.article-summary,
.article-entry .text-muted,
.article-entry .small {
  font-size: calc(var(--custom-font-size) * 0.95);
}

/* Dark Mode Hintergründe */
[data-bs-theme="dark"] body {
  background-color: var(--rss-bg);
}

[data-bs-theme="dark"] .navbar {
  background-color: var(--rss-bg-alt);
}

/* Light Mode Hintergründe */
[data-bs-theme="light"] body {
  background-color: #ffffff;
}

[data-bs-theme="light"] .navbar {
  background-color: #f8f9fa;
}

/* Light Mode: aktive Feed-Items lesbar machen */
[data-bs-theme="light"] .feed-list .list-group-item.active {
  background-color: #0d6efd !important;
  color: #ffffff !important;
}

[data-bs-theme="light"] .feed-list .list-group-item.active .feed-name {
  color: #ffffff !important;
}

[data-bs-theme="light"] .feed-list .list-group-item.active .form-check-label {
  color: #ffffff !important;
}

.article-summary {
  max-height: 5.5rem;
  overflow: hidden;
}

.feed-list {
  max-height: 70vh;
  overflow-y: auto;
}

/* Zebra-Streifen für Feed-Liste */
/* Dark Mode */
[data-bs-theme="dark"] .feed-list .list-group-item:nth-child(odd) {
  background-color: rgba(255, 255, 255, 0.03);
}

[data-bs-theme="dark"] .feed-list .list-group-item:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.12);
}

/* Light Mode */
[data-bs-theme="light"] .feed-list .list-group-item:nth-child(odd) {
  background-color: rgba(0, 0, 0, 0.03);
}

[data-bs-theme="light"] .feed-list .list-group-item:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.08);
}

.article-list {
  max-height: 80vh;
  overflow-y: auto;
}

/* Überschriften: besser lesbar, nicht blau */
.article-heading {
  color: inherit !important;
  margin-bottom: 0.5rem !important;
}

h1, h2, h3, h4, h5, h6 {
  color: inherit !important;
}

h1.article-heading, h2.article-heading, h3.article-heading,
h4.article-heading, h5.article-heading, h6.article-heading {
  margin-bottom: 0.75rem;
}

/* Eintrag-Titel: besser lesbar */
.entry-title {
  color: inherit !important;
}

.entry-title:hover {
  text-decoration: underline !important;
}

/* Grüner Haken für "gelesen" */
.check-icon-filled {
  color: #28a745;
  font-weight: bold;
  font-size: 1.5rem;
  display: inline-block;
  width: 1.8rem;
  text-align: center;
}

.check-icon-empty {
  color: #6c757d;
  font-weight: bold;
  font-size: 1.5rem;
  display: inline-block;
  width: 1.8rem;
  text-align: center;
  opacity: 0.7;
}

.check-icon-empty:hover {
  color: #28a745;
  opacity: 1;
}

.read-toggle {
  text-decoration: none !important;
}

.read-toggle:hover {
  text-decoration: none !important;
}

/* Stern für "favorisieren" */
.star-icon-filled {
  color: #ffc107;
  font-size: 1.5rem;
  font-weight: bold;
  display: inline-block;
  width: 1.8rem;
  text-align: center;
}

.star-icon-empty {
  color: #6c757d;
  font-size: 1.5rem;
  font-weight: bold;
  display: inline-block;
  width: 1.8rem;
  text-align: center;
  opacity: 0.7;
}

.star-icon-empty:hover {
  color: #ffc107;
  opacity: 1;
}

.star-toggle {
  text-decoration: none !important;
}

.star-toggle:hover {
  text-decoration: none !important;
}

/* Teilen-Button */
.share-icon {
  color: #6c757d;
  font-size: 1.5rem;
  display: inline-block;
  width: 1.8rem;
  text-align: center;
  opacity: 0.7;
}

.share-toggle:hover .share-icon {
  color: #0d6efd;
  opacity: 1;
}

.share-toggle {
  text-decoration: none !important;
}

.share-toggle:hover {
  text-decoration: none !important;
}

/* Abstand nach Überschriften */
.article-heading + * {
  margin-top: 0.5rem;
}

/* Feed-Liste: bessere Lesbarkeit */
.feed-item {
  padding: 0.75rem 1rem;
}

.feed-inactive {
  opacity: 0.6;
}

/* Dark Mode: inaktive Feeds */
[data-bs-theme="dark"] .feed-inactive .feed-name {
  color: #6c757d !important;
}

/* Light Mode: inaktive Feeds */
[data-bs-theme="light"] .feed-inactive .feed-name {
  color: #adb5bd !important;
}

.feed-name {
  color: inherit;
  font-size: 0.95rem;
}

.feed-name:hover {
  text-decoration: underline !important;
  color: inherit;
}

/* Abstand zwischen Feeds im Dropdown-Menü (gilt für alle Viewports: iPhone, iPad, Desktop) */
/* Sehr spezifischer Selektor mit höchster Priorität */
ul.dropdown-menu[aria-labelledby="feedsDropdown"] > li {
  margin-bottom: 0.9rem !important;
  padding-bottom: 0 !important;
}

ul.dropdown-menu[aria-labelledby="feedsDropdown"] > li:last-child,
ul.dropdown-menu[aria-labelledby="feedsDropdown"] > li:has(hr.dropdown-divider),
ul.dropdown-menu[aria-labelledby="feedsDropdown"] > li:has(a.dropdown-item:not(.dropdown-item-text)) {
  margin-bottom: 0 !important;
}

ul.dropdown-menu[aria-labelledby="feedsDropdown"] > li > .dropdown-item-text {
  padding: 0.75rem 1rem !important;
  margin-bottom: 0 !important;
}

ul.dropdown-menu[aria-labelledby="feedsDropdown"] > li > hr.dropdown-divider {
  margin: 0.75rem 0 !important;
}


.badge-sm {
  font-size: 0.65rem;
  padding: 0.2rem 0.4rem;
  font-weight: normal;
}

/* Zebra-Streifen für Artikel-Liste */
.article-entry {
  background-color: transparent;
  transition: background-color 0.2s ease;
}

/* Dark Mode */
[data-bs-theme="dark"] .article-entry:nth-child(odd) {
  background-color: rgba(255, 255, 255, 0.03);
}

[data-bs-theme="dark"] .article-entry:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.12);
}

[data-bs-theme="dark"] .article-entry:hover {
  background-color: rgba(255, 255, 255, 0.18) !important;
}

/* Light Mode */
[data-bs-theme="light"] .article-entry:nth-child(odd) {
  background-color: rgba(0, 0, 0, 0.03);
}

[data-bs-theme="light"] .article-entry:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.08);
}

[data-bs-theme="light"] .article-entry:hover {
  background-color: rgba(0, 0, 0, 0.12) !important;
}

/* Mobile Optimierungen (Smartphone) */
@media (max-width: 767.98px) {
  /* Feed-Liste auf mobilen Geräten: volle Breite, besser scrollbar */
  .feed-list {
    max-height: 50vh;
  }
  
  /* Feed-Items: kompakter auf mobilen Geräten */
  .feed-item {
    padding: 0.5rem 0.75rem;
  }
  
  /* Schriftgröße über Variable (Smartphone) */
  .feed-name,
  a.feed-name {
    font-size: var(--custom-font-size) !important;
  }
  
  body,
  html {
    font-size: var(--custom-font-size) !important;
  }
  
  ul.dropdown-menu,
  ul.dropdown-menu[aria-labelledby="feedsDropdown"] {
    font-size: var(--custom-font-size) !important;
  }
  
  ul.dropdown-menu .dropdown-item-text,
  ul.dropdown-menu[aria-labelledby="feedsDropdown"] .dropdown-item-text {
    font-size: var(--custom-font-size) !important;
  }
  
  ul.dropdown-menu .dropdown-item,
  ul.dropdown-menu[aria-labelledby="feedsDropdown"] .dropdown-item {
    font-size: var(--custom-font-size) !important;
  }
  
  /* Radio-Buttons: größer für Touch-Bedienung */
  .feed-item .form-check-input {
    width: 1.1rem;
    height: 1.1rem;
  }
  
  /* Artikel-Liste: volle Breite auf mobilen Geräten */
  .article-entry {
    flex-direction: column !important;
  }
  
  /* Icons: größer für Touch-Bedienung */
  .check-icon-filled,
  .check-icon-empty,
  .star-icon-filled,
  .star-icon-empty,
  .share-icon {
    font-size: 1.8rem;
    width: 2.2rem;
  }
  
  /* Buttons: größer für Touch-Bedienung */
  .btn-sm {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
  }
  
  /* Artikel-Titel über Variable (Smartphone) */
  a.entry-title,
  .entry-title {
    font-size: calc(var(--custom-font-size) * 1.1) !important;
    line-height: 1.4 !important;
  }
  
  /* Artikel-Summary über Variable */
  .article-summary {
    max-height: 4rem !important;
    font-size: calc(var(--custom-font-size) * 0.95) !important;
  }
  
  /* Text in Artikel-Einträgen über Variable */
  .article-entry .text-muted,
  .article-entry .small {
    font-size: calc(var(--custom-font-size) * 0.95) !important;
  }
  
  /* Card-Header: Buttons untereinander auf sehr kleinen Bildschirmen */
  .card-header .d-flex.gap-1 {
    flex-wrap: wrap;
    gap: 0.25rem !important;
  }
  
  /* Container: weniger Padding auf mobilen Geräten */
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  /* Navbar: kompakter auf mobilen Geräten */
  .navbar {
    padding: 0.5rem 0.75rem;
  }
  
  /* Artikel-Einträge: besserer Abstand auf mobilen Geräten */
  .article-entry {
    padding: 1rem 0.75rem !important;
  }
  
  /* Haken, Stern, Teilen rechtsbündig für Daumen-Bedienung (iPhone) */
  .article-entry .article-actions {
    align-self: flex-end;
  }
}

/* Tablet Optimierungen (iPad) */
@media (min-width: 768px) and (max-width: 991.98px) {
  /* Feed-Liste: etwas kleiner auf Tablets */
  .feed-list {
    max-height: 60vh;
  }
  
  /* Schriftgröße über CSS-Variable steuerbar */
  body,
  html {
    font-size: var(--custom-font-size) !important;
  }
  
  /* Feed-Name: Größe über Variable */
  .feed-name,
  a.feed-name {
    font-size: var(--custom-font-size) !important;
  }
  
  /* Dropdown-Text über Variable */
  ul.dropdown-menu,
  ul.dropdown-menu[aria-labelledby="feedsDropdown"] {
    font-size: var(--custom-font-size) !important;
  }
  
  ul.dropdown-menu .dropdown-item-text,
  ul.dropdown-menu[aria-labelledby="feedsDropdown"] .dropdown-item-text {
    font-size: var(--custom-font-size) !important;
  }
  
  ul.dropdown-menu .dropdown-item,
  ul.dropdown-menu[aria-labelledby="feedsDropdown"] .dropdown-item {
    font-size: var(--custom-font-size) !important;
  }
  
  /* Artikel-Titel über Variable */
  .entry-title,
  a.entry-title {
    font-size: calc(var(--custom-font-size) * 1.1) !important;
  }
  
  /* Artikel-Text über Variable */
  .article-summary,
  .article-entry .text-muted,
  .article-entry .small {
    font-size: calc(var(--custom-font-size) * 0.95) !important;
  }
  
  /* Abstand Feeds-Dropdown (iPad) */
  ul.dropdown-menu[aria-labelledby="feedsDropdown"] > li {
    margin-bottom: 0.9rem !important;
  }
  
  ul.dropdown-menu[aria-labelledby="feedsDropdown"] > li:last-child,
  ul.dropdown-menu[aria-labelledby="feedsDropdown"] > li:has(hr.dropdown-divider),
  ul.dropdown-menu[aria-labelledby="feedsDropdown"] > li:has(a.dropdown-item:not(.dropdown-item-text)) {
    margin-bottom: 0 !important;
  }
  
  ul.dropdown-menu[aria-labelledby="feedsDropdown"] > li > .dropdown-item-text {
    padding: 0.75rem 1rem !important;
  }
  
  /* Icons: mittlere Größe für Tablets */
  .check-icon-filled,
  .check-icon-empty,
  .star-icon-filled,
  .star-icon-empty,
  .share-icon {
    font-size: 1.6rem;
    width: 2rem;
  }
}

/* Desktop: Abstand Feeds-Dropdown explizit */
@media (min-width: 992px) {
  ul.dropdown-menu[aria-labelledby="feedsDropdown"] > li {
    margin-bottom: 0.9rem !important;
  }
  
  ul.dropdown-menu[aria-labelledby="feedsDropdown"] > li:last-child,
  ul.dropdown-menu[aria-labelledby="feedsDropdown"] > li:has(hr.dropdown-divider),
  ul.dropdown-menu[aria-labelledby="feedsDropdown"] > li:has(a.dropdown-item:not(.dropdown-item-text)) {
    margin-bottom: 0 !important;
  }
  
  ul.dropdown-menu[aria-labelledby="feedsDropdown"] > li > .dropdown-item-text {
    padding: 0.75rem 1rem !important;
  }
}

/* Filter-Buttons (Alle/Ungelesen) schmaler machen */
.filter-buttons .btn {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  font-size: 0.875rem;
  white-space: nowrap;
}

/* Schriftgrößen-Buttons Styling */
.btn-group-sm #fontSizeDecrease,
.btn-group-sm #fontSizeReset,
.btn-group-sm #fontSizeIncrease {
  min-width: 2rem;
  font-weight: bold;
  font-size: 1rem;
}

