:root {
  --pink-deep: #c2185b;
  --pink: #ec407a;
  --pink-light: #f8bbd9;
  --panel: rgba(255, 250, 252, 0.94);
  --text: #4a148c;
  --text-muted: #8e5a9a;
  --ink: #2d1b3d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(165deg, #ffe3ec 0%, #fff0f5 50%, #fce4ec 100%);
  -webkit-font-smoothing: antialiased;
}

.content {
  position: relative;
  min-height: 100vh;
  padding: 1.5rem 1rem 2.5rem;
  background-color: transparent;
}

.content::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 245, 249, 0.88) 0%,
    rgba(255, 228, 236, 0.78) 45%,
    rgba(252, 228, 236, 0.85) 100%
  );
  pointer-events: none;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
}

.site-title {
  margin: 0 0 0.3rem;
  font-size: clamp(1.65rem, 5vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--pink-deep);
  line-height: 1.2;
}

.site-sub {
  margin: 0 0 1.15rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.site-nav {
  margin: 0 0 1.5rem;
  padding: 0.65rem 0.85rem;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(248, 187, 217, 0.65);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(236, 64, 122, 0.1);
}

.site-nav a {
  color: var(--pink-deep);
  text-decoration: none;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--pink);
  text-decoration: underline;
}

.site-nav .sep {
  color: var(--pink-light);
  user-select: none;
  font-weight: 300;
}

.carousel {
  margin-bottom: 1.75rem;
  border-radius: 16px;
  overflow: visible;
  box-shadow:
    0 12px 40px rgba(236, 64, 122, 0.22),
    0 0 0 1px rgba(248, 187, 217, 0.55);
  background: rgba(255, 255, 255, 0.35);
  padding-bottom: 0.25rem;
}

.carousel-stage {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}

.carousel-viewport {
  overflow: hidden;
  touch-action: pan-y;
}

.carousel-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel-slide {
  position: relative;
  min-width: 100%;
  min-height: 220px;
  background-size: cover;
  background-position: center center;
  background-color: var(--pink-light);
}

@media (min-width: 520px) {
  .carousel-slide { min-height: 260px; }
}

.carousel-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(74, 20, 140, 0.55) 0%,
    rgba(194, 24, 91, 0.15) 45%,
    transparent 100%
  );
  pointer-events: none;
}

.carousel-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 1.1rem 1.25rem 1.35rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.carousel-caption .cap-en {
  font-size: 0.78rem;
  opacity: 0.95;
  letter-spacing: 0.02em;
  margin: 0 0 0.25rem;
  font-weight: 500;
}

.carousel-caption .cap-zh {
  font-size: 0.98rem;
  margin: 0;
  font-weight: 600;
  line-height: 1.45;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--pink-deep);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
}

.carousel-btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.06);
}

.carousel-btn.prev { left: 0.5rem; }
.carousel-btn.next { right: 0.5rem; }

.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 0.5rem 0.85rem;
}

.carousel-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(194, 24, 91, 0.3);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.carousel-dots button:hover {
  transform: scale(1.2);
  background: rgba(236, 64, 122, 0.55);
}

.carousel-dots button[aria-selected="true"] {
  background: var(--pink-deep);
  transform: scale(1.28);
  box-shadow: 0 0 0 2px var(--pink-light);
}

.block {
  background: var(--panel);
  border: 1px solid rgba(248, 187, 217, 0.75);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 28px rgba(236, 64, 122, 0.12);
  backdrop-filter: blur(8px);
}

.block h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--pink-deep);
}

.block h3 {
  margin: 1rem 0 0.35rem;
  font-size: 0.95rem;
  color: var(--text);
}

.block p {
  margin: 0 0 0.5rem;
  line-height: 1.7;
  font-size: 0.92rem;
  color: var(--text);
}

.block ul {
  margin: 0.35rem 0 0.5rem;
  padding-left: 1.25rem;
  line-height: 1.7;
  font-size: 0.92rem;
  color: var(--text);
}

.mono {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.84rem;
  word-break: break-all;
}

pre {
  margin: 0.5rem 0;
  padding: 0.75rem 0.9rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(248, 187, 217, 0.55);
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--ink);
  font-family: ui-monospace, Consolas, monospace;
}

.demo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 0.65rem;
}

.demo-row img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid rgba(248, 187, 217, 0.75);
  background: #fff;
  object-fit: cover;
}

.demo-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.demo-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.65rem 0;
}

.demo-form input,
.demo-form select {
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(248, 187, 217, 0.75);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
}

.demo-form input {
  flex: 1;
  min-width: 200px;
}

.demo-form input:focus,
.demo-form select:focus {
  outline: none;
  border-color: var(--pink);
}

.demo-result {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem 1.25rem;
  margin-top: 0.5rem;
}

.demo-result img {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  border: 1px solid rgba(248, 187, 217, 0.75);
  background: #fff;
  object-fit: cover;
}

.demo-info p {
  margin: 0 0 0.35rem;
  font-size: 0.84rem;
}

.more {
  display: inline-block;
  margin-top: 0.25rem;
  color: var(--pink-deep);
  text-decoration: none;
  border-bottom: 2px solid rgba(236, 64, 122, 0.45);
  font-size: 0.88rem;
  font-weight: 600;
}

.more:hover {
  color: var(--pink);
  border-bottom-color: var(--pink);
}

.footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(248, 187, 217, 0.65);
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.8;
  text-align: center;
}

.footer a {
  color: var(--pink-deep);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-note {
  display: inline-block;
  margin-top: 0.25rem;
}
