/* style.css - 暗色主题，工业风 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0a0a0f;
    color: #e0e0e0;
    min-height: 100vh;
}

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

/* 头部 */
header {
    text-align: center;
    padding: 30px 0 20px;
    border-bottom: 1px solid #1a1a2e;
}

.header-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f7971e, #ffd200);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-top: 4px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* 状态栏 */
.status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    background: #111118;
    border-radius: 12px;
    margin: 16px 0 24px;
    border: 1px solid #1a1a2e;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.status-dot.online { background: #4ade80; box-shadow: 0 0 10px #4ade8066; }
.status-dot.offline { background: #f87171; box-shadow: 0 0 10px #f8717166; }
.status-dot.checking { background: #fbbf24; animation: pulse 1s infinite; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.player-count {
    color: #888;
    margin-left: auto;
}
.player-count strong { color: #e0e0e0; }

/* 搜索区 */
.search-section {
    margin-bottom: 24px;
}

.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.search-box input {
    flex: 1;
    padding: 14px 18px;
    background: #111118;
    border: 1px solid #2a2a3e;
    border-radius: 10px;
    color: #e0e0e0;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #f7971e;
}

.search-box input::placeholder {
    color: #444;
}

.search-box button {
    padding: 14px 32px;
    background: linear-gradient(135deg, #f7971e, #ffd200);
    border: none;
    border-radius: 10px;
    color: #0a0a0f;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.search-box button:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px #f7971e44;
}

.quick-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-links button {
    padding: 8px 18px;
    background: #1a1a2e;
    border: 1px solid #2a2a3e;
    border-radius: 8px;
    color: #aaa;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.quick-links button:hover {
    background: #2a2a3e;
    color: #fff;
    border-color: #f7971e;
}

/* 结果区 */
.result-section {
    min-height: 200px;
}

/* 玩家卡片 */
.player-card {
    background: #111118;
    border: 1px solid #1a1a2e;
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 16px;
    animation: fadeUp 0.4s ease;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.player-card .name {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.player-card .uuid {
    font-size: 0.75rem;
    color: #555;
    font-family: monospace;
}

.player-card .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.player-card .stat-item {
    background: #0a0a12;
    padding: 12px 16px;
    border-radius: 10px;
}

.player-card .stat-item .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 1px;
}

.player-card .stat-item .value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin-top: 2px;
}

.player-card .stat-item .value.kd { color: #f7971e; }
.player-card .stat-item .value.kills { color: #f87171; }
.player-card .stat-item .value.deaths { color: #6b7280; }
.player-card .stat-item .value.time { color: #60a5fa; }

/* 排行榜 */
.leaderboard {
    background: #111118;
    border: 1px solid #1a1a2e;
    border-radius: 16px;
    overflow: hidden;
}

.leaderboard .lb-header {
    display: grid;
    grid-template-columns: 50px 1fr 80px 80px 100px;
    padding: 14px 20px;
    background: #0a0a12;
    color: #666;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #1a1a2e;
}

.leaderboard .lb-row {
    display: grid;
    grid-template-columns: 50px 1fr 80px 80px 100px;
    padding: 12px 20px;
    border-bottom: 1px solid #0a0a12;
    align-items: center;
    transition: background 0.2s;
}

.leaderboard .lb-row:hover {
    background: #1a1a2e;
}

.leaderboard .lb-rank {
    font-weight: 700;
    color: #555;
}
.leaderboard .lb-rank.gold { color: #ffd700; }
.leaderboard .lb-rank.silver { color: #c0c0c0; }
.leaderboard .lb-rank.bronze { color: #cd7f32; }

.leaderboard .lb-name {
    font-weight: 600;
    color: #fff;
}

.leaderboard .lb-value {
    text-align: center;
}

.lb-title {
    padding: 16px 20px 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}
.lb-title span { color: #f7971e; }

/* 加载状态 */
.loading {
    text-align: center;
    padding: 60px 0;
    color: #666;
}
.loading .spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #1a1a2e;
    border-top-color: #f7971e;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-result {
    text-align: center;
    padding: 60px 0;
    color: #555;
}
.no-result .icon { font-size: 3rem; margin-bottom: 12px; }

/* 错误信息 */
.error-msg {
    background: #1a0a0a;
    border: 1px solid #3a1a1a;
    color: #f87171;
    padding: 16px 20px;
    border-radius: 10px;
    text-align: center;
}

/* 底部 */
footer {
    text-align: center;
    padding: 30px 0 20px;
    border-top: 1px solid #1a1a2e;
    color: #333;
    font-size: 0.75rem;
    margin-top: 20px;
}

footer a {
    color: #555;
    text-decoration: none;
}
footer a:hover { color: #888; }

/* 响应式 */
@media (max-width: 640px) {
    .search-box { flex-direction: column; }
    .search-box button { padding: 12px; }
    .player-card .stats-grid { grid-template-columns: 1fr 1fr; }
    .player-card { padding: 16px; }
    .leaderboard .lb-header,
    .leaderboard .lb-row {
        grid-template-columns: 30px 1fr 50px 50px 60px;
        font-size: 0.75rem;
        padding: 10px 12px;
    }
    .header-content h1 { font-size: 1.8rem; }
    .status-bar { font-size: 0.75rem; padding: 10px 14px; }
}