/* JustForVibes — "Bedrock" direction (blocky/pixel theme). Dark by default;
   toggle adds .light to <body class="page">. See website/Home.dc.html and
   Player.dc.html for the original design spec this was implemented from. */

*  { box-sizing: border-box; }

.page {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--body);
    line-height: 1.5;
    --gold: #ffce54;
    --silver: #c7ccd4;
    --bronze: #d6914a;
    --bg: #0f140f;
    --panel: #19211a;
    --panel2: #121a13;
    --text: #e3ecdf;
    --muted: #8a9a86;
    --accent: #73c548;
    --accent2: #3f7d2c;
    --border: #2a3622;
    --head: 'Press Start 2P', monospace;
    --body: 'Outfit', sans-serif;
    --radius: 0px;
}
.page.light {
    --bg: #e7e3d2;
    --panel: #f5f2e6;
    --panel2: #ece8d6;
    --text: #222a1d;
    --muted: #6c7460;
    --accent: #3f8f2e;
    --accent2: #2e6f20;
    --border: #cdc6aa;
}

a { color: inherit; }

/* --- Hero / header --- */
.hero, .phero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 22px 26px;
    border-bottom: 4px solid var(--accent);
}
.phero { display: block; }
.hbrand { display: flex; align-items: center; gap: 14px; }
.logo {
    width: 44px; height: 44px;
    border-radius: var(--radius);
    background: linear-gradient(160deg, var(--accent), var(--accent2));
    box-shadow: inset -5px -5px 0 rgba(0, 0, 0, .32);
    flex: 0 0 auto;
}
.brand { font-family: var(--head); font-size: 15px; font-weight: 700; line-height: 1; }
.tag { color: var(--muted); font-size: 13px; margin-top: 6px; }
.vbadge {
    font-family: var(--head);
    font-size: 9px;
    color: var(--accent);
    border: 1px solid var(--border);
    padding: 5px 9px;
    border-radius: 0;
    align-self: center;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.hright { display: flex; align-items: center; gap: 10px; }
.ip {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--head);
    font-size: 11px;
    background: var(--panel2);
    border: 1px solid var(--border);
    padding: 7px 7px 7px 14px;
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
}
.join {
    background: var(--accent);
    color: #08140a;
    font-weight: 800;
    font-family: var(--body);
    padding: 6px 13px;
    border-radius: calc(var(--radius) - 2px);
}
.toggle {
    font-family: var(--body);
    font-weight: 700;
    font-size: 13px;
    background: var(--panel2);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 9px 14px;
    border-radius: var(--radius);
    cursor: pointer;
}

/* --- Layout grids --- */
.grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 18px;
    padding: 22px 26px 28px;
    max-width: 1080px;
    margin: 0 auto;
}
@media (max-width: 760px) {
    .grid { grid-template-columns: 1fr; }
}

.pwrap { padding: 22px 26px 28px; max-width: 1080px; margin: 0 auto; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 760px) {
    .kpis { grid-template-columns: repeat(2, 1fr); }
}

/* --- Panels --- */
.panel {
    background: var(--panel);
    border: 3px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 5px 5px 0 rgba(0, 0, 0, .22);
    padding: 18px;
}
.ph {
    font-family: var(--head);
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
}
.cnt {
    background: var(--accent);
    color: #08140a;
    border-radius: 0;
    padding: 1px 9px;
    font-size: 12px;
    font-weight: 800;
    font-family: var(--body);
}
.empty { color: var(--muted); font-style: italic; }

.banner-error {
    max-width: 1080px;
    margin: 1rem auto 0;
    padding: .7rem 1rem;
    background: #3a2326;
    border: 1px solid #6b2f35;
    color: #f3c0c4;
    border-radius: var(--radius);
    text-align: center;
}

/* --- Online list (home, left panel) --- */
.orow { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-top: 1px solid var(--border); }
.orow:first-child { border-top: 0; }
.oname { font-weight: 700; font-size: 14px; text-decoration: none; color: var(--text); }
.oname:hover { color: var(--accent); }
.omini { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.pulse { width: 8px; height: 8px; border-radius: 0; background: var(--accent); flex: 0 0 auto; animation: pl 1.8s infinite; }
@keyframes pl {
    0%   { box-shadow: 0 0 0 0 var(--accent); }
    70%  { box-shadow: 0 0 0 7px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

/* --- Avatars --- */
.av, .pav, .bigav {
    display: flex; align-items: center; justify-content: center;
    color: #10140c;
    font-weight: 800;
    border-radius: var(--radius);
    flex: 0 0 auto;
    font-family: var(--body);
    box-shadow: inset -4px -4px 0 rgba(0, 0, 0, .28);
}
.av { width: 34px; height: 34px; font-size: 13px; }
.av.sm { width: 30px; height: 30px; font-size: 12px; }
.pav { width: 50px; height: 50px; font-size: 16px; margin: 0 auto 8px; box-shadow: inset -5px -5px 0 rgba(0, 0, 0, .3); }
.pod-g .pav { width: 62px; height: 62px; font-size: 19px; }
.bigav { width: 74px; height: 74px; font-size: 26px; box-shadow: inset -6px -6px 0 rgba(0, 0, 0, .3); }

/* --- Podium (home, top 3) --- */
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; align-items: end; margin-bottom: 18px; }
.pod { position: relative; background: var(--panel2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 8px 14px; text-align: center; }
.pod-g { transform: translateY(-12px); border-color: var(--gold); }
.pname { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; color: var(--text); display: block; }
.pname:hover { color: var(--accent); }
.pval { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; margin-top: 2px; }
.prk {
    position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--silver);
    color: #15140c;
    font-weight: 800; font-size: 12px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--body);
}
.pod-g .prk { background: var(--gold); }
.pod-b .prk { background: var(--bronze); }

/* --- Tabs (metric / breakdown) --- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tab {
    font-family: var(--body);
    font-size: 12px; font-weight: 700;
    color: var(--muted);
    background: var(--panel2);
    border: 1px solid var(--border);
    padding: 6px 11px;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.tab.active { color: #08140a; background: var(--accent); border-color: var(--accent); }

/* --- Leaderboard table (home, rest of the rows) --- */
.bhead {
    display: grid; grid-template-columns: 30px 36px 1fr auto; gap: 10px;
    padding: 6px 10px;
    color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
}
.bvh { text-align: right; }
.brow {
    display: grid; grid-template-columns: 30px 36px 1fr auto; gap: 10px; align-items: center;
    padding: 9px 10px;
    border-top: 1px solid var(--border);
}
.rk { font-family: var(--head); font-size: 11px; color: var(--muted); text-align: center; }
.rk-g { color: var(--gold); } .rk-s { color: var(--silver); } .rk-b { color: var(--bronze); }
.bname { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.bname:hover { color: var(--accent); }
.ldot { width: 7px; height: 7px; border-radius: 0; background: var(--accent); display: inline-block; flex: 0 0 auto; }
.bval { font-weight: 800; font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }

/* --- Player detail header --- */
.back { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; display: inline-block; margin-bottom: 16px; }
.pid { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.pidtext { flex: 1; min-width: 0; }
.pname2 { font-family: var(--head); font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.psub { color: var(--muted); font-size: 13px; margin: 7px 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
    background: var(--panel2); border: 1px solid var(--border); color: var(--text);
    padding: 6px 11px; border-radius: 0;
}
.phero .toggle { align-self: flex-start; margin-left: auto; }

/* --- KPI tiles --- */
.ktile { background: var(--panel); border: 3px solid var(--border); border-radius: var(--radius); box-shadow: 4px 4px 0 rgba(0, 0, 0, .2); padding: 14px 16px; }
.kval { font-family: var(--head); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.klabel { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; margin-top: 8px; font-weight: 700; }

/* --- Breakdown bars (player detail tabs) --- */
.bpanel { min-height: 430px; }
.bpanel .tabpage { display: none; }
.bpanel .tabpage.active { display: block; }
.brk2 { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 30px; }
@media (max-width: 760px) {
    .brk2 { grid-template-columns: 1fr; }
}
.brow2 { display: grid; grid-template-columns: 118px 1fr 62px; align-items: center; gap: 12px; }
.srow { display: grid; grid-template-columns: 118px 1fr 92px; align-items: center; gap: 12px; }
.blab { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 9px; background: var(--panel2); border-radius: 0; overflow: hidden; border: 1px solid var(--border); }
.barfill { display: block; height: 100%; background: linear-gradient(90deg, var(--accent2), var(--accent)); }
.bnum { text-align: right; font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }
.slv { text-align: right; font-weight: 800; font-size: 13px; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.sxp { color: var(--muted); font-weight: 600; font-size: 11px; }

/* --- Footer --- */
.site-footer {
    text-align: center;
    color: var(--muted);
    font-size: .82rem;
    padding: 1.5rem 1rem 2.5rem;
    max-width: 1080px;
    margin: 0 auto;
}
.site-footer a { color: var(--accent); }
