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

body {
    font-family: system-ui, sans-serif;
    background: #0f0f0f;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header { background: #161616; border-bottom: 1px solid #262626; }

.scrape-banner {
    background: repeating-linear-gradient(45deg, #b8912e, #b8912e 12px, #a37f1f 12px, #a37f1f 24px);
    color: #0f0f0f;
    text-align: center;
    padding: 0.75rem 1rem;
    font-weight: 700;
}
.scrape-progress {
    background: rgba(15, 15, 15, 0.25);
    border-radius: 999px;
    height: 0.5rem;
    max-width: 30rem;
    margin: 0.5rem auto;
    overflow: hidden;
}
.scrape-progress-fill {
    background: #0f0f0f;
    height: 100%;
}
.site-header nav {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.site-header .brand { font-weight: 700; color: #fff; text-decoration: none; font-size: 1.1rem; }
.site-header a:not(.btn) { color: #aaa; text-decoration: none; }
.site-header a:not(.btn):hover { color: #fff; }
.site-header .btn { margin-left: auto; padding: 0.5rem 1rem; font-size: 0.875rem; }

.container { margin: 0 auto; padding: 2rem; width: 100%; flex: 1; }
.back-link { display: inline-block; margin-bottom: 1rem; color: #aaa; text-decoration: none; }
.back-link:hover { color: #fff; }
body.index .container { max-width: 800px; }
body.link .container { max-width: 600px; }
body.stats .container { max-width: 1000px; }
body.user .container { max-width: 1000px; }
body.channel .container { max-width: 1000px; }
body.leaderboard .container { max-width: 1000px; }
body.search .container { max-width: 700px; }

.search { display: flex; gap: 0.5rem; }
.search input {
    flex: 1;
    padding: 0.6rem 1rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
}
.search input:focus { outline: none; border-color: #f472b6; }
.search button {
    padding: 0.5rem 1rem;
    background: #f472b6;
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.search button:hover { background: #ec4899; }

.site-footer { border-top: 1px solid #262626; padding: 1.5rem; text-align: center; }
.site-footer p { margin: 0; font-size: 0.875rem; }

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
body.link h1,
body.stats h1 { font-size: 2rem; }

p { color: #888; line-height: 1.6; margin-bottom: 1.5rem; }

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #f472b6;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}
.btn:hover { background: #ec4899; }
.btn:disabled { background: #444; cursor: not-allowed; }

.links { display: flex; gap: 1rem; margin-top: 2rem; }

.card { background: #1a1a1a; border-radius: 12px; padding: 1.5rem; margin-bottom: 1rem; }
.card h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.connected { color: #22c55e; }
.status { margin-top: 0.5rem; font-size: 0.875rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat { background: #1a1a1a; border-radius: 12px; padding: 1.5rem; }
.stat h3 { color: #888; font-size: 0.875rem; text-transform: uppercase; margin-bottom: 0.5rem; }
.stat .value { font-size: 2rem; font-weight: 700; }
.stat .value.pink { color: #f472b6; }

table { width: 100%; border-collapse: collapse; background: #1a1a1a; border-radius: 12px; overflow: hidden; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid #333; }
th { color: #888; font-size: 0.875rem; text-transform: uppercase; }
tr:last-child td { border-bottom: none; }
table a { color: #f472b6; text-decoration: none; }
table a:hover { text-decoration: underline; }

.live { display: inline-block; width: 8px; height: 8px; background: #22c55e; border-radius: 50%; margin-right: 0.5rem; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.tables-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 2rem; }
@media (max-width: 700px) { .tables-grid { grid-template-columns: 1fr; } }
.table-card { background: #1a1a1a; border-radius: 12px; padding: 1rem 1.5rem; }
.table-card h2 { font-size: 1.25rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.empty { text-align: center; color: #666; }
