* { box-sizing: border-box; margin: 0; padding: 0; }
body { min-height: 100vh; background: #0b0d10; color: #e5e7eb; font-family: "Inter", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
input { font: inherit; color: inherit; }

.bg { position: fixed; inset: 0; z-index: -1; background: #0b0d10; }
.bg div { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transition: opacity 1.5s ease-in-out; }
.bg div.on { opacity: 1; }
.bg::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); }

.lb-page { max-width: 880px; margin: 0 auto; padding: 48px 24px 64px; }
.lb-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.lb-head h1 { font-size: 36px; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.lb-head h1, .lb-head p { text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); }
.lb-head p { margin-top: 6px; max-width: 560px; font-size: 16px; line-height: 24px; color: #d1d5db; }
.lb-back { display: inline-flex; align-items: center; height: 40px; padding: 0 15px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(12, 12, 14, 0.75); color: #fff; font-size: 15px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .15s ease, border-color .15s ease; }
.lb-back:hover { background: #1f2024; border-color: #3a3c42; }

.lb-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.lb-tools input { width: 260px; max-width: 100%; height: 40px; padding: 0 14px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(12, 12, 14, 0.75); font-size: 15px; outline: none; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: border-color .15s ease; }
.lb-tools input:focus { border-color: #7fb5a2; }
.lb-tools input::placeholder { color: #6b7280; }
.lb-meta { font-size: 14px; color: #cbd5e1; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6); }

.lb-table { margin-top: 16px; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 12px; background: rgba(12, 12, 14, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7); overflow: hidden; }
.lb-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px 130px; align-items: center; gap: 16px; padding: 12px 20px; border-top: 1px solid rgba(255, 255, 255, 0.05); transition: background .15s ease; }
.lb-th { border-top: 0; padding-top: 14px; padding-bottom: 14px; background: rgba(0, 0, 0, 0.3); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #6b7280; }
a.lb-row:hover { background: rgba(255, 255, 255, 0.04); }
.num { text-align: right; }

.lb-player { display: flex; align-items: center; gap: 14px; min-width: 0; }
.lb-av { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; background: #232428; display: grid; place-items: center; font-weight: 700; color: #9ca3af; }
.lb-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.lb-av i { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: #10b981; border: 2px solid #111214; }
.lb-names { display: flex; flex-direction: column; min-width: 0; }
.lb-names b { font-size: 16px; font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-names small { font-size: 13px; color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-points { font: 700 17px "JetBrains Mono", ui-monospace, Consolas, monospace; color: #10b981; }
.lb-time { font: 500 15px "JetBrains Mono", ui-monospace, Consolas, monospace; color: #9ca3af; }

.lb-row.top { --medal: #f5c518; background: linear-gradient(90deg, color-mix(in srgb, var(--medal) 10%, transparent), transparent 55%); box-shadow: inset 3px 0 0 var(--medal); }
.lb-row.top-2 { --medal: #cbd5e1; }
.lb-row.top-3 { --medal: #d08b4f; }
.lb-row.top .lb-av { box-shadow: 0 0 0 2px var(--medal), 0 0 18px -4px var(--medal); }
.lb-row.top-1 { padding-top: 16px; padding-bottom: 16px; }
.lb-row.top-1 .lb-av { width: 52px; height: 52px; }
.lb-row.top-1 .lb-names b { font-size: 18px; }

.lb-empty { padding: 48px 20px; text-align: center; color: #6b7280; font-size: 15px; }

@media (max-width: 600px) {
    .lb-page { padding: 32px 14px 48px; }
    .lb-head h1 { font-size: 30px; }
    .lb-row { grid-template-columns: minmax(0, 1fr) 84px 74px; gap: 10px; padding: 10px 12px; }
    .lb-av { width: 38px; height: 38px; }
    .lb-player { gap: 10px; }
    .lb-points { font-size: 15px; }
    .lb-time { font-size: 13px; }
}
