/* Shared styles for the content pages (/about, /faq, /stats).
   Same visual language as help.html: dark background, Minecraft font, green accent. */

*, *::before, *::after { box-sizing: border-box; }

@font-face {
    font-family: Minecraft;
    src: url("/assets/fonts/Minecraft.ttf");
    font-display: swap;
}

body {
    min-height: 100vh;
    margin: 0;
    background-color: #171819;
    color: #f0f0f0;
    font-family: 'Minecraft', monospace, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

a { color: #4ade80; }
a:hover { color: #86efac; }

.page {
    max-width: 860px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: center;
    font-size: 0.85rem;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 28px;
}

.nav a { text-decoration: none; }
.nav a[aria-current="page"] { color: #fff; }
.nav__spacer { flex: 1; }

h1 {
    font-size: clamp(1.4rem, 4vw, 2rem);
    color: #4ade80;
    margin: 0 0 8px;
}

.subtitle {
    color: #aaa;
    font-size: 0.9rem;
    margin: 0 0 32px;
}

h2 {
    font-size: 1.1rem;
    color: #4ade80;
    margin: 36px 0 12px;
    border-bottom: 1px solid rgba(74, 222, 128, 0.2);
    padding-bottom: 6px;
    scroll-margin-top: 20px;
}

h3 {
    font-size: 0.98rem;
    color: #fff;
    margin: 22px 0 6px;
}

p { margin: 0 0 14px; }
ul, ol { margin: 0 0 14px; padding-left: 22px; }
li { margin-bottom: 6px; }
strong { color: #fff; }

code {
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}

/* Live numbers */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 0 0 28px;
}

.stat {
    background: rgba(255, 255, 255, 0.04);
    border-left: 3px solid #4ade80;
    border-radius: 8px;
    padding: 14px 16px;
}

.stat__num {
    display: block;
    font-size: 1.5rem;
    color: #fff;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.stat__label {
    display: block;
    font-size: 0.78rem;
    color: #aaa;
    margin-top: 4px;
}

/* Tables */
.table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    margin: 0 0 24px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

caption {
    text-align: left;
    padding: 12px 14px 0;
    color: #aaa;
    font-size: 0.8rem;
}

th, td {
    text-align: left;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    white-space: nowrap;
}

thead th {
    color: #aaa;
    font-size: 0.75rem;
    font-weight: normal;
}

tbody tr:last-child td { border-bottom: none; }
td.num { text-align: right; font-variant-numeric: tabular-nums; color: #fff; }
td.rank { color: #4ade80; width: 1%; }

/* Daily activity chart */
.chart {
    width: 100%;
    height: auto;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 8px;
}

.chart-note { font-size: 0.78rem; color: #888; margin-bottom: 24px; }

/* FAQ */
.faq-item {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 10px;
}

.faq-item h2 {
    font-size: 0.98rem;
    color: #fff;
    border: none;
    margin: 0 0 6px;
    padding: 0;
}

.faq-item p:last-child { margin-bottom: 0; }

/* Steps, download buttons and notices — used by /help */
.tip {
    background: rgba(250, 204, 21, 0.08);
    border-left: 3px solid #facc15;
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    font-size: 0.88rem;
    color: #facc15;
    margin: 6px 0;
}

.steps { list-style: none; padding: 0; margin: 0; counter-reset: steps; }

.step {
    counter-increment: steps;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 14px 16px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    border-left: 3px solid #4ade80;
}

.step::before {
    content: counter(steps);
    background: #4ade80;
    color: #000;
    font-weight: bold;
    font-size: 14px;
    min-width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.step-content { flex: 1; }
.step-label { font-size: 1rem; font-weight: bold; color: #fff; margin-bottom: 4px; }
.step-desc { font-size: 0.88rem; color: #bbb; }

.dl-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dl-buttons + .step-desc, .dl-version + .step-desc { margin-top: 10px; }
.dl-version { color: #4ade80; }

.dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #4ade80;
    color: #000;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: bold;
    transition: background 0.15s;
}

.dl-btn:hover { background: #22c55e; color: #000; }
.dl-btn.secondary { background: rgba(255, 255, 255, 0.1); color: #fff; }
.dl-btn.secondary:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }

.disclaimer {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 16px 18px;
    font-size: 0.85rem;
    color: #aaa;
    margin-top: 32px;
}

.disclaimer strong { color: #f0f0f0; }

.updated { font-size: 0.78rem; color: #888; }

.footer {
    margin-top: 44px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
    color: #888;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}

.footer a { text-decoration: none; }

.back-link {
    display: inline-block;
    margin-top: 28px;
    color: #4ade80;
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover { text-decoration: underline; }

@media (max-width: 560px) {
    .page { padding: 24px 16px 48px; }
    body { font-size: 15px; }
}

/* Period selector for the activity chart — same look as the .dl-btn buttons
   used on /help, with the site's own font stack (buttons don't inherit it). */
.range {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.range__label {
    font-family: 'Minecraft', 'Trebuchet MS', Arial, sans-serif;
    font-size: 0.85rem;
    color: #aaa;
}

.range__custom {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 4px;
}

.range-btn {
    font-family: 'Minecraft', 'Trebuchet MS', Arial, sans-serif;
    font-size: 0.85rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    cursor: pointer;
    transition: background 0.15s;
}

.range-btn:hover { background: rgba(255, 255, 255, 0.18); }

.range-btn.is-active { background: #4ade80; color: #000; }
.range-btn.is-active:hover { background: #22c55e; }

.range input[type="number"] {
    font-family: 'Minecraft', 'Trebuchet MS', Arial, sans-serif;
    font-size: 0.85rem;
    width: 76px;
    padding: 6px 10px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
}

.range input[type="number"]:focus-visible { outline: 2px solid #4ade80; outline-offset: 1px; }

/* The nav on the content pages uses the same font stack for the same reason. */
.nav, .footer, .chart-note, .subtitle, caption, th {
    font-family: 'Minecraft', 'Trebuchet MS', Arial, sans-serif;
}

/* Language switch in the nav */
.nav__lang {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 0.8rem;
}

/* Podium: top 3 contributors with their full skin */
.podium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    align-items: end;
    margin: 0 0 22px;
}

.podium__item {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.podium__skin {
    width: auto;
    height: 150px;
    max-width: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5));
}

.podium__item--1 .podium__skin { height: 190px; }

.podium__info {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-top: 3px solid var(--medal, #cd7f32);
    border-radius: 6px 6px 0 0;
    padding: 10px 8px 14px;
    display: grid;
    gap: 2px;
    line-height: 1.25;
}

.podium__item--1 .podium__info { --medal: #facc15; padding-bottom: 34px; }
.podium__item--2 .podium__info { --medal: #cbd5e1; padding-bottom: 24px; }
.podium__item--3 .podium__info { --medal: #cd7f32; }

.podium__rank {
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--medal, #cd7f32);
}

.podium__name {
    color: #fff;
    font-size: 0.92rem;
    overflow-wrap: anywhere;
}

.podium__chunks {
    color: #4ade80;
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
}

.podium__share { color: #888; font-size: 0.75rem; }

/* Player heads in the leaderboard */
td.player {
    display: flex;
    align-items: center;
    gap: 8px;
}

.head {
    width: 24px;
    height: 24px;
    image-rendering: pixelated;
    flex-shrink: 0;
}

@media (max-width: 560px) {
    .podium__skin { height: 110px; }
    .podium__item--1 .podium__skin { height: 140px; }
    .podium__name { font-size: 0.82rem; }
    .podium { gap: 6px; }
}

/* Timelapse player (/timelapse) — own controls instead of the browser's */
.tl-video { margin: 0 0 12px; }
.tl-video[hidden] { display: none; }

.tl-player {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    outline: none;
}

.tl-player:focus-visible { box-shadow: 0 0 0 2px #4ade80; }

.tl-player__video {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    image-rendering: pixelated;
}

.tl-player:fullscreen { display: flex; flex-direction: column; justify-content: center; border-radius: 0; }
.tl-player:fullscreen .tl-player__video { width: auto; height: 100%; max-height: 100vh; margin: 0 auto; }

.tl-player__big {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 84px;
    height: 84px;
    margin: -42px 0 0 -42px;
    border: none;
    border-radius: 50%;
    background: rgba(23, 24, 25, 0.8);
    color: #4ade80;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.5);
    transition: transform 0.15s, opacity 0.2s;
}

.tl-player__big svg { width: 44px; height: 44px; fill: currentColor; margin-left: 4px; }
.tl-player__big:hover { transform: scale(1.06); }
.tl-player.is-playing .tl-player__big { opacity: 0; pointer-events: none; }

.tl-player__bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 28px 12px 10px;
    background: linear-gradient(to top, rgba(23, 24, 25, 0.95), rgba(23, 24, 25, 0));
    font-family: 'Minecraft', 'Trebuchet MS', Arial, sans-serif;
    font-size: 0.8rem;
    color: #f0f0f0;
    transition: opacity 0.25s;
}

.tl-player.is-playing:not(:hover):not(:focus-within) .tl-player__bar { opacity: 0; }

.tl-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tl-btn svg { width: 20px; height: 20px; fill: currentColor; }
.tl-btn:hover { background: rgba(255, 255, 255, 0.18); }
.tl-play { background: #4ade80; color: #000; }
.tl-play:hover { background: #22c55e; }

.tl-date {
    flex-shrink: 0;
    min-width: 8.5em;
    color: #4ade80;
    font-variant-numeric: tabular-nums;
}

.tl-count { flex-shrink: 0; color: #aaa; font-variant-numeric: tabular-nums; }

.tl-seek {
    --pct: 0%;
    flex: 1;
    min-width: 60px;
    height: 6px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    border-radius: 3px;
    background: linear-gradient(to right, #4ade80 var(--pct), rgba(255, 255, 255, 0.2) var(--pct));
    cursor: pointer;
}

.tl-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background: #fff;
    border: 2px solid #4ade80;
}

.tl-seek::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: #fff;
    border: 2px solid #4ade80;
}

.tl-seek:focus-visible { outline: 2px solid #4ade80; outline-offset: 4px; }

.tl-speed { display: flex; gap: 4px; flex-shrink: 0; }

.tl-speed__btn {
    font-family: inherit;
    font-size: 0.75rem;
    border: none;
    border-radius: 6px;
    padding: 5px 7px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
}

.tl-speed__btn:hover { background: rgba(255, 255, 255, 0.18); }
.tl-speed__btn.is-active { background: #4ade80; color: #000; }

.tl-video figcaption {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #888;
    margin-top: 8px;
}

.tl-dl {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.tl-dl:hover { background: rgba(255, 255, 255, 0.18); }

@media (max-width: 560px) {
    .tl-player__bar { flex-wrap: wrap; gap: 8px; padding-top: 18px; }
    .tl-seek { order: 5; flex-basis: 100%; }
    .tl-count, .tl-speed { margin-left: auto; }
    .tl-player__big { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
    .tl-player__big svg { width: 34px; height: 34px; }
}
