/* ===== 全局样式 ===== */
body {
    margin: 0;
    padding: 0; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: white;
    color: #333;
    /* 添加固定背景图片 */
    background-image: url("images/bg.jpg");
    background-attachment: fixed; /* 固定背景，不随滚动移动 */
    background-size: cover; /* 图片覆盖整个屏幕 */
    background-position: right; /* 图片靠右显示 */
    background-repeat: no-repeat; /* 不重复显示图片 */


}

/* ===== 链接样式 ===== */
a { 
    color: #000000;
    text-decoration: none; 
}
a:hover { 
    color: #ffffff;                 /*封面的要独立出来*/
}

/* ===== 页眉 ===== */
header {
    background: transparent; /* 透明背景 */
    padding: 1rem;
    text-align: center;
    border-bottom: none; /* 移除底部边框 */
    /* 可选：添加文字阴影使标题在背景上更清晰 */
    color: #fff; /* 如果背景较暗，可将标题文字改为白色 */
    margin-bottom: 0; 

    /* 关键：设置高度为视口高度的20% */
    height: 188px;
    /* 确保内容在页眉内垂直居中 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

footer {
    background: #ffffff;
    padding: 1rem;
    text-align: center;
}

/* ===== 导航栏 ===== */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

/* ===== 主内容区 ===== */
main {
    padding: 1rem 0.5rem;
    margin: 0rem auto;
    background: white; /* 主体保持白色背景 */
    /* 可选：添加一点阴影区分主体和背景 */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%; /* 扩展到全屏宽度 */
    
}

.section {
    margin: 2rem 0;
}

/* ===== 网格布局（控制卡片默认分布） ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    
}

/* ===== 默认卡片样式（恢复原始状态） ===== */
.card {
    background: #27363e;
    color: #e0e0e0;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #3a4a54;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 角色和光锥页签的文字修改 */
.card-text {
    margin: 5px 0;      /* 原始上下边距 */
    padding: 0;
    text-align: center;
    color: #F29E38;
}


/* ===== 特殊专属卡片容器 ===== */


/* 大图容器 */


/* 大图样式（保持比例+居中） */


/* 小图组容器 */


/* 小图样式（强制正方形） */


/* 原神 星穹铁道 未来日期行 */
.card-game-gen{
    background: #ffffff;
    color: #000000;
    padding: 0.8rem;
    border-radius: 5px;
    border: 1px solid #3a4a54;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    width:25%;
    margin: 0 1%; /* 增加一点间距 */
    text-decoration: none; /* 移除链接下划线 */
}
.card-game-hsr{
    background: #2a34bf;
    color: #ffffff;
    padding: 0.8rem;
    border-radius: 5px;
    border: 1px solid #3a4a54;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    width:25%;
    margin: 0 1%; /* 增加一点间距 */
    text-decoration: none; /* 移除链接下划线 */
}
.card-game-fut{
    background: #ffffff;
    color: #000000;
    padding: 0.8rem;
    border-radius: 5px;
    border: 1.5px solid #7f00c8;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    width:25%;
    margin: 0 1%; /* 增加一点间距 */
    text-decoration: none; /* 移除链接下划线 */
}
.card-game-large{
    background: #ffffff;
    color: #e0e0e0;
    padding: 0.5rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: center; /* 水平居中 */
    gap: 8px; /* 卡片之间的间距 */
    flex-wrap: wrap; /* 确保小屏幕下自动换行 */
}
.word-box{
    background: #ffffff;
    color: #e0e0e0;
    padding: 0rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: center; /* 水平居中 */
    gap: 8px; /* 卡片之间的间距 */
    flex-wrap: wrap; /* 确保小屏幕下自动换行 */
    margin-bottom: 0; /* 保持两行之间无间距 */
    margin-top: 0.8rem; /* 第一行上方添加空间（可调整数值） */
}
.word-box-2{
    background: #ffffff;
    color: #e0e0e0;
    padding: 0rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: center; /* 水平居中 */
    gap: 8px; /* 卡片之间的间距 */
    flex-wrap: wrap; /* 确保小屏幕下自动换行 */
    margin-top:0;
    margin-bottom: 0.8rem; 
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    font-weight: bold;
    font-size: 1.2rem;
}
.word-box, .word-box-2 {
  grid-column: 1 / -1; /* 从第1列到最后一列，即独占一行 */
  margin-left: 0; /* 清除左右默认间距 */
  margin-right: 0;
}

.card-tab{
    background: #ffffff;
    color: #000000;
    padding: 0.5rem 1rem; /* 减少内边距，上下更紧凑 */
    border-radius: 4px;
    border: 2px solid #ff9812;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    width: auto; /* 宽度随文字变化 */
    min-width: auto; /* 取消最小宽度限制 */
    height: auto; /* 高度由内容决定 */
    line-height: 1.5; /* 行高控制单行高度 */
    margin-left: 0.3rem; /* 移除额外边距 */
    margin-right: 0.3rem; /* 移除额外边距 */
    text-decoration: none;
    display: inline-flex; /* 确保元素宽度贴合内容 */
    align-items: center; /* 文字垂直居中 */
    white-space: nowrap; /* 防止文字换行 */
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    font-weight: bold;
    font-size: 1rem;
}
.card-tab-new{
    background: #ffffff;
    color: #000000;
    padding: 0.5rem 1rem; /* 减少内边距，上下更紧凑 */
    border-radius: 4px;
    border: 2px solid #7f00c8;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    width: auto; /* 宽度随文字变化 */
    min-width: auto;
    height: auto;
    line-height: 1.5;
    margin-left: 0.3rem; /* 移除额外边距 */
    margin-right: 0.3rem; /* 移除额外边距 */
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    font-weight: bold;
    font-size: 1rem;
}


.big-box {
  
    background-color: #ffffff;
  /* 大幅减少大盒子自身的内边距 */
    padding: 0; /* 原可能有默认值，这里改小，可根据需求调 0 或更小 */
  /* 清除大盒子默认外边距（如果有的话） */
    margin: 0 auto; /* 保持水平居中，按需调整 */
    /* 清除大盒子自身的默认外边距 */
    margin-top: 0; 
    border-bottom: 1px solid #000000;
    padding-bottom: 1.5rem;
}

/* 调整大盒子内部 .section 的边距：找到原 .section 样式，追加或修改 */
.big-box .section {
  /* 大幅减少内部 section 的上下外边距 */
  margin: 0; /* 原可能是 2rem，改成很小的值 */
  /* 大幅减少内部 section 的内边距（如果有） */
  padding: 0; /* 按需调整，甚至可以设为 0 */
}

/* 调整卡片容器 .card-game-large 的边距（如果内部有这个类） */
.big-box .card-game-large {
  /* 减少自身内边距，原是 0.5rem 之类的，改小 */
  padding: 0; 
  /* 减少外边距（如果有） */
  margin: 0; 
}









/* 文字样式（多语言支持） */
.special-card .card-text::before {
    content: attr(data-text-ch);
}
html[lang="en"] .special-card .card-text::before {
    content: attr(data-text-en);
}



/* 特殊卡片容器样式 */
.special-cards-container {
    /* 防止容器影响整体布局 */
    margin: 0.2rem 0;
    overflow: hidden; /* 隐藏超出容器的内容 */
}

/* 特殊卡片网格 - 使用弹性布局实现单行滚动 */


/* 保持特殊卡片尺寸固定 */


/* 移除原有网格布局对特殊卡片的影响 */
.section:nth-of-type(4) .grid {
    justify-items: stretch;
    justify-content: center;
}

/* 调整主标题样式 */
header h1:first-of-type {
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif; /* 设置为微软雅黑 */
    font-size: 3.1rem; /* 增大字体大小，可根据需要调整数值 */
    margin: 0.5rem 0; /* 调整上下边距，避免过大间距 */
    font-weight: normal;
}

/* 调整版本号标题样式 */
header h1:last-of-type {
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif; /* 设置为微软雅黑 */
    font-size: 1.8rem; /* 减小字体大小，可根据需要调整数值 */
    font-weight: bold; /* 加粗显示 */
    margin: 0.5rem 0; /* 调整上下边距 */
}

/* 隐藏滚动条但保留滚动功能 */
html {
  overflow: -moz-scrollbars-none;  /* Firefox旧版 */
  scrollbar-width: none;           /* Firefox新版 */
  -ms-overflow-style: none;        /* IE/Edge */
}

html::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Opera */
}




/* === Updated special-card styles === */

:root {
    --gap: 0.5rem;
}

/* 特殊卡片容器网格 */
.special-cards-grid {
    display: flex;
    gap: var(--gap);
    padding: 0.5rem 0;
    overflow-x: hidden;
    overflow-y: hidden;
    white-space: nowrap;
    justify-content: flex-start;
    width: 100%;
    box-sizing: border-box;
    align-items: flex-start;
}

/* 特殊卡片 */
.special-card {
    flex: 0 0 calc((100% - 5 * var(--gap)) / 6);
    padding: 1rem;
    background: linear-gradient(135deg, #27363e 0%, #1a2a32 100%);
    border: 1px solid #3a4a54;
    box-shadow: 0 0 10px rgba(0, 150, 255, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;

    height: auto !important;
    min-height: auto !important;
}

/* 图片容器 */
.special-card-image-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
    width: 100%;
}

/* 主图片 */
.special-card-large {
    width: 70%;
    height: auto;
    max-height: 8em;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: none;
}

/* 小图组 */
.special-card-small-group {
    display: flex;
    justify-content: center;
    gap: 0.4em;
    width: 70%;
    margin-top: 0.2em;
}

/* 小图样式 */
.special-card-small {
    width: 2.2em;
    height: 2.2em;
    object-fit: cover;
    border-radius: 4px;
}

/* 文字 */
.card-text {
    margin-top: 0.5em;
    text-align: center;
    color: #F29E38;
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    font-weight: bold;
    font-size: 1rem;
}
.card-text-four {           /*后续被覆盖了，这段没用*/
    margin-top: 0.5em;
    text-align: center;
    color: #ff5ab8;
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    font-weight: bold;
    font-size: 1rem;
}

/* 缩放时卡片数变化 */
@media (min-width: 3000px) {
    .special-card {
        flex: 0 0 calc((100% - 3.25 * var(--gap)) / 4.25);
    }
}

@media (min-width: 3500px) {
    .special-card {
        flex: 0 0 calc((100% - 2.65 * var(--gap)) / 3.65);
    }
}


.bottom-button-group {
    background-color: #a3a3a3; /* 浅灰底 */
    padding: 0.8rem;
    border-radius: 1px;
    box-sizing: border-box;
    margin-top: 0.2rem;   /* 原本是默认 section 的 2rem，现在压缩 */
}

.bottom-button-group .grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 0.5rem;
}

@media (min-width: 600px) {
    .bottom-button-group .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1000px) {
    .bottom-button-group .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.bottom-button-group .card {
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    font-weight: bold;
    font-size: 1.35rem;
    background-color: #27363e;
    color: #e0e0e0;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}
.bottom-button-group .card:hover {
    transform: translateY(-2px);
}

.card-text[data-text-ch="永远的迷境饭"]::before {
    color: rgb(248, 164, 219);
}


.countdown-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;s
}
.countdown-icon {
    height: 2.5em;
    vertical-align: middle;
}
.countdown-icon-2 {
    height: 2em;
    vertical-align: top;
}
.countdown-days {
    color: rgb(224, 0, 0);
    font-weight: bold;
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    font-size: 1rem;
}

/* 页眉第三行样式 */
.header-third-line {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

/* 关于我按钮样式 */
.about-me-btn {
    border: 2px solid #ff9812; /* 橙色边框 */
    color: #ffffff;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.2s;
}

.about-me-btn:hover {
    background-color: rgba(255, 152, 18, 0.2); /* 橙色半透明背景 */
    transform: translateY(-2px);
}

/* 页眉图片样式 */
.header-img {
    height: 2rem; /* 图片高度，可根据需要调整 */
    width: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 页签按钮悬停效果 */
.card-tab:hover, .card-tab-new:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
/* 取消原神按钮的文字悬停变色 */
.card-game-gen:hover {
    color: #000000; /* 保持原始黑色 */
}
.card-game-fut:hover {
    color: #000000; /* 保持原始黑色 */
}
/* 取消怪物解析等页签的文字悬停变色 */
.card-tab:hover, .card-tab-new:hover {
    color: #000000; /* 保持原始黑色 */
}
/* 取消云璃倒计时区域的文字悬停变色效果 */
.word-box a:hover,
.word-box-2 a:hover {
    color: #000000; /* 保持原始黑色 */
}
