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

body {
  font-family: Georgia, serif;
  background-color: #fff;
  color: #000;
  line-height: 1.5;
  padding: 10px;
  font-size: 16px;
  letter-spacing: 0px;
  word-spacing: 0px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.container {
  max-width: 100%;
  margin: 0 auto;
}

h1 {
  font-size: 1.4em;
  margin-bottom: 15px;
  border-bottom: 2px solid #000;
  padding-bottom: 5px;
}

h2 {
  font-size: 1.2em;
  margin-bottom: 10px;
}

.controls {
  margin-bottom: 10px;
  padding: 6px 8px;
  border: 1px solid #000;
  background-color: #f5f5f5;
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.control-label {
  font-size: 0.9em;
  font-weight: bold;
}

button {
  font-family: Georgia, serif;
  font-size: 1em;
  padding: 8px 15px;
  background-color: #000;
  color: #fff;
  border: none;
  cursor: pointer;
  min-width: 40px;
}

button:active {
  background-color: #333;
}

button.secondary {
  background-color: #fff;
  color: #000;
  border: 2px solid #000;
}

button.secondary:active {
  background-color: #ddd;
}

input[type="text"] {
  font-family: Georgia, serif;
  font-size: 1em;
  padding: 8px;
  border: 2px solid #000;
  width: 100%;
  margin-bottom: 10px;
}

.feed-input-section {
  margin-bottom: 15px;
}

.article-list {
  list-style: none;
}

.article-item {
  padding: 10px 0;
  border-bottom: 1px solid #ccc;
}

.article-title {
  font-size: 1.1em;
  font-weight: bold;
  color: #000;
  text-decoration: underline;
  cursor: pointer;
  display: block;
  margin-bottom: 5px;
}

.article-title:active {
  background-color: #ddd;
}

.article-meta {
  font-size: 0.85em;
  color: #444;
}

.article-description {
  font-size: 0.95em;
  margin-top: 5px;
  color: #333;
}

.article-content {
  display: none;
  padding: 15px;
  border: 1px solid #000;
  margin-top: 15px;
  background-color: #fafafa;
}

.article-content.visible {
  display: block;
}

.article-content h1,
.article-content h2,
.article-content h3 {
  margin: 15px 0 10px 0;
}

.article-content p {
  margin-bottom: 10px;
  text-align: justify;
}

.article-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 10px 0;
}

.back-btn {
  margin-bottom: 15px;
}

.loading {
  padding: 20px;
  text-align: center;
  font-style: italic;
}

.error {
  padding: 15px;
  background-color: #f5f5f5;
  border: 2px solid #000;
  margin: 10px 0;
}

.hidden {
  display: none;
}

#feed-view,
#article-view {
  display: none;
}

#feed-view.active,
#article-view.active {
  display: block;
}

#input-view.active {
  display: block;
}

.nav-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.saved-feeds-section {
  margin-top: 15px;
  padding: 10px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
}

.saved-feeds-section.hidden {
  display: none;
}

.article-selection-buttons {
  display: flex;
  gap: 5px;
  margin-top: 8px;
}

.article-selection-buttons button {
  padding: 5px 12px;
  font-size: 0.9em;
}

.article-item.selected {
  background-color: #e7f3ff;
  border-left: 4px solid #007bff;
}

.article-item.skipped {
  opacity: 0.5;
}

.saved-feeds-list {
  list-style: none;
}

.saved-feed-item {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.saved-feed-link {
  flex: 1;
  text-decoration: underline;
  cursor: pointer;
  color: #000;
}

.saved-feed-link:active {
  background-color: #ddd;
}

.delete-feed-btn {
  padding: 4px 8px;
  font-size: 0.85em;
  min-width: auto;
}

.proxy-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.proxy-input-row.hidden {
  display: none;
}

.proxy-input-row input[type="text"] {
  flex: 1;
  margin-bottom: 0;
  font-size: 0.85em;
  padding: 5px 8px;
}

.proxy-input-row button {
  font-size: 0.85em;
  padding: 5px 10px;
  white-space: nowrap;
}

.scroll-buttons {
  position: fixed;
  bottom: 10px;
  right: 10px;
  display: flex;
  gap: 5px;
}

.scroll-btn {
  padding: 12px 18px;
  font-size: 1.2em;
  min-width: auto;
}

.settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  z-index: 1000;
  overflow-y: auto;
  padding: 10px;
}

.settings-panel {
  max-width: 600px;
  margin: 0 auto;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #000;
}

.settings-section {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ccc;
}

.settings-section-title {
  font-weight: bold;
  margin-bottom: 8px;
}
