/* 造物协会档案库 全站通用样式 - 响应式适配手机/平板/电脑 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    background: #0a0a12;
    color: #e0e0e0;
    line-height: 1.6;
}
/* 全局背景网格（导航页专属） */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(30, 30, 60, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 30, 60, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
}
/* 导航页容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
/* 详情页容器 */
.wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 15px 10px;
}
/* 通用头部标题（导航页） */
header {
    text-align: center;
    margin: 2rem 0;
}
h1 {
    font-size: 2.5rem;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    margin-bottom: 0.5rem;
}
/* 通用提示条（导航页/详情页） */
.tips {
    background: #151b2b;
    border-left: 4px solid #00ccff;
    padding: 14px 18px;
    margin: 20px auto 30px;
    border-radius: 6px;
    color: #aad8ff;
    max-width: 1000px;
    font-size: 0.95rem;
}
/* 导航页-角色卡片网格 */
.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}
.unit-card {
    background: rgba(20, 20, 35, 0.8);
    border: 1px solid rgba(100, 100, 200, 0.3);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
    color: inherit;
}
.unit-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(100, 100, 200, 0.4);
    border-color: rgba(150, 150, 255, 0.6);
}
.unit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
}
.unit-avatar {
    width: 100%;
    height: 200px;
    object-fit: cover;
    filter: saturate(1.2) contrast(1.1);
}
.unit-info {
    padding: 1.5rem;
}
.unit-code {
    font-size: 0.85rem;
    color: #88aaff;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}
.unit-name {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 0.5rem;
}
.unit-race {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 1rem;
}
/* 角色状态标签 */
.unit-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.status-active {
    background: rgba(0, 200, 100, 0.2);
    color: #00d860;
    border: 1px solid rgba(0, 200, 100, 0.3);
}
.status-contained {
    background: rgba(200, 150, 0, 0.2);
    color: #ffc107;
    border: 1px solid rgba(200, 150, 0, 0.3);
}
/* 导航页-快捷生成工具 */
.generator-section {
    max-width: 1000px;
    margin: 0 auto 4rem;
    padding: 2rem;
    background: rgba(20, 20, 35, 0.8);
    border: 1px solid rgba(100, 100, 200, 0.3);
    border-radius: 12px;
}
.generator-section h2 {
    color: #00ccff;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}
.generator-section p {
    color: #aad8ff;
    margin-bottom: 20px;
    font-size: 0.95rem;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}
.form-group {
    margin-bottom: 1.5rem;
    grid-column: 1 / -1;
}
.form-grid input,
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(10, 10, 18, 0.8);
    border: 1px solid rgba(100, 100, 200, 0.3);
    border-radius: 6px;
    color: #e0e0e0;
    font-family: inherit;
}
.form-group textarea {
    min-height: 120px;
    resize: vertical;
}
.btn-generate {
    padding: 10px 24px;
    background: #0077bb;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}
.btn-generate:hover {
    background: #00aaff;
}
.code-output {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(10, 10, 18, 0.8);
    border: 1px solid rgba(100, 100, 200, 0.3);
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #00d860;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
    width: 100%;
    min-height: 200px;
}
/* 详情页-专属样式 */
.detail-title {
    text-align: center;
    margin-bottom: 20px;
}
.detail-title h1 {
    font-size: 20px;
    color: var(--accent-color);
    text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.25);
    margin-bottom: 5px;
    text-transform: none;
}
.detail-title p {
    color: #8899aa;
    font-size: 12px;
}
.back {
    display: inline-block;
    margin-bottom: 15px;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 14px;
}
.back:hover {
    color: #fff;
    text-decoration: underline;
}
/* 折叠面板（详情页核心） */
.fold {
    background: rgba(20, 20, 35, 0.8);
    border: 1px solid rgba(100, 100, 200, 0.3);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}
.fold-head {
    padding: 14px 18px;
    background: rgba(10, 10, 18, 0.8);
    color: var(--accent-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
}
.fold-head::after {
    content: "+";
    font-size: 20px;
    line-height: 1;
}
.fold.active .fold-head::after {
    content: "−";
}
.fold-content {
    padding: 0 18px;
    max-height: 0;
    transition: max-height 0.4s ease-out;
    font-size: 14px;
    color: #c8d8e8;
}
.fold.active .fold-content {
    padding: 15px 18px;
    max-height: 5000px;
}
/* 详情页-信息栅格 */
.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 8px;
}
/* 详情页-高亮文字（主题色） */
.highlight {
    color: var(--accent-color);
    font-weight: bold;
}
/* 详情页-角色立绘（默认隐藏） */
.avatar-box {
    text-align: center;
    margin: 20px 0;
    display: none;
}
.avatar-box img {
    max-width: 80%;
    max-height: 400px;
    border-radius: 8px;
    border: 1px solid var(--accent-color);
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.2);
}
/* 立绘控制按钮 */
.avatar-btn {
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 0 auto 20px;
    padding: 8px 0;
    background: rgba(10, 10, 18, 0.8);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
    transition: all 0.3s ease;
}
.avatar-btn:hover {
    background: var(--accent-color);
    color: #0a0a12;
}
/* 详情页-能力/弱点专属样式 */
.core-ability {
    margin: 6px 0;
    padding-left: 8px;
    border-left: 2px solid var(--accent-color);
}
.weakness-list {
    color: #ffcccc;
    list-style: inside;
    margin-left: 10px;
}
ul {
    margin: 0 0 8px 20px;
}
ul li {
    margin-bottom: 5px;
}
/* 响应式适配 - 平板（768px+） */
@media (min-width: 768px) {
    .wrap {
        padding: 25px 20px;
    }
    .detail-title h1 {
        font-size: 26px;
    }
    .detail-title p {
        font-size: 14px;
    }
    .info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .fold-head {
        font-size: 18px;
    }
    .fold-content {
        font-size: 15px;
        line-height: 1.7;
    }
    .tips {
        padding: 12px 16px;
    }
    .avatar-box img {
        max-width: 60%;
    }
}
/* 响应式适配 - 电脑（992px+） */
@media (min-width: 992px) {
    .wrap {
        padding: 30px 20px;
    }
    .detail-title h1 {
        font-size: 28px;
    }
    .fold {
        margin-bottom: 12px;
    }
    .fold-content {
        font-size: 16px;
    }
}
/* 响应式适配 - 小屏手机（768px-） */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .container {
        padding: 15px;
    }
    .card-list {
        gap: 1.5rem;
    }
    .unit-avatar {
        height: 160px;
    }
    .generator-section {
        padding: 1.5rem;
    }
}
