/* --- 全局与字体设置 --- */
body {
    background-color: #000;
    color: #FFFFFF;
    font-family: "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 16px; /* 进一步增大字号以提高可读性 */
    margin: 0;
    padding: 0;
    overflow: hidden;

    /* 默认背景图与平滑过渡效果 */
    background-image: url('images/caoyuan.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.5s ease-in-out;
}

/* 关键：为几乎所有文本添加描边效果，确保可读性 */
h1, h2, span, p, button, a { 
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

h1, h2 {
    font-family: 'Press Start 2P', cursive;
    color: #feca57;
}

/* --- 主要布局 --- */
.game-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    /* 移除所有背景和边框 */
}

header {
    padding: 10px 20px;
    /* 移除header的背景面板 */
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-bar {
    margin-top: 10px;
    padding: 10px;
    font-size: 1.2em;
    display: flex;
    justify-content: space-around;
    /* 移除状态栏的背景和边框 */
}

/* --- 链接按钮样式 (保持不变，因为按钮需要实体感) --- */
.external-links a {
    font-family: 'Press Start 2P', cursive;
    text-decoration: none;
    background: #ff6b6b;
    color: white;
    padding: 8px 15px;
    margin-left: 10px;
    border-radius: 5px;
    border-bottom: 3px solid #ee5253;
    transition: all 0.2s ease;
    text-shadow: 1px 1px 1px #000; /* 按钮使用较浅的阴影 */
}
.external-links a:hover {
    transform: translateY(-2px);
    border-bottom-width: 5px;
}

/* --- 右上角视图导航按钮 (保持不变) --- */
.view-switcher {
    position: absolute;
    top: 120px;
    right: 20px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.view-button {
    width: 140px;
    padding: 12px 10px;
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    color: white;
    background-color: #4834d4;
    border: none;
    border-radius: 5px;
    border-bottom: 3px solid #341f9d;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: 1px 1px 2px #000; /* 按钮使用较浅的阴影 */
}

.view-button:hover {
    transform: translateY(-2px);
    border-bottom-width: 5px;
}

.view-button.active {
    background-color: #f0932b;
    border-bottom-color: #e67e22;
    transform: translateY(2px);
    border-bottom-width: 1px;
}

/* --- 主内容区与角色卡片 --- */
.main-content {
    flex-grow: 1;
    padding: 20px;
    padding-top: 60px; /* 增加顶部内边距，避免内容与状态栏重叠 */
    overflow-y: auto;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.character-card {
    /* 移除卡片背景和边框 */
    text-align: center;
    padding: 10px;
    /* 为卡片添加一个微妙的阴影，让它从背景中“浮”起来 */
    filter: drop-shadow(3px 3px 2px rgba(0,0,0,0.7));
}

.character-card img {
    width:100%; 
    height:150px; /* 增加图片高度 */
    object-fit:cover; 
    border-radius: 5px;
    border: 3px solid white; /* 给图片本身加上白色边框 */
    box-shadow: 0 0 10px black; /* 给图片加阴影 */
}

.character-card h3 {
    color: #000000; /* 修改为黑色 */
    font-size: 22px;
}

.placeholder-text {
    grid-column: 1 / -1;
    text-align: center;
    color: #feca57;
    font-size: 1.5em;
}

/* --- 脚部与背景切换器 --- */
footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 10px 0;
    /* 移除脚部背景 */
    text-align: center;
}

.bg-button {
    font-family: 'VT323', monospace;
    font-size: 18px;
    margin: 0 5px;
    padding: 5px 10px;
    background-color: #feca57;
    color: #222;
    border: 1px solid #feca57;
    border-radius: 5px;
    cursor: pointer;
    text-shadow: none; /* 亮色按钮不需要阴影 */
}
.bg-button:hover {
    background-color: #ff9f43;
}
/* --- 新增：商店卡片字体定制 --- */

/* 选择器指向“星探中心”内的所有卡片元素 */
#talent-center .character-card h3,
#talent-center .character-card p,
#talent-center .character-card button {
    /* 使用通用的无衬线字体（黑体），确保在各种设备上都清晰显示 */
    font-family: "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    
    /* 将文字描边改为柔和的白色阴影，以突显深色文字 */
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
/* --- 新增：图片查看模态窗口样式 --- */
}
.modal-overlay {
    position: fixed; /* 固定定位，覆盖整个视口 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* 半透明黑色背景 */
    z-index: 1000; /* 确保在最顶层 */
    
    /* 使用 Flexbox 轻松实现内容居中 */
    display: none; /* 默认隐藏 */
    justify-content: center;
    align-items: center;

    /* 添加淡入动画效果 */
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    /* 限制图片最大尺寸，防止超出屏幕 */
    max-width: 80vw;
    max-height: 85vh;
    
    /* 保持图片原始宽高比 */
    object-fit: contain;

    border: 5px solid white;
    border-radius: 5px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #bbb;
}
