/* ===== 全局重置 & 基础 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 20px 40px;
}

/* ===== 导航栏 ===== */
.navbar {
    background: #1a1a2e;
    color: #fff;
    border-radius: 8px;
    padding: 0 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.navbar .brand {
    font-size: 1.3rem;
    font-weight: 700;
    padding: 14px 0;
    color: #fff;
    text-decoration: none;
}
.navbar .nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.navbar .nav-links a {
    color: #ccc;
    text-decoration: none;
    padding: 14px 18px;
    border-radius: 6px 6px 0 0;
    transition: background 0.2s, color 0.2s;
    font-weight: 500;
    display: inline-block;
}
.navbar .nav-links a:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.navbar .nav-links a.active {
    background: #fff;
    color: #1a1a2e;
}

/* ===== 页面容器（切换显示） ===== */
.page {
    display: none;
}
.page.active {
    display: block;
}

/* ===== 原有样式（保持不变） ===== */
/* 头部 */
header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}
header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}
header p {
    font-size: 0.9rem;
    color: #666;
}

/* 总体状态 */
.status-overview {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 40px 30px;
    text-align: center;
    margin-bottom: 30px;
}
.status-overview h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #28a745;
    margin-bottom: 10px;
}
.status-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: #28a745;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

/* 通用区块 */
.section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px 30px;
    margin-bottom: 20px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}
.section-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
}
.section-header .controls {
    display: flex;
    gap: 15px;
    align-items: center;
}
.section-header .controls label {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

/* 服务列表 */
.service-list {
    list-style: none;
}
.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f5f5f5;
}
.service-item:last-child {
    border-bottom: none;
}
.service-name {
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}
.service-status {
    font-size: 0.85rem;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}
.status-operational {
    color: #28a745;
}

/* 服务器信息 */
.server-info {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px 30px;
    margin-bottom: 20px;
}
.server-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}
.info-item {
    padding: 10px 0;
}
.info-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.info-value {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

/* 监控卡片 */
.monitor-card {
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 8px;
    padding: 25px 30px;
    margin-bottom: 20px;
}
.monitor-card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}
.monitor-card p {
    margin: 8px 0;
}
.value {
    font-weight: bold;
    color: #2a7;
}
.monitor-card small {
    display: block;
    margin-top: 12px;
    color: #888;
    font-size: 0.85rem;
}

/* 查询模块通用样式 */
.lookup-form {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}
.lookup-form input {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}
.lookup-form button {
    padding: 8px 20px;
    background: #0070f3;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.lookup-form button:hover {
    background: #005bb5;
}
.lookup-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.lookup-form label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
}
.lookup-form input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.lookup-result {
    padding: 12px 0;
    min-height: 50px;
}
.lookup-result .hint {
    color: #999;
    font-size: 0.9rem;
}
.lookup-result .error {
    color: #dc3545;
}
.lookup-result .success {
    color: #28a745;
}

/* UUID 显示框 + 复制按钮 */
.uuid-display {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    margin-top: 8px;
    flex-wrap: wrap;
}
.uuid-display code {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    word-break: break-all;
    flex: 1;
}
.copy-btn {
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}
.copy-btn:hover {
    background: #5a6268;
}
.copy-btn.copied {
    background: #28a745;
}

/* 玩家列表表格 */
.table-wrapper {
    overflow-x: auto;
    margin-top: 8px;
}
#playerTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
#playerTable th,
#playerTable td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}
#playerTable th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #ddd;
}
#playerTable tr:hover {
    background-color: #f5f7fa;
}
#playerTable .status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}
#playerTable .status-online {
    background: #d4edda;
    color: #155724;
}
#playerTable .status-offline {
    background: #f8d7da;
    color: #721c24;
}
#playerTable .status-banned {
    background: #fff3cd;
    color: #856404;
}
.detail-btn {
    padding: 4px 12px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s;
}
.detail-btn:hover {
    background: #218838;
}
.detail-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.uuid-col {
    display: none; /* 默认隐藏 */
}
.uuid-col.visible {
    display: table-cell;
}
.loading-tip {
    padding: 30px 0;
    text-align: center;
    color: #888;
}

/* 详情展示区 */
.player-detail {
    margin-top: 20px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    display: none;
}
.player-detail.visible {
    display: block;
}
.player-detail .detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}
.player-detail .detail-item {
    padding: 4px 0;
}
.player-detail .detail-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
}
.player-detail .detail-value {
    font-weight: 600;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 30px 20px 10px;
    color: #999;
    font-size: 0.85rem;
}

/* 响应式 */
@media (max-width: 600px) {
    .container {
        padding: 15px 15px 30px;
    }
    .navbar {
        flex-direction: column;
        align-items: stretch;
        padding: 0 10px;
    }
    .navbar .brand {
        text-align: center;
        padding: 12px 0 4px;
    }
    .navbar .nav-links {
        justify-content: center;
        padding-bottom: 6px;
    }
    .navbar .nav-links a {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    .status-overview {
        padding: 30px 20px;
    }
    .section,
    .server-info,
    .monitor-card {
        padding: 20px;
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
    header h1 {
        font-size: 1.6rem;
    }
    .lookup-form {
        flex-direction: column;
        align-items: stretch;
    }
    .lookup-form input {
        min-width: auto;
    }
    .uuid-display {
        flex-direction: column;
        align-items: stretch;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}