/* 通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(to bottom, #e6e9f0, #eef2f7); /* 柔和渐变背景 */
    color: #333;
    line-height: 1.6;
}

.container {
    width: 95%; /* 宽度设为 95% */
    max-width: 1600px; /* 增加最大宽度 */
    margin: 30px auto;
    background-color: #fff;
    padding: 30px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-radius: 12px; /* 圆角 */
    overflow: hidden;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5em; /* 调整为适合一行的较小字体 */
    color: #1e70bb;
    font-weight: 700;
    margin-bottom: 10px;
}

header .subtitle {
    font-size: 1.3em;
    color: #777;
    margin-top: 10px;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    border-radius: 10px;
    overflow: hidden; /* 确保表格的圆角效果 */
}

th, td {
    padding: 10px 12px; /* 减小上下内边距，控制每行高度 */
    text-align: center;
    border: 1px solid #ddd;
    background-color: #f8f8f8;
    font-size: 14px; /* 调整字体大小 */
}

th {
    background-color: #1e70bb;
    color: white;
    font-weight: bold;
}

/* 去除交替背景，统一背景颜色 */
tr {
    background-color: #f8f8f8; /* 统一背景颜色 */
}

/* 表格行悬停效果 - 仅改变背景色 */
tr:hover {
    background-color: #dbe8f3;  /* 更明显的蓝色背景，鼠标悬停时的效果 */
}

/* 使每个单元格的背景透明，这样tr的背景色能覆盖 */
tr td {
    background-color: transparent !important;
}

/* 悬停时按钮颜色 */
tr:hover .btn {
    background-color: #0056b3; /* 更深的蓝色背景，悬停时按钮颜色变化 */
    color: white;
}

/* 第一列文字增亮 */
tr:hover td:nth-child(1) {
    color: red; /* 版本名称 */
    filter: brightness(1.2); /* 增亮 */
}

/* 第二列文字增亮 */
tr:hover td:nth-child(2) {
    color: black; /* 版本介绍 */
    filter: brightness(1.2); /* 增亮 */
}

/* 第三列文字增亮 */
tr:hover td:nth-child(3) {
    color: green; /* 开区时间 */
    filter: brightness(1.2); /* 增亮 */
}

/* 按钮统一样式 */
.btn {
    display: inline-block;
    padding: 4px 8px; /* 缩小按钮内边距 */
    margin: 5px;
    text-align: center;
    text-decoration: none;
    font-weight: bold; /* 加粗字体 */
    border-radius: 5px; /* 更小圆角 */
    background-color: #66b3ff; /* 更浅的蓝色 */
    color: white;
    transition: all 0.3s ease;
    font-size: 12px; /* 调整字体大小 */
    min-width: 80px; /* 设置最小宽度 */
}

.btn:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(1px);
}

/* 按钮颜色定制 */
.btn:nth-child(4) {
    background-color: #ffcc66; /* 更浅的橙色 */
}

.btn:nth-child(5) {
    background-color: #66cc66; /* 更浅的绿色 */
}

.btn:nth-child(6) {
    background-color: #66cc66; /* 更浅的绿色 */
}

.btn:nth-child(7) {
    background-color: #ff6666; /* 更浅的红色 */
}

/* 将按钮横向排列并调整紧凑性 */
td a {
    display: inline-block;
    margin: 3px; /* 缩小按钮间的间距 */
    width: auto; /* 让按钮不占据过多宽度 */
}

/* 修改游戏信息文字颜色 */
td:nth-child(1) {
    color: red; /* 版本名称 */
    font-weight: bold; /* 加粗 */
}

td:nth-child(2) {
    color: black; /* 版本介绍保持黑色 */
    font-weight: bold; /* 加粗 */
}

td:nth-child(3) {
    color: green; /* 开区时间 */
    font-weight: bold; /* 加粗 */
}

/* 页脚样式 */
footer {
    text-align: center;
    margin-top: 40px;
    font-size: 1em;
    color: #777;
}

footer p {
    margin: 20px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 20px;
    }

    table {
        font-size: 0.9em;
    }

    th, td {
        padding: 8px 10px; /* 再次调整内边距，优化小屏设备展示 */
    }

    /* 优化小屏设备上按钮布局 */
    td a {
        font-size: 12px;
        padding: 6px 10px;
        margin: 3px;
    }
}

/* 公告悬浮窗口 */
.announcement-tooltip {
    position: fixed;
    z-index: 9999;
    max-width: 420px;
    max-height: 320px;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
    white-space: pre-wrap; /* 保留换行 */
    pointer-events: auto; /* 允许鼠标滚轮/选择文本 */
}

/* 小屏优化 */
@media (max-width: 768px) {
    .announcement-tooltip {
        max-width: 90vw;
        max-height: 45vh;
        font-size: 12px;
    }
}


/* 更新公告弹窗（居中、可滚动） */
.announcement-modal{
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0,0,0,0.55);
}

.announcement-modal-content{
    position: relative;
    width: min(860px, 92vw);
    max-height: 82vh;
    background: #111;
    color: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.35);
    overflow: hidden; /* header固定，内容区滚动 */
    display: flex;
    flex-direction: column;
}

.announcement-modal-header{
    padding: 16px 18px 12px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.announcement-title{
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.announcement-subtitle{
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.8;
}

.announcement-body{
    padding: 14px 18px 18px 18px;
    overflow: auto;
    overscroll-behavior: contain;
    white-space: pre-wrap;
    line-height: 1.6;
    font-size: 13px;
}

/* 关闭按钮 */
.announcement-close{
    position: absolute;
    right: 10px;
    top: 10px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 10px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 22px;
    line-height: 34px;
    cursor: pointer;
}

.announcement-close:hover{
    background: rgba(255,255,255,0.18);
}

@media (max-width: 768px){
    .announcement-modal-content{
        width: 94vw;
        max-height: 86vh;
    }
    .announcement-body{
        font-size: 12px;
    }
}


body.modal-open{ overflow: hidden; }


/* ===== 新服日期顶部提示 ===== */
.server-banner{
    text-align: center;
    margin: 0 0 18px 0;
}

.server-date-line{
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.server-date{
    font-size: 18px; /* 主标题：不要太大 */
    font-weight: 600;
}

.server-tip{
    margin-top: 6px;
    font-size: 15px; /* 提示文字：更清晰 */
    color: #555;
}

.server-badge{
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    background: #ff3b30;
    color: #fff;
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

@media (max-width: 480px){
    .server-date{ font-size: 16px; }
    .server-tip{ font-size: 14px; }
}
