:root {
  --primary-color: #92a8d1;
  --secondary-color: #526b82;
  --background-color: #f5f5f5;
  --text-color: #333;
  --border-radius: 8px;
  --spacing: 1rem;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background-color: var(--background-color);
  margin: 0;
  padding: 0;
  color: var(--text-color);
  line-height: 1.6;
}

.navbar {
  background-color: white;
  padding: 1rem 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.logo-link {
  display: flex;
  align-items: center;
  transition: opacity 0.3s ease;
}

.logo-link:hover {
  opacity: 0.8;
}

.logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.navbar-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.navbar-nav a:hover {
  opacity: 0.8;
}

.header {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  padding: 3rem 1rem;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
}

.header h1 {
  color: white;
  font-size: 2.5rem;
  margin: 0;
  font-weight: 600;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header h2 {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  margin: 1rem 0 0;
  font-weight: 400;
}

.doi-reference {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  margin: 1rem 0 0;
}

.doi-reference a {
  color: white;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  transition: border-color 0.3s ease;
}

.doi-reference a:hover {
  border-color: white;
}

.container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-grid {
  grid-column: 1 / 2;
}

.form-group {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
  animation: fadeIn 0.3s ease-out;
}

.form-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  border-color: var(--primary-color);
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 1rem;
}

.radio-group {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.radio-button {
  position: relative;
  flex: 1;
}

.radio-button input {
  position: absolute;
  opacity: 0;
}

.radio-button label {
  display: block;
  padding: 0.5rem;
  text-align: center;
  background: #e9ecef;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.radio-button input:checked + label {
  background: var(--secondary-color);
  color: white;
}

.radio-button label:hover {
  background: #dee2e6;
}

.actions,
.results {
  grid-column: 2 / 3;
  margin-top: 1rem;
  align-self: start;
}

.actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.results {
  padding: 2rem;
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  margin-bottom: 2rem;
  animation: fadeIn 0.5s ease-out;
}

.results h3 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

#category_output {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
  display: block;
  margin-top: 1rem;
}

.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 6px rgba(146, 168, 209, 0.2);
}

.btn-secondary {
  background: #6c757d;
  color: white;
  box-shadow: 0 4px 6px rgba(108, 117, 125, 0.2);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
}

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

@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
    padding: 1rem;
    margin: 1rem;
  }

  .right-section {
    position: static;
    margin-top: 2rem;
  }

  .button-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .logo-container {
    flex-direction: column;
    gap: 1rem;
  }

  .logo {
    height: 30px;
  }

  .header h1 {
    font-size: 2rem;
  }

  .header h2 {
    font-size: 1rem;
  }
}

.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.button-group label.button {
  flex: 1;
  padding: 0.75rem;
  text-align: center;
  background: #e9ecef;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.button-group input[type="radio"]:checked + label.button {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.button-group label.button:hover {
  background: #dee2e6;
  transform: translateY(-1px);
}

.form-section {
  padding: 1rem;
  background: #ffffff;
  border-radius: 10px;
}

.right-section {
  position: sticky;
  top: 2rem;
  height: fit-content;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header h1,
.header h2 {
  animation: fadeInDown 0.5s ease-out;
}

.logo {
  animation: fadeIn 0.5s ease-out;
}

.form-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.form-group.compact {
  margin-bottom: 0;
  padding: 1rem;
}

.form-group.compact input {
  width: 100%;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color, #ddd);
  border-radius: var(--border-radius, 4px);
  font-size: 0.9rem;
  box-sizing: border-box;
}

.form-group.compact label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--secondary-color);
  font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 480px) {
  .form-header {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

/* 特别针对日期输入框的调整 */
input[type="date"] {
  padding: 0.5rem 1rem;
  appearance: none;
  -webkit-appearance: none;
}

/* 如果日期选择器图标位置需要调整 */
input[type="date"]::-webkit-calendar-picker-indicator {
  margin-right: 0;
  padding-right: 0;
}
