/* ==========================================
   完美大陆 - 状态栏美化样式
   适用于rili平台的details/summary状态栏
   保留所有原有颜色，仅优化排版和视觉效果
   ========================================== */

/* 全局容器优化 */
details {
  margin: 15px 0;
  border: 2px solid rgba(74, 58, 24, 0.8);
  border-radius: 12px;
  background: linear-gradient(135deg, 
    rgba(26, 15, 10, 0.95) 0%, 
    rgba(42, 26, 16, 0.9) 100%);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4),
              inset 0 1px 0 rgba(212, 175, 55, 0.1);
  transition: all 0.3s ease;
}

details:hover {
  border-color: rgba(212, 175, 55, 0.6);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5),
              0 0 15px rgba(212, 175, 55, 0.2);
}

/* 折叠标题优化 */
summary {
  padding: 14px 20px;
  cursor: pointer;
  user-select: none;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(90deg,
    rgba(212, 175, 55, 0.15) 0%,
    transparent 100%);
  border-bottom: 1px solid rgba(74, 58, 24, 0.5);
  transition: all 0.2s ease;
  position: relative;
}

summary:hover {
  background: linear-gradient(90deg,
    rgba(212, 175, 55, 0.25) 0%,
    transparent 100%);
  padding-left: 25px;
}

summary::marker {
  font-size: 0;
}

summary::before {
  content: "▸";
  position: absolute;
  left: 8px;
  transition: transform 0.3s ease;
  font-size: 14px;
}

details[open] summary::before {
  transform: rotate(90deg);
}

details[open] summary {
  border-bottom-color: rgba(212, 175, 55, 0.4);
}

/* 内容区域优化 */
details > *:not(summary) {
  padding: 18px 22px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 表格优化 */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 12px 0;
  font-size: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  letter-spacing: 1px;
  background: rgba(212, 175, 55, 0.15);
  border-bottom: 2px solid rgba(74, 58, 24, 0.6);
}

td {
  padding: 10px 16px;
  border-bottom: 1px dashed rgba(74, 58, 24, 0.3);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover {
  background: rgba(212, 175, 55, 0.05);
}

/* 分节标题优化 */
.pm-section,
details h3,
details h4 {
  margin: 20px 0 12px;
  padding: 10px 14px;
  background: linear-gradient(90deg,
    rgba(212, 175, 55, 0.2) 0%,
    transparent 100%);
  border-left: 4px solid rgba(212, 175, 55, 0.8);
  border-radius: 0 8px 8px 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 3px;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
}

/* 列表优化 */
ul, ol {
  margin: 12px 0;
  padding-left: 24px;
}

li {
  margin: 8px 0;
  line-height: 1.7;
  position: relative;
}

li::marker {
  font-weight: 700;
}

/* 分隔线优化 */
hr {
  margin: 20px 0;
  border: none;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(212, 175, 55, 0.5) 50%,
    transparent 100%);
}

/* 代码块优化 */
code, pre {
  font-family: "Consolas", "Monaco", monospace;
  background: rgba(10, 6, 4, 0.6);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(74, 58, 24, 0.4);
}

pre {
  padding: 12px 16px;
  overflow-x: auto;
  line-height: 1.6;
  margin: 12px 0;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* 链接优化 */
a {
  text-decoration: none;
  border-bottom: 1px dashed;
  transition: all 0.2s ease;
}

a:hover {
  border-bottom-style: solid;
  padding-bottom: 2px;
}

/* 引用块优化 */
blockquote {
  margin: 15px 0;
  padding: 14px 18px;
  border-left: 4px solid rgba(212, 175, 55, 0.6);
  background: rgba(212, 175, 55, 0.05);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

/* 按钮样式优化（如果状态栏中有按钮） */
button, .button {
  padding: 10px 20px;
  border: 2px solid rgba(212, 175, 55, 0.6);
  border-radius: 8px;
  background: rgba(26, 15, 10, 0.8);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

button:hover, .button:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4),
              0 0 15px rgba(212, 175, 55, 0.3);
}

button:active, .button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* 徽章/标签优化 */
.badge, .tag {
  display: inline-block;
  padding: 4px 10px;
  margin: 0 4px;
  border: 1px solid rgba(74, 58, 24, 0.6);
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.1);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 状态指示器优化 */
.status-good::before,
.status-warning::before,
.status-danger::before {
  content: "●";
  margin-right: 6px;
  font-size: 12px;
}

/* 图标优化 */
.icon {
  display: inline-block;
  margin-right: 6px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

/* 响应式优化 */
@media (max-width: 768px) {
  details {
    margin: 10px 0;
    border-width: 1.5px;
  }
  
  summary {
    padding: 12px 16px;
    font-size: 16px;
  }
  
  details > *:not(summary) {
    padding: 14px 18px;
  }
  
  table {
    font-size: 14px;
  }
  
  th, td {
    padding: 8px 12px;
  }
}

/* 打印优化 */
@media print {
  details {
    border: 1px solid #333;
    box-shadow: none;
  }
  
  summary {
    background: none;
  }
  
  details[open] summary {
    border-bottom: 1px solid #333;
  }
}

/* 深色模式适配（如果平台支持） */
@media (prefers-color-scheme: dark) {
  details {
    background: linear-gradient(135deg,
      rgba(26, 15, 10, 0.98) 0%,
      rgba(42, 26, 16, 0.95) 100%);
  }
}

/* 动画性能优化 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* 滚动条美化（Webkit内核） */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(10, 6, 4, 0.5);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.4);
  border-radius: 5px;
  transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.6);
}

/* 选中文本样式 */
::selection {
  background: rgba(212, 175, 55, 0.3);
}

::-moz-selection {
  background: rgba(212, 175, 55, 0.3);
}