@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700&display=swap');

:root {
  --rose-deep: #8b0a2d;
  --rose-mid: #c4365a;
  --rose-light: #e8849a;
  --rose-pale: #f5c6d0;
  --thorn-dark: #1a3a1a;
  --thorn-mid: #2d5a2d;
  --thorn-light: #4a8a4a;
  --parchment: #f9f0ec;
  --ink: #2a1015;
  --ink-light: #5a3540;
  --blood: #6b0020;
  --gold-thorn: #8b7355;
  --shadow-rose: rgba(139, 10, 45, 0.15);
}

body, div, span, p {
  font-family: 'Noto Serif SC', 'Microsoft YaHei', 'SimSun', serif;
}

pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 13px;
  line-height: 1.75;
  font-family: 'Noto Serif SC', 'Microsoft YaHei', serif;
  color: var(--ink);
  background: linear-gradient(
    135deg,
    rgba(249, 240, 236, 0.95) 0%,
    rgba(245, 198, 208, 0.12) 50%,
    rgba(249, 240, 236, 0.95) 100%
  );
  padding: 16px 18px;
  border-radius: 4px;
  border: none;
  position: relative;
}

pre::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(
    180deg,
    var(--thorn-mid) 0%,
    var(--rose-deep) 30%,
    var(--rose-mid) 50%,
    var(--rose-deep) 70%,
    var(--thorn-mid) 100%
  );
  border-radius: 3px 0 0 3px;
}

details {
  margin: 14px 0;
  background: linear-gradient(
    160deg,
    rgba(249, 240, 236, 0.6) 0%,
    rgba(232, 132, 154, 0.06) 100%
  );
  border: 1px solid rgba(196, 54, 90, 0.18);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px var(--shadow-rose);
  position: relative;
}

details::after {
  content: '✧';
  position: absolute;
  top: -2px;
  right: 12px;
  font-size: 10px;
  color: var(--rose-light);
  opacity: 0.5;
}

summary {
  font-weight: 700;
  cursor: pointer;
  font-size: 14.5px;
  color: var(--rose-deep);
  padding: 12px 18px;
  background: linear-gradient(
    90deg,
    rgba(139, 10, 45, 0.08) 0%,
    rgba(196, 54, 90, 0.04) 40%,
    transparent 100%
  );
  border-bottom: 1px solid rgba(196, 54, 90, 0.1);
  letter-spacing: 1px;
  user-select: none;
  position: relative;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: '❯';
  display: inline-block;
  margin-right: 8px;
  font-size: 11px;
  color: var(--rose-mid);
  transition: transform 0.3s ease;
  transform: rotate(0deg);
}

details[open] > summary::before {
  transform: rotate(90deg);
}

summary::after {
  content: '─── ·♡· ───';
  position: absolute;
  right: 16px;
  font-size: 9px;
  color: var(--rose-light);
  opacity: 0.4;
  letter-spacing: 0;
}

details[open] > summary {
  background: linear-gradient(
    90deg,
    rgba(139, 10, 45, 0.12) 0%,
    rgba(196, 54, 90, 0.06) 40%,
    transparent 100%
  );
}

span[style*="color:#ff6b8a"] {
  font-style: italic;
  text-shadow: 0 0 12px rgba(255, 107, 138, 0.2);
  position: relative;
}

span[style*="color:#b388ff"] {
  font-style: normal;
  letter-spacing: 0.5px;
  text-shadow: 0 0 12px rgba(179, 136, 255, 0.2);
}

hr {
  border: none;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--thorn-light) 15%,
    var(--rose-mid) 35%,
    var(--rose-deep) 50%,
    var(--rose-mid) 65%,
    var(--thorn-light) 85%,
    transparent 100%
  );
  margin: 20px 0;
  position: relative;
}

hr::after {
  content: '🌹';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  background: var(--parchment);
  padding: 0 8px;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--rose-deep);
  font-family: 'Noto Serif SC', serif;
}

strong, b {
  color: var(--blood);
  font-weight: 700;
}

em, i {
  color: var(--ink-light);
  font-style: italic;
}

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: rgba(249, 240, 236, 0.5);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    var(--rose-light),
    var(--rose-deep)
  );
  border-radius: 999px;
}

@keyframes thornPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

details > pre::after {
  content: '🥀';
  position: absolute;
  bottom: 6px;
  right: 10px;
  font-size: 11px;
  opacity: 0.25;
  animation: thornPulse 4s ease-in-out infinite;
}

summary:hover {
  background: linear-gradient(
    90deg,
    rgba(139, 10, 45, 0.15) 0%,
    rgba(196, 54, 90, 0.08) 40%,
    transparent 100%
  );
}

details[open] {
  border-color: rgba(196, 54, 90, 0.28);
  box-shadow: 0 3px 18px rgba(139, 10, 45, 0.12);
}