/* === 通用重置和基础样式 === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
    background: #10141d;
    color: #eaf0ff;
    height: 100vh;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 80%;
}

h1 {
    text-align: center;
    padding: 18px 15px;
    color: #eaf0ff;
    font-size: 1.8em;
    margin: 0;
    background: #10141d;
    font-weight: 600;
    letter-spacing: 1px;
}

/* === 顶部统计区 === */
.top-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 20px;
    background: #10141d;
}

.stats-section {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #161d29;
    border: 1px solid #283348;
    border-radius: 10px;
    font-size: 13px;
}

.stat-label {
    color: #9cb0d3;
    font-size: 0.9em;
}

.stat-value {
    font-size: 1.15em;
    font-weight: bold;
    color: #8fc2ff;
}

/* === 复选框 === */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #eaf0ff;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #7db0ff;
}

.table-checkbox-label {
    display: inline-flex;
    align-items: center;
    margin-left: 5px;
    vertical-align: middle;
}

.table-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #7db0ff;
    margin: 0;
    vertical-align: middle;
}

/* === 搜索框（表头内） === */
.table-search-input {
    padding: 6px 10px;
    border: 1px solid #31415d;
    border-radius: 8px;
    background: #161d29;
    color: #f5f7ff;
    font-size: 12px;
    width: 180px;
    outline: none;
    transition: all 0.2s;
    margin-left: 8px;
    vertical-align: middle;
    display: inline-block;
}

.table-search-input::placeholder {
    color: #6c7e9b;
}

.table-search-input:focus {
    background: #1c2637;
    border-color: #7db0ff;
    box-shadow: 0 0 0 2px rgba(125, 176, 255, 0.2);
    width: 220px;
}

/* === 主表格 === */
.table-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 20px;
}

.table-wrap::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-wrap::-webkit-scrollbar-track {
    background: #10141d;
}

.table-wrap::-webkit-scrollbar-thumb {
    background: #31415d;
    border-radius: 4px;
}

.table-wrap::-webkit-scrollbar-thumb:hover {
    background: #455a7a;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #111822;
    font-size: 13px;
    border: 1px solid #31415d;
    border-radius: 10px;
    overflow: hidden;
    table-layout: fixed;
}

th:nth-child(1), td:nth-child(1) { width: 7%; }
th:nth-child(2), td:nth-child(2) { width: 13%; }
th:nth-child(3), td:nth-child(3) { width: 8%; }
th:nth-child(4), td:nth-child(4) { width: 12%; }
th:nth-child(5), td:nth-child(5) { width: 60%; text-align: left; }

th, td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #283348;
}

th {
    background: #1e2a3d;
    color: #eef4ff;
    font-weight: 600;
    cursor: pointer;
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 1px solid #31415d;
    border-right: 1px solid #2a3a55;
}

th:last-child {
    border-right: none;
    cursor: default;
}

tr:hover {
    background: #1a2334;
}

/* === 怪物属性颜色（沿用原色系，但调亮以适应深色背景） === */
.name {
    color: #eaf0ff;
    font-weight: 600;
}

.hp {
    color: #ff9d9d;
    font-weight: 600;
}

.fire {
    color: #ff8d8d;
    font-weight: 600;
}

.ice {
    color: #6ee7e8;
    font-weight: 600;
}

.light {
    color: #ffd88a;
    font-weight: 600;
}

.poison {
    color: #6cf0a1;
    font-weight: 600;
}

.drops {
    color: #9cb0d3;
    text-align: left;
    max-width: 400px;
    font-size: 12px;
    line-height: 1.6;
}

.drop-item {
    display: inline-block;
    background: #1c2637;
    border: 1px solid #31415d;
    padding: 3px 9px;
    margin: 2px;
    border-radius: 10px;
    color: #eaf0ff;
    font-size: 12px;
    transition: all 0.15s;
}

.drop-item:hover {
    background: #263248;
    border-color: #7db0ff;
}

/* === 搜索高亮 === */
.highlight {
    background-color: #ffd66b;
    color: #1b2230;
    font-weight: bold;
    padding: 1px 3px;
    border-radius: 3px;
}

/* === 加载中文字 === */
.table-wrap td[colspan] {
    color: #9cb0d3;
}

/* === 广告弹窗 === */
.ad-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background: #161d29;
    border: 1px solid #31415d;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    overflow: hidden;
    transform: translateX(120%);
    transition: all 0.3s ease;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    visibility: hidden;
    opacity: 0;
}

.ad-popup.show {
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
}

.ad-popup-header {
    background: #1e2a3d;
    color: #eef4ff;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 16px;
    border-bottom: 1px solid #31415d;
}

.ad-popup-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #eef4ff;
}

.ad-popup-close {
    background: none;
    border: none;
    color: #9cb0d3;
    font-size: 22px;
    cursor: pointer;
    padding: 0;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.15s;
}

.ad-popup-close:hover {
    background: #31415d;
    color: #fff;
}

.ad-popup-content {
    padding: 16px;
    background: #161d29;
    max-height: 60vh;
    overflow-y: auto;
}

.ad-popup-item {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #31415d;
    border-radius: 8px;
    background: #111822;
    transition: all 0.2s;
}

.ad-popup-item:hover {
    border-color: #7db0ff;
    box-shadow: 0 0 0 1px rgba(125, 176, 255, 0.2);
}

.ad-popup-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #eaf0ff;
    margin-bottom: 5px;
}

.ad-popup-item-desc {
    font-size: 12px;
    color: #9cb0d3;
    margin-bottom: 8px;
    line-height: 1.5;
}

.ad-popup-item-link {
    display: inline-block;
    background: #1e2a3d;
    color: #8fc2ff;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    border: 1px solid #31415d;
    transition: all 0.2s;
}

.ad-popup-item-link:hover {
    background: #263248;
    border-color: #7db0ff;
    color: #b3d5ff;
}
