* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #2b2b2b;
  background: linear-gradient(180deg, #fff5fb 0%, #f9fbff 45%, #fffef7 100%);
}
.page-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 120, 186, 0.28), transparent 16%),
    radial-gradient(circle at 88% 16%, rgba(70, 196, 255, 0.22), transparent 18%),
    radial-gradient(circle at 80% 84%, rgba(135, 226, 142, 0.22), transparent 18%),
    radial-gradient(circle at 18% 82%, rgba(255, 201, 92, 0.24), transparent 18%);
  pointer-events: none;
}
.hero {
  padding: 44px 20px 24px;
  position: relative;
}
.hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,247,253,0.98));
  border: 4px solid #ffb6da;
  border-radius: 34px;
  padding: 30px;
  box-shadow: 0 20px 42px rgba(255, 98, 182, 0.16);
}
.hero-banner {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 82% 24%, rgba(255, 224, 105, 0.95) 0 42px, transparent 44px),
    radial-gradient(circle at 16% 18%, rgba(255,255,255,0.9) 0 26px, transparent 28px),
    radial-gradient(circle at 26% 22%, rgba(255,255,255,0.85) 0 20px, transparent 22px),
    radial-gradient(circle at 66% 18%, rgba(255,255,255,0.88) 0 24px, transparent 26px),
    linear-gradient(180deg, #82d9ff 0%, #bdeeff 52%, #fff3bf 52%, #fff3bf 100%);
  position: relative;
  overflow: hidden;
}
.hero-banner::before {
  content: "";
  position: absolute;
  left: -30px;
  right: -30px;
  bottom: -25px;
  height: 110px;
  background: radial-gradient(circle at 20% 30%, #83d67f 0 80px, transparent 82px),
              radial-gradient(circle at 50% 50%, #67cb69 0 110px, transparent 112px),
              radial-gradient(circle at 82% 40%, #7fdc93 0 85px, transparent 87px);
  z-index: 0;
}
.hero-banner > * { position: relative; z-index: 1; }
h1 {
  font-size: clamp(30px, 5vw, 52px);
  margin: 16px 0 10px;
  color: #ff4d9b;
}
.subtitle {
  font-size: 18px;
  line-height: 1.8;
  color: #5f5f5f;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
button {
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
}
button:hover { transform: translateY(-2px); }
.primary-btn, .ghost-btn, .tab-btn, .close-btn, .card-btn, .read-btn, .quiz-btn {
  font-size: 16px;
  border-radius: 16px;
}
.primary-btn {
  background: linear-gradient(135deg, #ff5eb0, #ff8c43);
  color: white;
  padding: 12px 20px;
  box-shadow: 0 12px 20px rgba(255, 94, 176, 0.26);
}
.ghost-btn {
  background: #fff;
  color: #ff4d9b;
  border: 2px solid #ffc3e1;
  padding: 12px 20px;
}
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px 40px;
  position: relative;
}
.tips-card, .detail-card {
  background: rgba(255,255,255,0.95);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.06);
  border: 2px solid #ffd4ea;
}
.tips-card h2, .section-head h2 {
  margin-top: 0;
  color: #ff5ca8;
}
.tips-card ul {
  padding-left: 20px;
  line-height: 1.9;
}
.note {
  margin-top: 14px;
  color: #7c7c7c;
  font-size: 14px;
}
.poem-list-section { margin-top: 24px; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
#searchInput {
  width: 280px;
  max-width: 100%;
  border: 2px solid #ffc9e5;
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 16px;
  outline: none;
}
.poem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  margin-top: 16px;
}
.poem-card {
  background: linear-gradient(180deg, #fff, #fff8fd);
  border-radius: 26px;
  border: 2px solid #ffd0e8;
  padding: 18px;
  box-shadow: 0 12px 24px rgba(255, 111, 175, 0.08);
}
.prose-card {
  background: linear-gradient(180deg, #fff, #f6fbff);
  border-color: #cde4ff;
  box-shadow: 0 12px 24px rgba(93, 155, 255, 0.08);
}
.poem-card h3 {
  margin: 0 0 8px;
  color: #ff5ba4;
}
.prose-card h3 { color: #4f8cff; }
.poem-meta {
  color: #777;
  font-size: 14px;
  margin-bottom: 10px;
}
.poem-preview {
  line-height: 1.9;
  color: #444;
  min-height: 90px;
}
.card-btn {
  margin-top: 14px;
  width: 100%;
  padding: 10px 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffe067, #ffb84d);
  color: #7a4d00;
  font-weight: 800;
}
.detail-section {
  position: fixed;
  inset: 0;
  background: rgba(68, 53, 29, 0.28);
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.detail-card {
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.hidden { display: none; }
.close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  background: #fff0f8;
  color: #b3447f;
  font-size: 28px;
}
.detail-title {
  color: #ff4d9b;
  margin-top: 0;
  font-size: 34px;
}
.detail-meta {
  color: #666;
  margin-bottom: 12px;
}
.read-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.read-btn {
  padding: 10px 16px;
  background: linear-gradient(135deg, #61d6ff, #4fa8ff);
  color: white;
  font-weight: 700;
}
.read-btn.stop {
  background: linear-gradient(135deg, #ffa25e, #ff6f6f);
}
.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.tab-btn {
  padding: 10px 16px;
  background: #fff1fa;
  color: #9f4177;
  font-weight: 700;
}
.tab-btn.active {
  background: linear-gradient(135deg, #ff5eb0, #ff8c43);
  color: white;
}
.tab-panel {
  background: #fffdf8;
  border: 2px dashed #ffca71;
  border-radius: 22px;
  padding: 20px;
  line-height: 2;
  min-height: 230px;
}
.poem-text {
  font-size: 25px;
  line-height: 2;
  color: #3d3d3d;
  white-space: pre-line;
}
.pinyin-text {
  margin-top: 14px;
  font-size: 18px;
  line-height: 2;
  color: #5f73c5;
  white-space: pre-line;
  background: #f4f8ff;
  border-radius: 18px;
  padding: 14px;
}
.highlight-box {
  background: #fff7e6;
  border-radius: 18px;
  padding: 14px;
  margin-top: 14px;
}
.quiz-item {
  background: #fff7fd;
  border: 2px solid #ffd4ea;
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 16px;
}
.quiz-question {
  margin: 0 0 12px;
  font-weight: 800;
  color: #ff4d9b;
}
.quiz-options {
  display: grid;
  gap: 10px;
}
.quiz-option {
  background: #fff;
  border: 2px solid #ffd4ea;
  border-radius: 14px;
  padding: 10px 12px;
}
.quiz-option.correct {
  border-color: #68d391;
  background: #effff3;
}
.quiz-option.wrong {
  border-color: #ff8b8b;
  background: #fff3f3;
}
.quiz-btn {
  margin-top: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #8b7bff, #5fb3ff);
  color: #fff;
  font-weight: 800;
}
.quiz-result {
  margin-top: 12px;
  font-weight: 700;
}
.footer {
  text-align: center;
  padding: 22px 20px 40px;
  color: #8b8b8b;
}
@media (max-width: 768px) {
  .hero-inner, .tips-card, .detail-card { padding: 18px; }
  .detail-title { font-size: 28px; }
  .poem-text { font-size: 21px; }
  .pinyin-text { font-size: 16px; }
}
