body {
  font-family: 'Microsoft YaHei', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
}

header {
  background-color: #003C6B;
  color: white;
  text-align: center;
  padding: 20px;
}

nav {
  background-color: #D36A00;
  padding: 10px 0;
}

nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
}

nav ul li {
  margin: 0 15px;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

/* 期刊详情页面样式 */
.container {
  max-width: 1400px;
  margin: 20px auto;
  background: white;
  padding: 20px;
  border-radius: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  border-left: 4px solid #D36A00;
  border-right: 1px solid #eee;
}

.paper-info {
  margin-bottom: 30px;
}

.paper-title {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}

.paper-title a {
  color: #333;
  text-decoration: none;
}

.paper-title a:hover {
  text-decoration: underline;
}

.open-access-badge {
  display: inline-block;
  border: 1.4px solid #ff0000;
  color: #ff0000;
  padding: 0.7px 4.2px;
  border-radius: 8.4px;
  font-size: 0.49em;
  margin-left: 5.6px;
  font-weight: normal;
  vertical-align: middle;
  background: transparent;
}

.best-paper-badge {
  display: inline-block;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #8B4513;
  padding: 0.7px 4.2px;
  border-radius: 8.4px;
  font-size: 0.49em;
  margin-left: 5.6px;
  font-weight: bold;
  font-style: italic;
  vertical-align: middle;
  border: 1.4px solid #FFA500;
  font-family: 'Times New Roman', Times, serif;
}

.paper-authors {
  font-size: 16px;
  color: #666;
  margin-bottom: 10px;
}

.paper-level {
  display: inline-block;
  background: #007bff;
  color: white;
  padding: 4px 8px;
  border-radius: 0;
  font-size: 14px;
  margin-bottom: 10px;
}

.paper-level-btn {
  display: inline-block;
  background: #007bff;
  color: white;
  padding: 4px 8px;
  border-radius: 0;
  font-size: 14px;
  margin-bottom: 10px;
  text-decoration: none;
  cursor: pointer;
}

.paper-level-btn:hover {
  background: #0056b3;
  text-decoration: none;
}

.paper-issue {
  font-size: 14px;
  color: #333;
  margin-bottom: 15px;
}

.paper-doi-info {
  font-size: 14px;
  color: #333;
  margin-bottom: 15px;
}

.paper-keywords {
  font-size: 14px;
  color: #555;
  margin-bottom: 15px;
}

.keyword-link {
  color: #007bff;
  text-decoration: none;
  border: 1px solid #007bff;
  padding: 2px 6px;
  margin: 0 2px;
  border-radius: 12px;
  font-size: 1em;
}

.keyword-link:hover {
  background-color: #007bff;
  color: white;
}

.author-link {
  color: #007bff;
  text-decoration: none;
  font-size: 1em;
}

.author-link:hover {
  text-decoration: underline;
  color: #D36A00;
}

.paper-abstract {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 20px;
  white-space: pre-wrap;
}

.paper-doi {
  font-size: 14px;
  color: #007bff;
  font-weight: bold;
  margin-bottom: 10px;
}

.paper-doi a {
  color: #007bff;
  text-decoration: none;
}

.paper-doi a:hover {
  text-decoration: underline;
}

.special-note {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  padding: 10px;
  border-radius: 0;
  margin-bottom: 20px;
  color: #856404;
}

.pdf-container {
  width: 100%;
  height: 800px;
  border: 1px solid #ddd;
  margin-top: 20px;
}

.loading {
  text-align: center;
  padding: 20px;
  color: #666;
}

.error {
  color: red;
  text-align: center;
  padding: 20px;
}

/* 分页按钮样式 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px 10px;
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.pagination-btn {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 8px 12px;
  margin: 0 5px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
}

.pagination-btn:hover {
  background-color: #0056b3;
}

.pagination-btn.active {
  background-color: #0056b3;
  font-weight: bold;
}

/* 论文表格样式 */
.papers-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.papers-table th,
.papers-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.papers-table th {
  background-color: #f8f9fa;
  font-weight: bold;
  color: #333;
}

.papers-table tr:hover {
  background-color: #f5f5f5;
}

.papers-table a {
  color: #007bff;
  text-decoration: none;
}

.papers-table a:hover {
  text-decoration: underline;
}

/* 论文列表样式 */
.papers-container {
  margin-top: 20px;
}

/* ========== 搜索区域样式 ========== */
.search-area {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #dee2e6;
}

.search-mode-selector {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-mode-selector label {
  font-weight: bold;
  color: #333;
  font-size: 14px;
}

.search-mode-selector select {
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  background-color: white;
  min-width: 150px;
}

.search-mode-selector select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* 普通检索容器 - 横向布局 */
.simple-search-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.simple-search-container input[type="text"] {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.simple-search-container input[type="text"]:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* 高级检索容器 - 纵向布局 */
.search-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-form input[type="text"] {
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.search-form input[type="text"]:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* 高级检索的每一行 */
.advanced-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.advanced-search-row label {
  min-width: 80px;
  font-weight: bold;
  color: #555;
  font-size: 14px;
  text-align: right;
}

.advanced-search-row input[type="text"] {
  flex: 1;
}

/* 关键词行 */
.advanced-keywords-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.advanced-keywords-row label {
  min-width: 80px;
  font-weight: bold;
  color: #555;
  font-size: 14px;
  text-align: right;
}

.advanced-keywords-row input[type="text"] {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.advanced-keywords-row input[type="text"]:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* 高级检索按钮行 */
.advanced-search-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  justify-content: flex-end;
}

/* 搜索按钮 */
.search-btn {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

.search-btn:hover {
  background-color: #0056b3;
}

/* 清除按钮 */
.clear-btn {
  background-color: #6c757d;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

.clear-btn:hover {
  background-color: #545b62;
}

footer {
  background-color: #003C6B;
  color: #CCC;
  text-align: center;
  padding: 20px;
  margin-top: 20px;
}

footer a {
  color: #FFCC00;
  text-decoration: none;
  margin: 0 15px;
}

/* 引用按钮样式 */
.paper-header-left {
    flex: 1;
}

.citation-container {
  position: relative;
  display: inline-block;
}

#citationButtonContainer {
  flex-shrink: 0;
  position: relative;
}

.cite-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  color: #007bff;
  border: 1px solid rgba(0, 123, 255, 0.5);
  font-size: 24px;
  font-family: 'Impact', 'Arial Black', 'Franklin Gothic Medium', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1), inset 0 0 10px rgba(255, 255, 255, 0.3);
  padding: 0;
  line-height: 1;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cite-button:hover {
  background-color: rgba(255, 255, 255, 0.5);
  border-color: rgba(0, 123, 255, 0.8);
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2), inset 0 0 15px rgba(255, 255, 255, 0.5);
}

.cite-button:active {
  transform: scale(0.95);
}

.citation-box {
  display: none;
  position: absolute;
  top: 50px;
  right: 0;
  background: white;
  border: 2px solid #007bff;
  border-radius: 8px;
  padding: 15px;
  min-width: 400px;
  max-width: 600px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
}

.citation-text {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 10px;
  word-wrap: break-word;
  font-family: 'SimHei', 'STHeiti', 'Microsoft YaHei', sans-serif;
  background-color: #f8f9fa;
  padding: 10px;
  border-radius: 4px;
}

.citation-text span.en {
  font-family: 'Times New Roman', serif;
}

.copy-hint {
  font-size: 12px;
  color: #28a745;
  text-align: center;
  display: none;
  margin-top: 5px;
  font-weight: bold;
}

/* 移动端响应式 */
@media (max-width: 768px) {
  .citation-box {
    min-width: 300px;
    max-width: 90vw;
    right: -50px;
  }
  
  #citationButtonContainer {
    margin-left: 10px;
  }
  
  .cite-button {
    width: 28px;
    height: 28px;
    font-size: 20px;
  }
}
