/* =========================================
   全能沙盒引擎 - 专属UI样式面板
   ========================================= */
.sandbox-ui {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: rgba(15, 20, 28, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid #2a3d55;
    border-radius: 8px;
    padding: 12px;
    color: #d1d9e1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 255, 255, 0.05);
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.6;
}
.sandbox-ui details {
    background: rgba(25, 32, 45, 0.6);
    border: 1px solid #364860;
    border-radius: 6px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.sandbox-ui details details {
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid #00e5ff;
    border-top: none; border-right: none; border-bottom: none;
    border-radius: 0 6px 6px 0;
    margin: 5px 10px;
}
.sandbox-ui summary {
    padding: 10px 15px;
    font-weight: bold;
    color: #00e5ff;
    background: linear-gradient(90deg, rgba(30, 45, 65, 0.8) 0%, rgba(20, 30, 45, 0) 100%);
    cursor: pointer;
    user-select: none;
    outline: none;
    border-bottom: 1px solid transparent;
    transition: background 0.3s, text-shadow 0.3s;
}
.sandbox-ui summary:hover {
    background: linear-gradient(90deg, rgba(40, 60, 85, 0.9) 0%, rgba(20, 30, 45, 0) 100%);
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}
.sandbox-ui details[open] > summary {
    border-bottom: 1px solid #364860;
    color: #ffffff;
    text-shadow: 0 0 5px #00e5ff;
}
.sandbox-ui h3 {
    color: #e0e0e0;
    font-size: 15px;
    margin: 15px 0 8px 0;
    padding-bottom: 5px;
    border-bottom: 1px dashed #4a627a;
    display: flex;
    align-items: center;
}
.sandbox-ui ul {
    margin: 8px 0;
    padding-left: 20px;
}
.sandbox-ui li {
    margin-bottom: 5px;
}

/* 👇 这里是重点：已知情报库的黑框美化 & 一键全选魔法 */
.sandbox-ui pre {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 10px;
    margin: 5px 10px 10px 10px;
    color: #8b9eb0;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap; /* 允许文本自动换行，防止手机端横向拉伸过长 */
    /* 一键全选核心代码 */
    user-select: all;
    -webkit-user-select: all;
    -moz-user-select: all;
    cursor: pointer;
    transition: background 0.2s;
}
/* 点击时给一点视觉反馈 */
.sandbox-ui pre:active {
    background: #161b22;
}

.sandbox-ui strong {
    color: #ffffff;
}
/* =========================================
   主控终端 - 全局外框与正文排版
   ========================================= */

/* 1. 最外层全局容器 */
.master-terminal {
    background: linear-gradient(135deg, #0a0e14 0%, #121a24 100%); /* 深邃渐变底色 */
    border: 1px solid #1f3045;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 229, 255, 0.1) inset;
    margin: 10px 0;
    position: relative;
    overflow: hidden;
}

/* 给外框加一个极客风的顶部高光线 */
.master-terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00e5ff, transparent);
    opacity: 0.7;
}

/* 2. 正文 <text> 标签专属排版美化 */
.master-terminal text {
    display: block; /* 将text标签转为块级元素 */
    background: rgba(255, 255, 255, 0.02); /* 极淡的背景区分 */
    border-left: 3px solid #6b829e; /* 左侧引用线 */
    padding: 15px 20px;
    margin: 15px 0;
    font-size: 16px; /* 正文字体稍微大一点，方便阅读 */
    line-height: 1.8; /* 增加行距，呼吸感更强 */
    color: #e6edf3; /* 柔和的亮灰色，适合长文阅读 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); /* 增加文字立体感 */
    border-radius: 0 8px 8px 0;
}
/* =========================================
   空间挤压修复补丁 (移动端极限瘦身版)
   ========================================= */

/* 1. 启动终极防撑爆结界：让所有内外边距都在内部消化 */
.master-terminal, .master-terminal * {
    box-sizing: border-box !important;
    max-width: 100%;
}

/* 2. 主终端外框：剥离左右多余脂肪 */
.master-terminal {
    padding: 10px 2px !important; /* 左右压缩到极致的2px */
    margin: 8px 0 !important;
}

/* 3. 内部沙盒容器：取消边框和多余背景，融入主终端 */
.master-terminal .sandbox-ui {
    margin: 0 !important;
    padding: 0 2px !important; /* 内部几乎不留白 */
    border: none !important; /* 既然外面有框了，里面这层框就去掉，省空间 */
    background: transparent !important; /* 背景透明，用最外层的深邃背景 */
    box-shadow: none !important;
}

/* 4. 折叠块与标题：极限压缩左右边距 */
.master-terminal .sandbox-ui details {
    margin-bottom: 6px !important;
}
.master-terminal .sandbox-ui summary {
    padding: 8px 6px !important; /* 左右从15px砍到6px */
    font-size: 14px !important;
}
.master-terminal .sandbox-ui details details {
    margin: 4px 0 4px 4px !important; /* 二级折叠只留4px的左侧提示线空间 */
    border-left: 2px solid #00e5ff !important; /* 线条变细 */
}

/* 5. 列表缩进大瘦身：拯救被挤压的正文 */
.master-terminal .sandbox-ui ul {
    padding-left: 14px !important; /* 从20px砍到14px，足够看清点点就行 */
    margin: 4px 0 !important;
}
.master-terminal .sandbox-ui li {
    margin-bottom: 3px !important;
}

/* 6. 正文区域：舒展呼吸 */
.master-terminal text {
    padding: 10px 8px !important; 
    margin: 10px 2px !important;
    font-size: 15px !important; /* 手机端稍微调小一点点字号，显得不那么挤 */
    border-left: 2px solid #6b829e !important;
}