/* ---------- Theme ---------- */
:root {
    color-scheme: dark;
    --background: #07191c;
    --surface: #102b30;
    --surface-hover: #173a40;
    --accent: #5eead4;
    --text: #edf8f7;
    --muted: #a9c3c5;
    --border: rgba(169, 195, 197, 0.2);
    --radius: 16px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    padding: clamp(20px, 5vw, 64px);
    background:
        radial-gradient(
            ellipse at top,
            #13434a 0%,
            var(--background) 65%
        ) fixed !important;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

body > * {
    max-width: 1200px;
    margin-inline: auto;
}

::selection {
    background: var(--accent);
    color: var(--background);
}

/* ---------- Headings ---------- */
h1 {
    margin-block: 12px 24px;
    color: var(--text);
    font-size: clamp(2.25rem, 7vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.1;
    text-wrap: balance;
}

h1::after {
    content: "";
    display: block;
    width: 72px;
    height: 4px;
    margin: 24px auto 0;
    border-radius: 999px;
    background: var(--accent);
}

h2 {
    margin-block: 40px 18px;
    color: var(--accent);
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    line-height: 1.3;
}

/* ---------- Text ---------- */
p {
    margin-block: 20px;
    color: var(--muted);
}

body > p:first-of-type {
    margin-bottom: 36px;
    text-align: center;
    font-size: 1.05rem;
}

p em {
    display: block;
    margin-top: 42px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 1.15rem;
    font-style: normal;
    font-weight: 700;
}

/* ---------- Category List ---------- */
ul {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0;
    list-style: none;
}

li {
    padding: 9px 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
}

/* ---------- Images and Videos ---------- */
/* Works with the direct media elements in your HTML. */
body > img,
body > video {
    display: inline-block;
    width: calc(25% - 16px);
    max-width: 360px;
    margin: 0 12px 20px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    vertical-align: top;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

body > img {
    height: auto;
    aspect-ratio: 5 / 7;
    object-fit: cover;
}

body > video {
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #030a0c;
}

video:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

/* ---------- Statistics Table ---------- */
table {
    width: 100%;
    margin-block: 40px;
    border: 1px solid var(--border);
    border-spacing: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    text-align: left;
}

thead {
    background: #194149;
}

th,
td {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

th {
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

td {
    color: var(--muted);
}

td:first-child {
    color: var(--text);
    font-weight: 600;
}

tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.025);
}

tbody tr:last-child td {
    border-bottom: 0;
}

/* ---------- Pointer Interactions ---------- */
@media (hover: hover) {
    li:hover,
    tbody tr:hover {
        background: var(--surface-hover);
    }
}

/* ---------- Tablet ---------- */
@media (max-width: 1000px) {
    body > img,
    body > video {
        width: calc(33.333% - 16px);
    }
}

@media (max-width: 720px) {
    body {
        padding: 24px 18px;
    }

    body > img,
    body > video {
        width: calc(50% - 12px);
        margin-right: 8px;
    }

    th,
    td {
        padding: 12px 10px;
        font-size: 0.8rem;
    }

    th {
        letter-spacing: 0;
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 440px) {
    body > img,
    body > video {
        display: block;
        width: 100%;
        max-width: 100%;
        margin-inline: auto;
    }

    ul {
        gap: 8px;
    }

    li {
        padding: 7px 13px;
        font-size: 0.8rem;
    }

    table {
        display: block;
        overflow-x: auto;
    }
}