:root {
  --pink-900: #9b1d4f;
  --pink-800: #db2777;
  --pink-700: #f472b6;
  --pink-600: #f9a8d4;
  --pink-500: #fbcfe8;
  --pink-200: #fef2f2;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
  Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.5;
  color: var(--white);
  background: linear-gradient(to bottom, var(--pink-900), #312e81);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
}

.navbar {
  background-color: var(--pink-800);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
  flex-wrap: wrap;
  padding: 0.5rem 0;
}
.logo-image {
  height: 100%; /* 确保图片高度与标题栏一致 */
  max-height: 3.5rem; /* 防止图片超过标题栏高度 */
  width: auto; /* 按比例缩放宽度 */
  object-fit: contain; /* 保持图片比例 */
  display: block; /* 避免图片下方出现间隙 */
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--white);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 768px) {
  .nav-content {
    flex-direction: column;
    height: auto;
    padding: 1rem 0;
  }

  .nav-links {
    margin-top: 1rem;
    justify-content: center;
    gap: 0.5rem;
  }

  .nav-link {
    padding: 0.5rem;
  }
}

.nav-link {
  color: var(--white);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--pink-200);
}

.text-center {
  text-align: center;
}

.main-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin: 2rem 0;
  text-align: center;
}

@media (max-width: 640px) {
  .main-title {
    font-size: 2rem;
    margin: 1.5rem 0;
  }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
  padding: 1rem;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background-color: var(--pink-800);
  padding: 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--white);
  transition: background-color 0.2s;
}

.card:hover {
  background-color: var(--pink-700);
}

.card h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
}

.form-select,
.form-input {
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.25rem;
  background-color: var(--pink-700);
  color: var(--white);
  border: none;
  font-size: 1rem;
}

.btn {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--pink-600);
  color: var(--white);
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 1rem;
}

.btn:hover {
  background-color: var(--pink-500);
}

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

.result-card {
  background-color: var(--pink-800);
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-top: 1.5rem;
}

.result-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 768px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .article-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.article-card {
  background-color: var(--pink-800);
  border-radius: 0.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--white);
  transition: transform 0.2s;
}

.article-card:hover {
  transform: translateY(-4px);
}

.article-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.article-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.article-excerpt {
  color: var(--pink-200);
  font-size: 0.875rem;
}

.footer {
  margin-top: auto;
  background-color: var(--pink-900);
  padding: 1.5rem 0;
}

.footer-content {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-content a {
  color: var(--pink-200);
  text-decoration: none;
  transition: color 0.2s;
  padding: 0.5rem;
}

.footer-content a:hover {
  color: var(--white);
}

.prose {
  color: var(--white);
  line-height: 1.7;
  padding: 1rem;
  max-width: 100%;
  overflow-wrap: break-word;
}

@media (max-width: 640px) {
  .prose {
    font-size: 0.9375rem;
    padding: 1rem 0.5rem;
  }
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
}

.prose h2 {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 2rem 0 1rem;
}

@media (max-width: 640px) {
  .prose h2 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
  }
}

.prose p {
  margin-bottom: 1.25rem;
}

.prose .lead {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  color: var(--pink-200);
}

@media (max-width: 640px) {
  .prose .lead {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }
}

.prose ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.75rem;
}

@media (max-width: 640px) {
  .prose li {
    margin-bottom: 0.5rem;
  }
}

.max-w-3xl {
  max-width: 48rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.w-full {
  width: 100%;
}

.rounded-lg {
  border-radius: 0.5rem;
}
