:root {
  --reflex-columns: 12;
  --reflex-grid-spacing: 1em;
  --reflex-xs: 576px;
  --reflex-sm: 768px;
  --reflex-md: 992px;
  --reflex-lg: 1200px;
  --reflex-xlg: 1600px;
  --reflex-xxs-max: 575px;
  --reflex-xs-max: 767px;
  --reflex-sm-max: 991px;
  --reflex-md-max: 1199px;
  --reflex-lg-max: 1599px;
}

html, body, div, h1, h2, h3, h4, h5, h6, ul, ol, dl, li, dt, dd, p, blockquote, pre, form, fieldset, table, th, td {
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  background: #f2f2f2;
  font-size: 1.2em;
  line-height: 1.5;
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  color: rgba(0, 0, 0, 0.9);
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
}

html, body, div, h1, h2, h3, h4, h5, h6, ul, ol, dl, li, dt, dd, p, blockquote, pre, form, fieldset, table, th, td {
  margin: 0;
  padding: 0;
}

.archive-container {
  height: 100vh;
}

/* Fixed header for issue info and navigation */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: rgba(0, 0, 0, 0.9);
  color: rgba(255, 255, 255, 0.9);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1em;
}
.fixed-header .header-left {
  flex: 1;
}
.fixed-header .header-left .subscribe-link {
  color: rgba(255, 255, 255, 0.9) !important;
  text-decoration: none;
  font-weight: 600;
  padding: 5px 8px 6px 8px;
  border-radius: 2px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  display: inline-block;
}
.fixed-header .header-left .subscribe-link i {
  margin-right: 0.1em;
}
.fixed-header .header-left .subscribe-link:hover {
  color: rgb(255, 255, 255) !important;
  border-color: rgb(255, 255, 255);
}
.fixed-header .header-center {
  flex: 2;
  display: flex;
  gap: 10px;
  justify-content: center;
}
.fixed-header .header-center .current-issue-info {
  text-align: center;
}
.fixed-header .header-center .current-issue-info .name {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: -2px;
}
.fixed-header .header-center .current-issue-info .name #copyUrlBtn {
  display: inline-block;
  min-width: 5.5em;
  padding: 1px;
  margin: 1px 0 0 1em;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.4);
  font-size: 0.6em;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.9);
  border-radius: 2px;
}
.fixed-header .header-center .current-issue-info .name #copyUrlBtn:hover {
  background: rgb(255, 255, 255);
}
.fixed-header .header-center .current-issue-info .name .dd, .fixed-header .header-center .current-issue-info .name .issue-number {
  font-weight: 600;
  display: inline-block;
}
.fixed-header .header-center .current-issue-info .issue-title {
  font-size: 0.8em;
  color: rgba(255, 255, 255, 0.6);
}
.fixed-header .header-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  gap: 2px;
}
.fixed-header .header-right .archive-nav {
  text-decoration: none;
  font-weight: 600;
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  background: rgba(255, 255, 255, 0.9);
  color: rgba(0, 0, 0, 0.9);
  cursor: pointer;
  padding: 5px 10px 6px 10px;
  display: inline-block;
}
.fixed-header .header-right .archive-nav:first-of-type {
  border-radius: 2px 0 0 2px;
}
.fixed-header .header-right .archive-nav:last-of-type {
  border-radius: 0 2px 2px 0;
}
.fixed-header .header-right .archive-nav:hover {
  background: rgb(255, 255, 255);
}
.fixed-header .header-right .archive-nav:disabled, .fixed-header .header-right .archive-nav.disabled {
  background: rgba(255, 255, 255, 0.5);
  cursor: not-allowed;
}
.fixed-header .header-right .archive-nav:disabled:hover, .fixed-header .header-right .archive-nav.disabled:hover {
  background: rgba(255, 255, 255, 0.6);
}
@media (max-width: 1000px) {
  .fixed-header {
    flex-wrap: wrap;
    height: 112px;
    align-content: flex-start;
    justify-content: center;
    padding: 10px 10px 0 10px;
    background: rgb(0, 0, 0);
  }
  .fixed-header .header-center {
    flex: 0 0 100%;
    width: 100%;
    order: 1;
    margin-bottom: 12px;
  }
  .fixed-header .header-left {
    flex: 0 0 auto;
    width: auto;
    order: 2;
    display: flex;
    justify-content: right;
    margin-right: 5px;
  }
  .fixed-header .header-right {
    flex: 0 0 auto;
    width: auto;
    order: 3;
    display: flex;
    justify-content: left;
    margin-left: 5px;
  }
  .fixed-header .subscribe-link {
    font-size: 0.8em;
    padding: 3px 10px 4px 10px !important;
  }
  .fixed-header .subscribe-link span {
    display: none;
  }
  .fixed-header .archive-nav {
    font-size: 0.8em;
  }
}

.issue-list-modal {
  position: fixed;
  top: 110px;
  right: 30px;
  width: 21%;
  max-width: 400px;
  height: calc(100vh - 144px);
  background: #f2f2f2;
  border: 2px solid rgba(0, 0, 0, 0.9);
  border-radius: 2px;
  z-index: 200;
  display: none;
  flex-direction: column;
}
.issue-list-modal.show {
  display: flex;
}
.issue-list-modal .modal-header {
  padding: 10px 10px 12px 10px;
  text-align: center;
  line-height: 1.1em;
  font-weight: 600;
  position: relative;
  background: rgba(0, 0, 0, 0.9);
  color: rgba(255, 255, 255, 0.9);
}
.issue-list-modal .modal-header .modal-close {
  position: absolute;
  z-index: 201;
  cursor: pointer;
  right: -10px;
  font-size: 0.9em;
  top: -10px;
  padding: 5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  color: rgba(0, 0, 0, 0.9);
  background: #f2f2f2;
  border-radius: 20px;
  border: 2px solid rgb(0, 0, 0);
}
.issue-list-modal .modal-header .modal-close:hover {
  color: rgb(0, 0, 0);
  transform: scale(1.1);
  background: rgb(255, 255, 255);
}
.issue-list-modal .issue-list-container {
  flex: 1;
  overflow-y: auto;
}
.issue-list-modal .issue-list-container .issue-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.issue-list-modal .issue-list-container .issue-item {
  padding: 0.5em 1em 0.6em 1em;
  cursor: pointer;
  font-size: 0.8em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin: 0;
}
.issue-list-modal .issue-list-container .issue-item:first-of-type {
  border-top: none;
}
.issue-list-modal .issue-list-container .issue-item:last-of-type {
  border-bottom-width: 2px;
}
.issue-list-modal .issue-list-container .issue-item:hover {
  background: rgb(255, 255, 255);
}
.issue-list-modal .issue-list-container .issue-item.active {
  background: #fbbd54;
  border-color: transparent;
}
.issue-list-modal .issue-list-container .issue-item .issue-item-number {
  font-weight: 600;
}
.issue-list-modal .load-more {
  text-align: center;
  font-size: 0.8em;
}
.issue-list-modal .load-more span {
  background: rgba(0, 0, 0, 0.9);
  color: rgba(255, 255, 255, 0.9);
  padding: 2px 8px 3px 8px;
  border-radius: 2px;
  cursor: pointer;
  display: inline-block;
  margin: 1em 0;
  font-weight: 600;
}
.issue-list-modal .load-more span:hover {
  background: rgb(0, 0, 0);
  color: rgb(255, 255, 255);
}

.content-area {
  width: 100%;
  overflow-y: auto;
  position: relative;
  margin-top: 80px; /* Account for fixed header */
}

.content-container {
  margin: 0 auto;
}

.initial-load {
  display: block;
  height: 50px;
}

.loading {
  display: inline-block;
  position: absolute;
  top: 10px;
  left: 10px;
  line-height: 1.1em;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.9);
  color: rgba(0, 0, 0, 0.9);
  padding: 1px 3px;
  font-size: 0.8em;
}

/* Mobile styles */
@media (max-width: 1000px) {
  .content-area {
    margin-top: 122px; /* Account for fixed header */
  }
  .issue-list-modal {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: none;
    width: auto;
    height: 60vh;
    border-radius: 0;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    display: flex; /* Always display flex on mobile */
    flex-direction: column;
  }
  .issue-list-modal .modal-header .modal-close {
    top: 6px;
    right: 5px;
  }
  .issue-list-modal.show {
    transform: translateY(0);
  }
}
