/* ==================== 🌈 流光渐变 · 波普艺术 全家桶 ==================== */

/* ---------- 全局流光动画定义 ---------- */
@keyframes flowGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes popPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes dotFloat {
  0%, 100% { background-position: 0 0, 10px 10px; }
  50% { background-position: 5px 5px, 15px 15px; }
}

/* ---------- 🎴 主卡片容器 ---------- */
card {
  display: block;
  position: relative;
  padding: 18px;
  margin: 12px 0;
  border-radius: 20px;
  background: 
    radial-gradient(circle at 20% 20%, rgba(255,107,157,0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(108,99,255,0.12) 0%, transparent 50%),
    linear-gradient(135deg, #fff5f9 0%, #f0f4ff 50%, #fff0f5 100%);
  border: 3px solid transparent;
  background-clip: padding-box;
  box-shadow: 
    0 8px 32px rgba(255,107,157,0.15),
    0 4px 16px rgba(108,99,255,0.12),
    inset 0 0 0 1px rgba(255,255,255,0.5);
  overflow: hidden;
}

card::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 20px;
  background: linear-gradient(135deg, #ff6b9d, #c66fbc, #6c63ff, #5dd6ff, #ff6b9d);
  background-size: 300% 300%;
  animation: flowGradient 8s ease infinite;
  z-index: -1;
}

/* 波普点阵装饰 */
card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 120px; height: 120px;
  background-image: 
    radial-gradient(circle, #ff6b9d 1.5px, transparent 1.5px),
    radial-gradient(circle, #6c63ff 1px, transparent 1px);
  background-size: 12px 12px, 16px 16px;
  background-position: 0 0, 6px 6px;
  opacity: 0.15;
  pointer-events: none;
  border-radius: 0 20px 0 100%;
}

/* ---------- 📊 顶部状态栏 ---------- */
topbar {
  display: block;
  position: relative;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: linear-gradient(110deg, #ff6b9d 0%, #c66fbc 25%, #6c63ff 50%, #5dd6ff 75%, #ff6b9d 100%);
  background-size: 300% 100%;
  animation: flowGradient 6s ease infinite;
  box-shadow: 
    0 6px 20px rgba(255,107,157,0.35),
    inset 0 1px 0 rgba(255,255,255,0.4),
    inset 0 -2px 0 rgba(0,0,0,0.1);
  border: 2px solid rgba(255,255,255,0.6);
}

topbar table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
}

topbar th, topbar td {
  padding: 6px 4px;
  text-align: center;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 0 8px rgba(255,255,255,0.4);
  border: none;
  background: transparent;
}

topbar th {
  font-size: 13px;
  letter-spacing: 1px;
  border-bottom: 2px dashed rgba(255,255,255,0.5);
}

topbar td {
  font-size: 14px;
  padding-top: 8px;
}

/* ---------- 📖 正文区域（重头戏！） ---------- */
text {
  display: block;
  position: relative;
  padding: 24px 26px 24px 32px;
  margin: 16px 0;
  border-radius: 16px;
  background: 
    linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,245,250,0.92) 50%, rgba(245,248,255,0.95) 100%);
  border-left: 6px solid;
  border-image: linear-gradient(180deg, #ff6b9d, #c66fbc, #6c63ff, #5dd6ff) 1;
  box-shadow: 
    0 4px 20px rgba(108,99,255,0.1),
    inset 0 0 0 1px rgba(255,255,255,0.8);
  font-size: 15px;
  line-height: 1.95;
  color: #2a2a3e;
  letter-spacing: 0.3px;
}

/* 流光顶部装饰条 */
text::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ff6b9d, #6c63ff, #5dd6ff, transparent);
  background-size: 200% 100%;
  animation: shimmer 4s linear infinite;
  border-radius: 16px 16px 0 0;
}

/* 引号装饰 */
text::after {
  content: '"';
  position: absolute;
  top: 8px; right: 18px;
  font-size: 80px;
  font-family: Georgia, serif;
  color: rgba(255,107,157,0.15);
  line-height: 1;
  pointer-events: none;
  font-weight: 900;
}

/* 首字下沉 */
text p:first-of-type::first-letter {
  float: left;
  font-size: 48px;
  line-height: 1;
  padding: 4px 10px 0 0;
  font-weight: 900;
  background: linear-gradient(135deg, #ff6b9d, #6c63ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

text p {
  margin: 12px 0;
  text-indent: 2em;
}

/* ---------- 📂 折叠卡片 details ---------- */
details {
  display: block;
  margin: 12px 0;
  padding: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
  box-shadow: 
    0 4px 14px rgba(108,99,255,0.1),
    0 1px 3px rgba(255,107,157,0.08);
  border: 2px solid rgba(255,107,157,0.2);
  overflow: hidden;
  transition: all 0.3s ease;
}

details:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 24px rgba(108,99,255,0.18),
    0 2px 6px rgba(255,107,157,0.15);
  border-color: rgba(255,107,157,0.4);
}

details[open] {
  background: 
    radial-gradient(circle at top right, rgba(255,107,157,0.06) 0%, transparent 60%),
    linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
}

/* ---------- 🏷️ summary 渐变胶囊 ---------- */
summary {
  cursor: pointer;
  padding: 12px 18px;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(110deg, #ff6b9d 0%, #c66fbc 50%, #6c63ff 100%);
  background-size: 200% 100%;
  border-radius: 12px 12px 0 0;
  list-style: none;
  position: relative;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  letter-spacing: 0.5px;
  transition: background-position 0.4s ease;
  user-select: none;
}

summary:hover {
  background-position: 100% 0;
}

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

summary::after {
  content: '▼';
  float: right;
  font-size: 12px;
  transition: transform 0.3s ease;
  opacity: 0.9;
}

details[open] > summary::after {
  transform: rotate(180deg);
}

details[open] > summary {
  border-radius: 12px 12px 0 0;
  box-shadow: 0 2px 8px rgba(255,107,157,0.3);
}

/* details 内部内容区 */
details > *:not(summary) {
  padding: 0 18px;
}

details > *:not(summary):first-of-type {
  padding-top: 14px;
}

details > *:not(summary):last-child {
  padding-bottom: 16px;
}

/* ---------- 📋 表格美化 ---------- */
details table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 10px 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(108,99,255,0.08);
}

details thead, details tr:first-child {
  background: linear-gradient(90deg, #ff6b9d, #6c63ff);
}

details th {
  padding: 10px 8px;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  border: none;
  text-align: center;
  letter-spacing: 0.5px;
}

details td {
  padding: 9px 8px;
  font-size: 13.5px;
  color: #3a3a4e;
  background: rgba(255,255,255,0.6);
  border-bottom: 1px solid rgba(255,107,157,0.1);
  text-align: center;
}

details tr:nth-child(even) td {
  background: rgba(250,245,255,0.7);
}

details tr:hover td {
  background: rgba(255,107,157,0.08);
}

/* ---------- 📝 引用块 blockquote ---------- */
details blockquote {
  margin: 10px 0;
  padding: 10px 14px;
  background: linear-gradient(95deg, rgba(255,107,157,0.08), rgba(108,99,255,0.06));
  border-left: 4px solid;
  border-image: linear-gradient(180deg, #ff6b9d, #6c63ff) 1;
  border-radius: 0 8px 8px 0;
  color: #4a3a5e;
  font-size: 13.5px;
  font-style: italic;
}

/* ---------- 💪 加粗文字 流光效果 ---------- */
details strong {
  background: linear-gradient(90deg, #ff6b9d, #c66fbc, #6c63ff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  animation: shimmer 3s linear infinite;
}

/* ---------- 📜 列表 ---------- */
details ul {
  padding-left: 22px;
  margin: 8px 0;
}

details li {
  margin: 6px 0;
  font-size: 13.5px;
  color: #3a3a4e;
  line-height: 1.7;
  position: relative;
}

details li::marker {
  color: #ff6b9d;
}

details code {
  padding: 2px 8px;
  background: linear-gradient(135deg, #ff6b9d, #6c63ff);
  color: #fff;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(108,99,255,0.3);
}

/* ==================== 💬 输入框 & 评论 & Mod区 全覆盖 ==================== */

/* 输入框区域整体容器 */
textarea, 
input[type="text"],
.input-area,
[class*="input"],
[class*="Input"] {
  background: linear-gradient(135deg, #fff5f9 0%, #f0f4ff 100%) !important;
  border: 2px solid transparent !important;
  border-radius: 14px !important;
  background-clip: padding-box !important;
  box-shadow: 
    0 4px 16px rgba(255,107,157,0.15),
    0 0 0 2px rgba(108,99,255,0.1),
    inset 0 1px 3px rgba(255,255,255,0.8) !important;
  color: #2a2a3e !important;
  font-size: 14px !important;
  transition: all 0.3s ease !important;
}

textarea:focus,
input[type="text"]:focus {
  box-shadow: 
    0 6px 24px rgba(255,107,157,0.25),
    0 0 0 3px rgba(108,99,255,0.2),
    inset 0 1px 3px rgba(255,255,255,0.9) !important;
  outline: none !important;
  transform: translateY(-1px);
}

/* 底部工具栏（评论、回到底部等按钮区） */
[class*="toolbar"],
[class*="Toolbar"],
[class*="bottom-bar"],
[class*="action-bar"],
[class*="ActionBar"],
[class*="footer"],
[class*="Footer"] {
  background: linear-gradient(110deg, 
    rgba(255,107,157,0.08) 0%, 
    rgba(198,111,188,0.08) 33%, 
    rgba(108,99,255,0.08) 66%, 
    rgba(93,214,255,0.08) 100%) !important;
  background-size: 200% 100% !important;
  animation: flowGradient 10s ease infinite !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-top: 2px solid rgba(255,107,157,0.2) !important;
}

/* 通用按钮美化 */
button,
[class*="btn"],
[class*="Btn"],
[class*="button"],
[class*="Button"] {
  background: linear-gradient(110deg, #ff6b9d 0%, #c66fbc 50%, #6c63ff 100%) !important;
  background-size: 200% 100% !important;
  color: #fff !important;
  border: none !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
  box-shadow: 
    0 4px 12px rgba(255,107,157,0.3),
    inset 0 1px 0 rgba(255,255,255,0.3) !important;
  transition: all 0.3s ease !important;
  letter-spacing: 0.5px !important;
}

button:hover,
[class*="btn"]:hover,
[class*="button"]:hover {
  background-position: 100% 0 !important;
  transform: translateY(-2px) !important;
  box-shadow: 
    0 6px 20px rgba(255,107,157,0.45),
    inset 0 1px 0 rgba(255,255,255,0.4) !important;
}

button:active {
  transform: translateY(0) !important;
}

/* 快捷回复按钮 */
[class*="quick"],
[class*="Quick"],
[class*="reply"],
[class*="Reply"] {
  background: linear-gradient(135deg, #fff 0%, #fff5f9 100%) !important;
  color: #c66fbc !important;
  border: 2px solid !important;
  border-image: linear-gradient(135deg, #ff6b9d, #6c63ff) 1 !important;
  border-radius: 20px !important;
  text-shadow: none !important;
  box-shadow: 0 2px 8px rgba(255,107,157,0.15) !important;
}

/* 评论区 */
[class*="comment"],
[class*="Comment"] {
  background: linear-gradient(135deg, #fff5f9 0%, #f0f4ff 100%) !important;
  border-radius: 14px !important;
  border-left: 4px solid #ff6b9d !important;
  box-shadow: 0 3px 12px rgba(108,99,255,0.1) !important;
  padding: 12px !important;
  margin: 8px 0 !important;
}

/* Mod区 / 模组卡片 */
[class*="mod"],
[class*="Mod"],
[class*="module"],
[class*="Module"] {
  background: 
    radial-gradient(circle at 20% 20%, rgba(255,107,157,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(108,99,255,0.1) 0%, transparent 50%),
    linear-gradient(135deg, #ffffff 0%, #faf5ff 100%) !important;
  border: 2px solid rgba(255,107,157,0.2) !important;
  border-radius: 16px !important;
  box-shadow: 
    0 4px 16px rgba(255,107,157,0.12),
    0 2px 6px rgba(108,99,255,0.08) !important;
  transition: all 0.3s ease !important;
}

[class*="mod"]:hover,
[class*="Mod"]:hover {
  transform: translateY(-3px) !important;
  box-shadow: 
    0 8px 28px rgba(255,107,157,0.2),
    0 4px 12px rgba(108,99,255,0.15) !important;
  border-color: rgba(255,107,157,0.5) !important;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255,107,157,0.08);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff6b9d, #6c63ff);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #c66fbc, #5dd6ff);
}