body {
    position: relative;
    min-height: 100vh;
    isolation: isolate;

    font-family: 'Orbitron', sans-serif;

    background-image:
        linear-gradient(
            rgba(5, 3, 8, 0.40),
            rgba(5, 3, 8, 0.55)
        ),
        url("assets/leaderboardBG2.png");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    color: white;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;

    background: var(--page-bg);
    opacity: 0.35;

    pointer-events: none;

    transition:
        background 700ms ease,
        opacity 700ms ease;
}

:root {
    --accent: #b86cff;
    --accent-soft: rgba(184, 108, 255, 0.22);
    --accent-faint: rgba(184, 108, 255, 0.08);

    --page-bg:
        radial-gradient(circle at 50% 20%, #22132f 0%, #0b0710 55%, #030205 100%);
}

body[data-family="overall"] {
    --accent: #d6a3ff;
    --accent-soft: rgba(214, 163, 255, 0.24);
    --accent-faint: rgba(214, 163, 255, 0.08);

    --page-bg:
        radial-gradient(circle at 50% 18%, #29153a 0%, #0e0814 58%, #030204 100%);
}

body[data-family="attendance"] {
    --accent: #57d8ff;
    --accent-soft: rgba(87, 216, 255, 0.24);
    --accent-faint: rgba(87, 216, 255, 0.08);

    --page-bg:
        radial-gradient(circle at 50% 20%, #102c38 0%, #071219 58%, #020607 100%);
}

body[data-family="social"] {
    --accent: #ff70b7;
    --accent-soft: rgba(255, 112, 183, 0.24);
    --accent-faint: rgba(255, 112, 183, 0.08);

    --page-bg:
        radial-gradient(circle at 50% 18%, #3a1428 0%, #160912 58%, #050203 100%);
}

body[data-family="oral"] {
    --accent: #ff9d5c;
    --accent-soft: rgba(255, 157, 92, 0.24);
    --accent-faint: rgba(255, 157, 92, 0.08);

    --page-bg:
        radial-gradient(circle at 50% 18%, #382010 0%, #160d07 58%, #050302 100%);
}

body[data-family="paizuri"] {
    --accent: #f2a7d8;
    --accent-soft: rgba(242, 167, 216, 0.24);
    --accent-faint: rgba(242, 167, 216, 0.08);

    --page-bg:
        radial-gradient(circle at 50% 18%, #35172d 0%, #140912 58%, #050204 100%);
}

body[data-family="pregnancy"] {
    --accent: #ff5f8f;
    --accent-soft: rgba(255, 95, 143, 0.26);
    --accent-faint: rgba(255, 95, 143, 0.09);

    --page-bg:
        radial-gradient(circle at 50% 18%, #3a1020 0%, #17070d 58%, #050203 100%);
}

body[data-family="lactation"] {
    --accent: #76e5ff;
    --accent-soft: rgba(118, 229, 255, 0.24);
    --accent-faint: rgba(118, 229, 255, 0.08);

    --page-bg:
        radial-gradient(circle at 50% 18%, #102d38 0%, #071318 58%, #020607 100%);
}

#header {
    text-align: center;
    margin-top: 25px;
    margin-bottom: 40px;
}

#pageTitle {
    font-size: 42px;          /* slightly smaller to fit between dividers */
    font-weight: 900;
    letter-spacing: 6px;
    color: var(--accent);
    text-shadow:
        0 0 8px var(--accent),
        0 0 22px var(--accent-soft);
    transition:
        color 500ms ease,
        text-shadow 500ms ease;
    text-align: center;
    margin: 10px 0;
}

.divider {
    width: 60%;
    height: 3px;
    margin: 10px auto;
    background: var(--accent);
    box-shadow:
        0 0 8px var(--accent),
        0 0 20px var(--accent-soft);
    transition:
        background 500ms ease,
        box-shadow 500ms ease;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%   { box-shadow: 0 0 5px cyan, 0 0 15px cyan; }
    50%  { box-shadow: 0 0 10px cyan, 0 0 25px cyan; }
    100% { box-shadow: 0 0 5px cyan, 0 0 15px cyan; }
}
#content {
    padding: 40px 50px 0 50px;
}

.entry {
    display: grid;
    grid-template-columns: 60px 50px 200px 1fr;
    align-items: center;
    gap: 15px;
}

.player-icon {
    width: 48px;
    height: 48px;

    border-radius: 4px;

    object-fit: cover;

    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-soft);
    align-self: start;
    margin-top: 4px;
}

.rank {
    text-align: right;
}

.entry-name {
    text-align: left;
    font-size: 34px;
    font-weight: 700;
}

.earned-title {
    font-size: 11px;
    color: gold;
    letter-spacing: 2px;
    text-transform: uppercase;

    margin-top: 2px;
    margin-left: 15px;

    text-shadow: 0 0 4px gold;
}

.bar-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.entry-value {
    color: white;
    font-size: 16px;
    min-width: 70px;
    text-align: left;
}

.first-place {
    color: gold;
    text-shadow: 0 0 10px gold;
}
.bar-container {
    flex-grow: 1;
    display: flex;
    margin-left: 20px;
    height: 20px;
}

.bar-segment {
    flex: 1;
    margin: 0 1px;
    background: #222;
    border-radius: 2px;
}

.bar-filled {
    background: var(--accent);
    box-shadow:
        0 0 6px var(--accent),
        0 0 12px var(--accent-soft);
    transition:
        background 500ms ease,
        box-shadow 500ms ease;
}

#titleHolder {
    text-align: center;
    margin-top: 30px;
}

.gold-place .entry-name {
    color: gold;
    text-shadow: 0 0 8px gold;
}

.silver-place .entry-name {
    color: #d8d8d8;
    text-shadow: 0 0 8px #d8d8d8;
}

.bronze-place .entry-name {
    color: #cd7f32;
    text-shadow: 0 0 8px #cd7f32;
}

.medal {
    display: inline-block;
    width: 24px;
    text-align: center;
}

.rank-num {
    display: inline-block;
    width: 24px;
}

.earned-title.common {
    color: white;
    text-shadow: 0 0 4px white;
}

.earned-title.uncommon {
    color: #4ade80;
    text-shadow: 0 0 4px #4ade80;
}

.earned-title.rare {
    color: #60a5fa;
    text-shadow: 0 0 4px #60a5fa;
}

.earned-title.epic {
    color: #c084fc;
    text-shadow: 0 0 4px #c084fc;
}

.earned-title.legendary {
    color: gold;
    text-shadow: 0 0 6px gold;
}

.holderTitle {
    font-size: 32px;
    color: gold;
}

.holderName {
    font-size: 42px;
    color: white;
}

#ticker {
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 12px;
    background-color: #000;
    color: yellow;
    font-size: 24px;
    border-top: 2px solid cyan;
    white-space: nowrap;
    overflow: hidden;
}

#ticker-text {
    display: inline-block;
    padding-left: 100%;
    animation: scrollTicker 15s linear infinite;
}

@keyframes scrollTicker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

