body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 20px;
  background-color: #fff;
  color: #222;
  transition: background 0.2s, color 0.2s;
}
body.dark-mode {
  background-color: #181a1b !important;
  color: #e0e0e0 !important;
}
body.light-mode {
  background-color: #fff !important;
  color: #222 !important;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2c3e50;
  color: #fff;
  padding: 0 24px;
  min-height: 90px;
  padding-top: 18px;
  padding-bottom: 18px;
  position: relative;
  border-radius: 12px;
}
.navbar .header {
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex: 0 1 auto;
  justify-content: center;
  align-items: center;
}
.navbar .header h1 {
  margin: 0;
  font-size: 2.4em;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
}
.navbar .mode-toggle-btn {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 1.3em;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 6px;
  transition: background 0.2s;
  align-self: center;
}
.navbar .mode-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.unadorned-url {
  color: inherit;
  text-decoration: none;
}

.header {
  background: #2c3e50;
  color: white;
  padding: 20px;
  text-align: center;
}
.header h1 {
  margin: 0;
  font-size: 2em;
}

.container {
  max-width: 1200px;
  margin: 24px auto 0 auto;
  background: #fff;
  overflow: visible;
}

section {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 16px 0 rgba(44, 62, 80, 0.1);
  margin-bottom: 40px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

section:last-child {
  margin-bottom: 0;
}

body.dark-mode section {
  background: #23272a;
  box-shadow: 0 2px 16px 0 rgba(44, 62, 80, 0.25);
  border-radius: 0;
}

.content {
  padding: 20px;
}

.table-scroll-container {
  max-height: 300px;
  overflow-y: auto;
  margin-top: 20px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0;
}
table th, table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}
table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #495057;
  position: sticky;
  top: 0;
  z-index: 10;
}
table td.autofetch-cell {
  text-align: center;
}
table tr:hover {
  background-color: #f8f9fa;
}

.substack-name {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}
.substack-name:hover {
  text-decoration: underline;
}

.substack-external-link {
  color: #6c757d;
  text-decoration: none;
  font-size: 0.85em;
}
.substack-external-link:hover {
  color: #007bff;
  text-decoration: underline;
}

.last-post {
  color: #28a745;
  text-decoration: none;
}
.last-post:hover {
  text-decoration: underline;
}

.no-posts {
  color: #6c757d;
  font-style: italic;
}

.checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
}

.status-active {
  background-color: #28a745;
}

.status-inactive {
  background-color: #dc3545;
}

.loading {
  opacity: 0.5;
  pointer-events: none;
}

body.dark-mode .container,
body.dark-mode .content,
body.dark-mode table {
  background: #23272a !important;
}
body.dark-mode .navbar,
body.dark-mode .header {
  background: #181a1b !important;
  color: #fff !important;
}
body.dark-mode .table-scroll-container {
  border: 1px solid #333 !important;
}
body.dark-mode th, body.dark-mode td {
  border-bottom: 1px solid #333 !important;
}
body.dark-mode th {
  background-color: #23272a !important;
  color: #e0e0e0 !important;
}
body.dark-mode tr:hover {
  background-color: #2c3136 !important;
}
body.dark-mode .substack-name {
  color: #66aaff !important;
}
body.dark-mode .last-post {
  color: #6fdc8c !important;
}
body.dark-mode .no-posts {
  color: #b0b0b0 !important;
}
body.dark-mode .status-active {
  background-color: #6fdc8c !important;
}
body.dark-mode .status-inactive {
  background-color: #ff6b6b !important;
}
body.dark-mode .substack-external-link {
  color: #b0b0b0;
}
body.dark-mode .substack-external-link:hover {
  color: #66aaff;
}

.substack-info {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  margin-bottom: 1em;
}

.substack-meta {
  font-size: 0.9em;
  color: #6c757d;
  font-style: italic;
}

body.dark-mode .substack-meta {
  color: #b0b0b0;
}

.time-period-filters {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.time-filter-btn {
  background: none;
  border: none;
  color: #66aaff;
  text-decoration: none;
  font-size: 1em;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}
.time-filter-btn:hover {
  text-decoration: underline;
}
.time-filter-btn.active {
  color: #f8f9fa;
  font-weight: 600;
}

.time-period-separator {
  color: #6c757d;
  font-weight: 300;
}

body.dark-mode .time-filter-btn {
  color: #66aaff;
}
body.dark-mode .time-filter-btn:hover {
  color: rgb(153, 198.3333333333, 255);
}
body.dark-mode .time-filter-btn.active {
  color: #f8f9fa;
}
body.dark-mode .time-period-separator {
  color: #b0b0b0;
}

.recent-posts-list {
  display: flex;
  flex-direction: column;
  margin-top: 0.5em;
  gap: 1.5em;
}

.recent-post-item {
  display: flex;
  align-items: center;
  gap: 1.5em;
  padding: 0.5em 0 1.2em 0;
  border-bottom: 1px solid #eee;
}
.recent-post-item:last-child {
  border-bottom: none;
}

.recent-post-image {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  background: #f5f5f5;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.recent-post-content {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3em;
}

.recent-post-title {
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 0.1em;
  color: #28a745;
  text-decoration: none;
  word-break: break-word;
}

.recent-post-meta {
  font-size: 0.95em;
  color: #6c757d;
  margin-bottom: 0.2em;
}

.recent-post-desc {
  font-size: 1em;
  color: #222;
  margin-top: 0.2em;
  word-break: break-word;
  display: flex;
  align-items: center;
}

body.dark-mode .recent-post-item {
  border-bottom: 1px solid #333;
}
body.dark-mode .recent-post-image {
  background: #23272a;
}
body.dark-mode .recent-post-title {
  color: #6fdc8c;
}
body.dark-mode .recent-post-meta {
  color: #b0b0b0;
}
body.dark-mode .recent-post-desc {
  color: #e0e0e0;
}

.archive-btn, .archive-btn-small {
  background: #66aaff;
  color: #333;
  border: none;
  border-radius: 6px;
  padding: 6px 16px;
  font-size: 1em;
  cursor: pointer;
  margin-top: 0.5em;
  transition: background 0.2s;
}

.archive-btn:hover, .archive-btn-small:hover {
  background: #007bff;
}

.archive-btn:disabled, .archive-btn-small:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.posts-table th:first-child, .posts-table td:first-child {
  min-width: 130px;
  white-space: nowrap;
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  transition: background 0.2s;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: #fff;
  color: #222;
  padding: 2.2em 1.5em 1.5em 1.5em;
  border-radius: 14px;
  min-width: 400px;
  max-width: 480px;
  box-shadow: 0 8px 32px 0 rgba(44, 62, 80, 0.18);
  position: relative;
  animation: modal-pop 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 1em;
  align-items: center;
}

@keyframes modal-pop {
  from {
    transform: scale(0.96) translateY(20px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}
.modal h3 {
  margin-top: 0;
  margin-bottom: 1.5em;
  font-size: 1.3em;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.modal-close-btn {
  position: absolute;
  top: 0.7em;
  right: 0.7em;
  background: none;
  border: none;
  font-size: 1.5em;
  color: #6c757d;
  cursor: pointer;
  transition: color 0.15s;
  z-index: 10;
}
.modal-close-btn:hover {
  color: #dc3545;
}

.modal form {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.modal form > div {
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-bottom: 0.7em;
}

.modal form label {
  font-weight: 500;
  color: #6c757d;
  margin-bottom: 0.2em;
  display: block;
  width: 100%;
  text-align: left;
  padding-left: 2px;
}

.modal form input[type=text],
.modal form input[type=url] {
  width: 100%;
  max-width: 400px;
  padding: 0.6em 0.9em;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1em;
  margin-top: 0.1em;
  margin-bottom: 0.1em;
  background: #fafbfc;
  color: #222;
  transition: border 0.15s;
  box-sizing: border-box;
  display: block;
}
.modal form input[type=text]:focus,
.modal form input[type=url]:focus {
  border-color: #007bff;
  outline: none;
}

.modal form button[type=submit] {
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.7em 2em;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.2em;
  transition: background 0.18s;
  align-self: center;
}
.modal form button[type=submit]:hover {
  background: rgb(0, 103.32, 214.2);
}

body.dark-mode .modal {
  background: #23272a;
  color: #e0e0e0;
  box-shadow: 0 8px 32px 0 rgba(44, 62, 80, 0.32);
}
body.dark-mode .modal-close-btn {
  color: #b0b0b0;
}
body.dark-mode .modal-close-btn:hover {
  color: #ff6b6b;
}
body.dark-mode .modal form label {
  color: #b0b0b0;
}
body.dark-mode .modal form input[type=text],
body.dark-mode .modal form input[type=url] {
  background: #23272a;
  color: #e0e0e0;
  border: 1px solid #333;
  box-sizing: border-box;
}
body.dark-mode .modal form button[type=submit] {
  background: #66aaff;
  color: #fff;
}
body.dark-mode .modal form button[type=submit]:hover {
  background: rgb(61.2, 147.3333333333, 255);
}

.add-substack-btn {
  background: none;
  border: none;
  color: #e0e0e0;
  font-size: 1.7em;
  font-weight: 500;
  cursor: pointer;
  padding: 0 0.2em;
  line-height: 1;
  transition: color 0.15s;
  outline: none;
}

.add-substack-btn:hover, .add-substack-btn:focus {
  color: #6fdc8c;
}

.view-all-btn {
  background: #007bff;
  color: #fff;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9em;
  font-weight: 500;
  transition: background 0.2s;
}
.view-all-btn:hover {
  background: rgb(0, 103.32, 214.2);
  color: #fff;
}

.substacks-summary {
  text-align: center;
  padding: 20px 0;
}
.substacks-summary p {
  margin: 10px 0;
  color: #222;
}
.substacks-summary strong {
  color: #007bff;
}

body.dark-mode .view-all-btn {
  background: #66aaff;
}
body.dark-mode .view-all-btn:hover {
  background: rgb(61.2, 147.3333333333, 255);
}
body.dark-mode .substacks-summary p {
  color: #e0e0e0;
}
body.dark-mode .substacks-summary strong {
  color: #66aaff;
}

/*# sourceMappingURL=main.css.map */
