/* ==========================================
   深渊魔王模拟器 - CSS美化样式表
   适配HTML回复格式
   ========================================== */

/* 全局容器 */
ai {
    display: block;
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    line-height: 1.8;
    color: #e0e0e0;
    background: linear-gradient(135deg, #1a0a0a 0%, #2d1b1b 100%);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(139, 0, 0, 0.3);
}

/* 状态栏样式 */
.status-bar {
    margin-bottom: 24px;
}

.status-bar pre {
    background: linear-gradient(135deg, #8B0000 0%, #4a0000 100%);
    border: 2px solid #ff4444;
    border-radius: 8px;
    padding: 16px;
    color: #ffcccc;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* 正文区域 */
.text-content {
    background: rgba(45, 27, 27, 0.6);
    border-left: 4px solid #8B0000;
    padding: 20px;
    margin-bottom: 24px;
    border-radius: 8px;
}

text p {
    margin: 0 0 16px 0;
    text-indent: 2em;
    font-size: 16px;
    color: #f0f0f0;
}

text p:last-child {
    margin-bottom: 0;
}

/* 对话颜色 */
text span[style*="color:#8B0000"] {
    font-weight: bold;
    text-shadow: 0 0 4px rgba(139, 0, 0, 0.5);
}

text span[style*="color:#FF1493"] {
    font-weight: bold;
    text-shadow: 0 0 4px rgba(255, 20, 147, 0.5);
}

text span[style*="color:#4169E1"] {
    font-weight: bold;
    text-shadow: 0 0 4px rgba(65, 105, 225, 0.5);
}

text span[style*="color:#9370DB"] {
    font-style: italic;
    opacity: 0.9;
}

/* 折叠块通用样式 */
details {
    background: rgba(30, 15, 15, 0.8);
    border: 1px solid #5a3030;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

details:hover {
    border-color: #8B0000;
    box-shadow: 0 4px 16px rgba(139, 0, 0, 0.2);
}

details[open] {
    background: rgba(40, 20, 20, 0.9);
}

details summary {
    background: linear-gradient(90deg, #5a3030 0%, #3a1a1a 100%);
    padding: 12px 16px;
    cursor: pointer;
    font-weight: bold;
    font-size: 15px;
    color: #ffcccc;
    user-select: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

details summary:hover {
    background: linear-gradient(90deg, #8B0000 0%, #5a3030 100%);
    color: #ffffff;
}

details[open] summary {
    border-bottom-color: #5a3030;
    margin-bottom: 12px;
}

details section {
    padding: 16px;
    color: #e0e0e0;
}

/* 代码块样式 */
details pre {
    background: #1a0a0a;
    border: 1px solid #3a1a1a;
    border-radius: 6px;
    padding: 12px;
    color: #d0d0d0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    margin: 8px 0;
}

/* 标题样式 */
details h4 {
    color: #ff6666;
    font-size: 14px;
    margin: 16px 0 8px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #3a1a1a;
}

details h4:first-child {
    margin-top: 0;
}

/* 列表样式 */
details ul {
    list-style: none;
    padding-left: 0;
    margin: 8px 0;
}

details ul li {
    padding: 6px 0 6px 20px;
    position: relative;
    color: #d0d0d0;
}

details ul li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #8B0000;
    font-weight: bold;
}

details ul ul {
    padding-left: 20px;
    margin-top: 4px;
}

details ul ul li::before {
    content: "•";
    color: #ff6666;
}

/* 表格样式 */
details table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 13px;
    background: rgba(20, 10, 10, 0.5);
}

details table thead {
    background: linear-gradient(90deg, #5a3030 0%, #3a1a1a 100%);
}

details table th {
    padding: 10px 8px;
    text-align: left;
    color: #ffcccc;
    font-weight: bold;
    border: 1px solid #3a1a1a;
}

details table td {
    padding: 8px;
    border: 1px solid #2a1a1a;
    color: #d0d0d0;
}

details table tbody tr:hover {
    background: rgba(139, 0, 0, 0.1);
}

/* 段落样式 */
details p {
    margin: 8px 0;
    line-height: 1.6;
    color: #d0d0d0;
}

/* 强调文本 */
details strong {
    color: #ff8888;
    font-weight: bold;
}

/* 行动选项面板 */
.choice-panel {
    background: linear-gradient(135deg, #2d1b1b 0%, #1a0a0a 100%);
    border: 2px solid #8B0000;
    border-radius: 8px;
    padding: 16px;
    margin-top: 24px;
    box-shadow: 0 4px 16px rgba(139, 0, 0, 0.3);
}

.choice-panel pre {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    color: #ffcccc;
    font-size: 14px;
    line-height: 1.8;
}

/* 分隔线样式 */
hr {
    border: none;
    border-top: 1px solid #3a1a1a;
    margin: 20px 0;
}

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

ai ::-webkit-scrollbar-track {
    background: #1a0a0a;
    border-radius: 4px;
}

ai ::-webkit-scrollbar-thumb {
    background: #5a3030;
    border-radius: 4px;
}

ai ::-webkit-scrollbar-thumb:hover {
    background: #8B0000;
}

/* 响应式设计 */
@media (max-width: 768px) {
    ai {
        padding: 12px;
    }
    
    .status-bar pre,
    .choice-panel pre {
        font-size: 12px;
    }
    
    text p {
        font-size: 15px;
    }
    
    details table {
        font-size: 12px;
    }
    
    details table th,
    details table td {
        padding: 6px 4px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

ai {
    animation: fadeIn 0.5s ease;
}

details[open] section {
    animation: fadeIn 0.3s ease;
}

/* 特殊标记样式 */
.emoji-icon {
    font-style: normal;
    margin-right: 6px;
}

/* 数值高亮 */
details pre strong,
details table strong {
    color: #ff4444;
    text-shadow: 0 0 4px rgba(255, 68, 68, 0.3);
}

/* 警告/危险提示 */
.warning {
    background: rgba(139, 0, 0, 0.2);
    border-left: 4px solid #ff4444;
    padding: 12px;
    margin: 12px 0;
    border-radius: 4px;
    color: #ffcccc;
}

/* 成功/完成提示 */
.success {
    background: rgba(0, 100, 0, 0.2);
    border-left: 4px solid #44ff44;
    padding: 12px;
    margin: 12px 0;
    border-radius: 4px;
    color: #ccffcc;
}