body {
    background: url("../image/background.jpg") center/cover no-repeat fixed;
    /* 如果你想让背景跟随页面一起滑动，把 fixed 删掉 */
}

/* 整个内容区域宽度和上下间距 */
.characters-main {
    max-width: 1080px;
    margin: 40px auto 60px;
    padding: 0 24px;
}

/* 顶部标题区域 */
.characters-header h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
}

.characters-header p {
    font-size: 14px;
    color: #f2d7c9;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* 卡片网格 */
.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

/* 单个角色卡片 */
.character-card {
    background-color: rgb(33, 45, 79);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;              /* 鼠标变成可点击 */
}

/* 上面网格只显示图片，名字/文字隐藏 */
.character-body {
    display: none;
}


/* hover 微浮起效果 */
.character-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 28px rgba(0,0,0,0.55);
}

/* 上半部分图片 */
.character-thumb {
    background: radial-gradient(circle at 20% 10%, #fff7d4, #ffb05a);
    padding: 18px 18px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.character-thumb img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* 下半部分文本 */
.character-body {
    padding: 12px 16px 14px;
}

.character-name {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.character-tagline {
    font-size: 13px;
    color: #f5e6d5;
    line-height: 1.5;
    margin-bottom: 6px;
}

.character-meta {
    font-size: 11px;
    color: #ffd34a;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}


/* 响应式：小屏稍微收紧内边距 */
@media (max-width: 600px) {
    .characters-main {
        padding: 0 16px;
        margin-top: 24px;
    }
}

/* ====== 角色弹窗背景（全屏遮罩） ====== */
.character-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6); /* 变暗 */
    display: none;                  /* 默认隐藏 */
    align-items: center;
    justify-content: center;
    z-index: 200;                   /* 在导航之上 */
    backdrop-filter: blur(3px);     /* 背景虚化一点（支持的浏览器会有） */
}

/* 显示弹窗时加这个类 */
.character-modal-backdrop.show {
    display: flex;
}

/* 弹窗主体卡片 */
.character-modal {
    background-color: rgb(33, 45, 79);
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.6);
    max-width: 900px;
    width: calc(100% - 80px);
    padding: 22px 26px 24px;
    display: flex;
    gap: 22px;
    position: relative;
}

/* 左边放大的图片 */
.modal-image {
    flex: 0 0 620px;       /* ← 原本 320px */
    max-width: 620px; 
    border-radius: 16px;
    overflow: hidden;
    background: radial-gradient(circle at 20% 10%, #fff7d4, #ffb05a);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* 右侧文字信息 */
.modal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#modalName {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #ffffff;
}

#modalTagline {
    font-size: 14px;
    color: #f5e6d5;
    line-height: 1.7;
    margin-bottom: 10px;
}

#modalTheme {
    font-size: 12px;
    color: #ffd34a;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* 右上角关闭按钮 */
.modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: transparent;
    border: none;
    font-size: 22px;
    color: #ffffff;
    cursor: pointer;
    line-height: 1;
}

/* 小屏幕：弹窗改成上下排 */
@media (max-width: 700px) {
    .character-modal {
        flex-direction: column;
        align-items: stretch;
        padding: 16px 18px 18px;
    }

    .modal-image {
        width: 100%;
        max-width: none;
    }
}
