* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #f0f4ff 0%, #e1e8ff 100%);
  color: #1f2937;
  min-height: 100vh;
}

header {
  text-align: center;
  padding: 3rem 1rem 2rem;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

p {
  color: #4b5563;
}

main {
  display: grid;
  gap: 1.5rem;
  max-width: 860px;
  margin: 0 auto;
  padding: 1rem;
}

.card {
  background: #ffffff;
  border-radius: 18px;
  padding: 1.75rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

button {
  background: #3b82f6;
  color: #ffffff;
  border: none;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s ease, background 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  background: #2563eb;
}

audio {
  width: 100%;
  margin-top: 1rem;
  border-radius: 12px;
}

.carousel {
  position: relative;
  margin-top: 1rem;
}

.carousel-track-container {
  overflow: hidden;
  padding-bottom: 0.5rem;
}

.carousel-track {
  display: flex;
  gap: 1rem;
  transition: transform 0.45s ease;
}

.carousel-item {
  flex: 0 0 calc((100% - 2rem) / 3);
  max-width: calc((100% - 2rem) / 3);
  border-radius: 18px;
  overflow: hidden;
  background: #f9fbff;
  border: 1px solid rgba(99, 102, 241, 0.14);
}

@media (max-width: 820px) {
  .carousel-item {
    flex: 0 0 calc((100% - 1rem) / 2);
    max-width: calc((100% - 1rem) / 2);
  }
}

@media (max-width: 560px) {
  .carousel-item {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

.carousel-info-box {
  margin-top: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.carousel-info-title {
  margin: 0 0 0.5rem;
  font-weight: 700;
  color: #1f2937;
}

.carousel-info-text {
  margin: 0;
  color: #374151;
  line-height: 1.65;
}

.carousel-info-hint {
  margin: 0.85rem 0 0;
  color: #4b5563;
  font-size: 0.95rem;
}

.carousel-item img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.25s ease;
}

.carousel-item img:hover {
  transform: scale(1.05);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: #1f2937;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  z-index: 2;
}

.carousel-btn.prev {
  left: -1rem;
}

.carousel-btn.next {
  right: -1rem;
}

.carousel-track-container::-webkit-scrollbar {
  height: 10px;
}

.carousel-track-container::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.05);
  border-radius: 10px;
}

.carousel-track-container::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.6);
  border-radius: 10px;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
}

.modal-content {
  position: relative;
  background: #ffffff;
  padding: 1rem;
  border-radius: 20px;
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.18);
  z-index: 10;
  text-align: center;
}

.modal-content img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 16px;
}

.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  border: none;
  background: #1f2937;
  color: #ffffff;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-content p {
  margin-top: 0.75rem;
  color: #475569;
}

.message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: #eef2ff;
  color: #3730a3;
}

footer {
  text-align: center;
  padding: 1.5rem 1rem 2rem;
  color: #6b7280;
}
