/* --- 1. 全局设置 --- */
:root {
    --primary: #8e44ad;
    --danger: #ff4757;
    --success: #2ecc71;
    --dark-glass: rgba(0, 0, 0, 0.4);
    --border-glass: rgba(255, 255, 255, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Noto Sans SC', sans-serif;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    background: #1a1a1a;
}

/* --- 2. 动态背景 (与主页统一) --- */
.bg-gradient {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    z-index: -2;
    filter: brightness(0.6); /* 稍微暗一点，突出文字 */
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- 3. 主容器 --- */
.container {
    width: 95%;
    max-width: 1300px;
    margin: 40px auto 80px; /* 底部留出 footer 空间 */
    background: rgba(25, 25, 25, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    height: 85vh; /* 固定高度以便内部滚动 */
}

/* --- 4. 头部 --- */
header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 20px;
}

.header-icon i {
    font-size: 3rem;
    color: var(--danger);
    text-shadow: 0 0 20px rgba(255, 71, 87, 0.6);
}

header h1 {
    font-size: 2rem;
    margin: 10px 0;
    letter-spacing: 2px;
}

header p { color: rgba(255,255,255,0.6); font-size: 0.9rem; }

/* --- 5. 操作栏 (搜索+统计) --- */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    position: relative;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.5);
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border-radius: 50px;
    border: 1px solid var(--border-glass);
    background: rgba(0,0,0,0.3);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.search-box input:focus {
    background: rgba(0,0,0,0.5);
    border-color: var(--danger);
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.2);
}

.stats-box {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.1);
    padding: 8px 15px;
    border-radius: 12px;
}

/* --- 6. 表格区域 --- */
.table-wrapper {
    flex: 1;
    overflow-y: auto;
    border-radius: 12px;
    background: rgba(0,0,0,0.2);
    position: relative;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    position: sticky;
    top: 0;
    background: rgba(44, 62, 80, 0.9);
    backdrop-filter: blur(5px);
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    color: #ddd;
    z-index: 10;
    border-bottom: 2px solid var(--danger);
}

tbody tr {
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

tbody tr:hover { background: rgba(255,255,255,0.08); }

td {
    padding: 15px;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.9);
    vertical-align: middle;
}

/* 特殊列样式 */
.steamid-col {
    font-family: monospace;
    color: #a29bfe;
    cursor: pointer;
    position: relative;
}
.steamid-col:hover { color: #fff; text-decoration: underline; }

.reason-col { color: #ff7675; font-weight: 500; }

.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
}
.badge-perm { background: rgba(231, 76, 60, 0.2); color: #ff6b6b; border: 1px solid #ff6b6b; }
.badge-temp { background: rgba(241, 196, 15, 0.2); color: #f1c40f; border: 1px solid #f1c40f; }

/* 滚动条美化 */
.table-wrapper::-webkit-scrollbar { width: 8px; }
.table-wrapper::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
.table-wrapper::-webkit-scrollbar-thumb { background: var(--danger); border-radius: 4px; }

/* --- 7. 无结果提示 & 底部 & Toast --- */
.no-result {
    text-align: center;
    padding: 50px;
    color: rgba(255,255,255,0.4);
}
.no-result i { font-size: 3rem; display: block; margin-bottom: 10px; }

footer {
    position: fixed; bottom: 0; width: 100%;
    text-align: center; padding: 15px;
    font-size: 0.8rem; color: rgba(255,255,255,0.4);
    pointer-events: none; /* 让点击穿透到底部背景 */
}

.footer-buttons { margin-top: 15px; }
.back-btn {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: 0.3s;
}
.back-btn:hover { color: white; transform: translateX(-5px); }

.toast {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    background: rgba(46, 204, 113, 0.9); color: white;
    padding: 10px 20px; border-radius: 50px;
    font-weight: bold; opacity: 0; transition: opacity 0.3s;
    pointer-events: none; z-index: 2000;
}
.toast.show { opacity: 1; }

/* --- 8. 移动端卡片式布局 (重点优化) --- */
@media (max-width: 768px) {
    .container {
        width: 100%; height: 100%; margin: 0; border-radius: 0;
        padding: 15px;
    }
    
    thead { display: none; /* 隐藏表头 */ }

    tbody tr {
        display: block;
        background: rgba(255,255,255,0.05);
        margin-bottom: 15px;
        border-radius: 12px;
        padding: 15px;
        border: 1px solid rgba(255,255,255,0.05);
    }

    td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        font-size: 0.9rem;
    }
    
    td:last-child { border-bottom: none; }

    /* 通过 data-label 属性显示标题 */
    td::before {
        content: attr(data-label);
        font-weight: bold;
        color: rgba(255,255,255,0.5);
        margin-right: 15px;
    }
    
    .reason-col { text-align: right; max-width: 60%; }
}