body {
  font-family: 'Inter', 'Roboto', 'PingFang SC', Arial, sans-serif;
  background: #f6f7fb;
  margin: 0;
  color: #222;
  min-height: 100vh;
}

header {
  background: #2d3a4e;
  color: #fff;
  text-align: center;
  padding: 2.5rem 0 1.2rem 0;
  margin-bottom: 2.5rem;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.06);
}
header h1 {
  margin: 0 0 0.5rem 0;
  font-size: 2.3rem;
  letter-spacing: 2px;
  font-weight: 700;
}
header p {
  color: #e0e6ef;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 400;
}

.keyword-bar {
  margin: 0 0 2em 0;
  padding-left: 0;
  display: flex;
  align-items: center;
  gap: 0.8em;
}
.keyword-bar label {
  color: #2d3a4e;
  font-size: 1.05em;
  margin-right: 0.7em;
  font-weight: 500;
}
#keyword-select {
  background: #fff;
  color: #222;
  border: 1.5px solid #d3d8e2;
  border-radius: 7px;
  padding: 0.35em 1.2em 0.35em 0.7em;
  font-size: 1em;
  outline: none;
  box-shadow: 0 2px 8px #e0e6ef22;
  transition: border 0.2s;
}
#keyword-select:focus {
  border-color: #4b7bec;
}

#date-select, #category-select, #search-input {
  background: #fff;
  color: #222;
  border: 1.5px solid #d3d8e2;
  border-radius: 6px;
  padding: 0 8px;
  height: 28px;
  font-size: 0.95em;
  outline: none;
  box-shadow: 0 2px 8px #e0e6ef22;
  transition: border 0.2s;
  box-sizing: border-box;
  margin-right: 10px;
}

#search-input {
  width: 200px;
  background-color: #e9ecef;
}

.paper-actions {
  display: flex;
  align-items: center;
  gap: 1em;
  margin-left: auto;
}

a.action-link {
  color: #4b7bec;
  text-decoration: none;
  font-size: 0.9em;
}

a.action-link:hover {
  text-decoration: underline;
}

.paper-card .favorite-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 1.2em;
  color: #ccc;
}

.paper-card .favorite-btn.favorited {
  color: #ffc107;
}

#date-select:focus, #category-select:focus {
  border-color: #4b7bec;
}

.cards-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: center;
  padding: 0 0 2rem 0;
  max-width: 1100px;
  margin: 0 auto;
}

.paper-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px 0 rgba(44, 62, 80, 0.08);
  padding: 2rem 2.2rem 1.5rem 2.2rem;
  display: flex;
  flex-direction: column;
  border: 1.5px solid #f0f1f5;
  width: 100%;
  max-width: 1100px;
  position: relative;
  transition: box-shadow 0.18s, transform 0.14s;
}
.paper-card:hover {
  /* 移除浮起和阴影变化，保持静止 */
}

.paper-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  margin-bottom: 0.2em;
}
.paper-title {
  font-size: 1.22rem;
  margin: 0;
  font-weight: 600;
  line-height: 1.3;
  color: #2d3a4e;
}
.paper-title a {
  color: inherit;
  text-decoration: none;
}
.paper-title a:hover {
  text-decoration: underline;
}

.pdf-btn {
  display: inline-block;
  background: #eaf1fb;
  color: #2d3a4e;
  font-size: 0.92em;
  border-radius: 7px;
  padding: 0.18em 1.1em;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 1px 8px #e0e6ef33;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  margin-left: 0.5em;
  border: 1px solid #d3d8e2;
  letter-spacing: 0.5px;
}
.pdf-btn:hover {
  background: #4b7bec;
  color: #fff;
  box-shadow: 0 2px 16px #4b7bec33;
  border-color: #4b7bec;
}

.paper-meta {
  margin: 0.5em 0;
  font-size: 0.9em;
  color: #666;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8em;
}
.paper-authors {
  font-size: 1.01rem;
  color: #3a4660;
  margin-bottom: 0.5rem;
  opacity: 0.92;
}
.paper-summary {
  font-size: 1.13rem;
  color: #222;
  margin-bottom: 0.9rem;
  line-height: 1.7;
  opacity: 0.97;
  font-family: 'Times New Roman', Times, serif;
}
.paper-tags {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em;
}
.tag {
  background: #f0f1f5;
  color: #4b7bec;
  border-radius: 9px;
  padding: 0.18em 0.9em;
  font-size: 0.97em;
  font-weight: 500;
  letter-spacing: 0.5px;
  border: 1.2px solid #e0e6ef;
  box-shadow: 0 1px 6px #e0e6ef22;
  transition: background 0.18s, color 0.18s;
}
.tag.keyword {
  background: #eaf1fb;
  color: #2d3a4e;
  border: 1.2px solid #b3c6e0;
}
.tag.keyword:hover {
  background: #4b7bec;
  color: #fff;
}

footer {
  text-align: center;
  color: #6b7a90;
  font-size: 1em;
  padding: 2.5em 0 1.2em 0;
  background: none;
  letter-spacing: 0.5px;
}

.pagination-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2.5em 0 1.5em 0;
  gap: 1em;
}

/* reasoning details */
details.reasoning {
  margin-top: 0.6rem;
}
details.reasoning > summary {
  cursor: pointer;
  color: #4b7bec;
  font-size: 0.95rem;
}
.reasoning-content {
  padding: 0.4rem 0.3rem;
  color: #444;
  white-space: pre-wrap;
}

/* highlight */
mark {
  background: #fff4a3;
  padding: 0 2px;
}

.page-info {
  font-size: 0.9em;
  color: #666;
}

.page-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5em;
}

.page-btn {
  background-color: #fff;
  border: 1px solid #ddd;
  padding: 0.5em 1em;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s;
}

.page-btn.active {
  background-color: #4b7bec;
  color: white;
  border-color: #4b7bec;
  cursor: default;
}

.page-btn:hover:not(.active) {
  background-color: #f0f0f0;
}

.last-updated-bar {
  margin-top: 0.7em;
  color: #e0e6ef;
  font-size: 1em;
  text-align: center;
  letter-spacing: 0.5px;
  font-weight: 400;
}
#last-updated {
  color: #e0e6ef;
}

.content-area {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
}

@media (max-width: 1200px) {
  .content-area, .cards-grid {
    max-width: 100%;
  }
  .paper-card {
    max-width: 100%;
    padding: 1.2rem 0.7rem 1.2rem 0.7rem;
  }
}

@media (max-width: 600px) {
  .cards-grid {
    padding: 0 0.5em 2em 0.5em;
    max-width: 100%;
  }
  .keyword-bar {
    padding-left: 0;
    flex-direction: column;
    align-items: stretch;
  }
  #date-select, #category-select, #search-input {
    width: 100%;
    margin-right: 0;
    margin-bottom: 0.5em;
  }
  .paper-card {
    padding: 1em 0.5em 1em 0.5em;
  }
  header {
    padding: 1.2em 0 0.7em 0;
  }
  .paper-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5em;
  }
}
.keyword-bar #sort-select {
  margin-left: 0.5em;
  padding: 0.45em 0.6em;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
}
.paper-recommend {
  margin-top: 0.6rem;
}
.paper-score {
  color: #f39c12;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.paper-score .score-num {
  color: #555;
  font-weight: 500;
  margin-left: 0.3rem;
}
.paper-rec-reason {
  color: #3d3d3d;
  font-size: 0.96rem;
  background: #fafafa;
  padding: 0.55rem 0.7rem;
  border-left: 3px solid #f1c40f;
  border-radius: 4px;
}
/* keep details.reasoning styles for backward compatibility; not used in current UI */
.score-na {
  color: #999;
}