/* 隐藏思维链，仅供AI逻辑推演使用 */
think {
    display: none !important;
}

/* 全局容器美化 */
.message-container {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  border-radius: 20px;
  padding: 20px;
  margin: 15px 0;
  box-shadow: 0 8px 20px rgba(252, 182, 159, 0.3);
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 场景信息栏美化 */
details {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  padding: 15px;
  margin: 10px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

details:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

summary {
  cursor: pointer;
  font-weight: bold;
  color: #ff6b9d;
  font-size: 1.1em;
  padding: 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  transition: all 0.3s ease;
  position: relative;
  padding-left: 35px;
}

summary::before {
  content: '💕';
  position: absolute;
  left: 10px;
  font-size: 1.2em;
  animation: heartBeat 1.5s infinite;
}

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

summary:hover {
  background: linear-gradient(135deg, #fcb69f 0%, #ffecd2 100%);
  transform: translateX(5px);
}

details[open] summary {
  margin-bottom: 15px;
  border-bottom: 2px solid #ff6b9d;
}

/* 正文区域美化 */
text {
  display: block;
  background: #fff;
  border-radius: 15px;
  padding: 20px;
  margin: 15px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  line-height: 1.8;
  color: #333;
}

text p {
  margin: 15px 0;
  text-indent: 2em;
  font-size: 1.05em;
}

text p:first-child {
  position: relative;
  padding-left: 20px;
}

text p:first-child::before {
  content: '🌸';
  position: absolute;
  left: 0;
  font-size: 1.2em;
}

/* 状态栏内容美化 */
details summary + * {
  padding: 15px;
  background: linear-gradient(135deg, #fff5f7 0%, #ffe8f0 100%);
  border-radius: 10px;
  margin-top: 10px;
}

/* 加载动画 - 跳动小心心 */
.loading-hearts {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 40px 0;
}

.loading-hearts span {
  font-size: 2em;
  animation: bounce 1.2s infinite ease-in-out;
}

.loading-hearts span:nth-child(1) {
  animation-delay: 0s;
  color: #ff6b9d;
}

.loading-hearts span:nth-child(2) {
  animation-delay: 0.2s;
  color: #ff8fab;
}

.loading-hearts span:nth-child(3) {
  animation-delay: 0.4s;
  color: #ffb3c1;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-20px) scale(1.2);
  }
}

/* 聊天气泡样式 */
.chat-bubble {
  background: #fff;
  border-radius: 20px;
  padding: 15px 20px;
  margin: 10px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
  max-width: 80%;
  animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.chat-bubble::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 15px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 10px 10px 0;
  border-color: transparent #fff transparent transparent;
}

/* 用户输入框美化 */
textarea {
  background: linear-gradient(135deg, #fff5f7 0%, #ffe8f0 100%);
  border: 2px solid #ffb3c1;
  border-radius: 15px;
  padding: 15px;
  font-size: 1em;
  color: #333;
  transition: all 0.3s ease;
  resize: vertical;
}

textarea:focus {
  outline: none;
  border-color: #ff6b9d;
  box-shadow: 0 0 15px rgba(255, 107, 157, 0.3);
  background: #fff;
}

/* 按钮美化 */
button {
  background: linear-gradient(135deg, #ff6b9d 0%, #ff8fab 100%);
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 12px 30px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:hover::before {
  width: 300px;
  height: 300px;
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

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

/* 数值显示美化 */
details summary + * strong {
  color: #ff6b9d;
  font-weight: bold;
  padding: 2px 8px;
  background: rgba(255, 107, 157, 0.1);
  border-radius: 5px;
}

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

::-webkit-scrollbar-track {
  background: #ffe8f0;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #ff6b9d 0%, #ff8fab 100%);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #ff8fab 0%, #ffb3c1 100%);
}

/* 记忆区特殊样式 */
details:has(summary:contains("记忆")) {
  background: linear-gradient(135deg, #fff9e6 0%, #ffe8cc 100%);
}

details:has(summary:contains("记忆")) summary {
  background: linear-gradient(135deg, #ffe8cc 0%, #ffd699 100%);
  color: #ff9933;
}

details:has(summary:contains("记忆")) summary::before {
  content: '📝';
}

/* 角色状态栏特殊样式 */
details:has(summary:contains("状态")) {
  background: linear-gradient(135deg, #e6f7ff 0%, #cce7ff 100%);
}

details:has(summary:contains("状态")) summary {
  background: linear-gradient(135deg, #cce7ff 0%, #99d6ff 100%);
  color: #0099ff;
}

details:has(summary:contains("状态")) summary::before {
  content: '💖';
}

/* 场景信息特殊样式 */
details:has(summary:contains("场景")) summary::before {
  content: '🌟';
}

/* 玩家信息特殊样式 */
details:has(summary:contains("玩家")) {
  background: linear-gradient(135deg, #f0e6ff 0%, #e0ccff 100%);
}

details:has(summary:contains("玩家")) summary {
  background: linear-gradient(135deg, #e0ccff 0%, #d1b3ff 100%);
  color: #9933ff;
}

details:has(summary:contains("玩家")) summary::before {
  content: '👤';
}

/* 响应式设计 */
@media (max-width: 768px) {
  .message-container {
    padding: 15px;
    margin: 10px 0;
  }
  
  text {
    padding: 15px;
  }
  
  details {
    padding: 12px;
  }
  
  summary {
    font-size: 1em;
  }
  
  .chat-bubble {
    max-width: 90%;
  }
}

/* 可爱装饰元素 */
.message-container::before {
  content: '✨';
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.5em;
  animation: twinkle 2s infinite;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.3);
  }
}

/* 好感度/淫乱值进度条样式 */
.stat-bar {
  width: 100%;
  height: 20px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.stat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6b9d 0%, #ff8fab 100%);
  border-radius: 10px;
  transition: width 0.5s ease;
  box-shadow: 0 0 10px rgba(255, 107, 157, 0.5);
}

/* 特殊效果 - 心形粒子 */
@keyframes float {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

.heart-particle {
  position: absolute;
  font-size: 1.5em;
  animation: float 3s ease-in-out infinite;
  pointer-events: none;
}