:root {
    --background: #0c1120;
    --foreground: #e4eaf5;
    --muted: #161f32;
    --muted-foreground: #7a8faa;
    --card: #111827;
    --card-foreground: #e4eaf5;
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-foreground: #ffffff;
    --secondary: #1c2a42;
    --secondary-foreground: #8eaac8;
    --accent: #1c2a42;
    --accent-foreground: #ffffff;
    --border: #1e2d45;
    --ring: hsla(217, 91%, 60%, 0.5);
    --destructive: #ef4444;
    --live: #ef4444;
    --radius: 1rem;
    --radius-small: 0.375rem;
    --padding: 1rem;
    --header-height: 52px;
    --nav-height: 56px;
}

.light {
    --background: #f5f7fa;
    --foreground: #0f1318;
    --muted: #eaecf2;
    --muted-foreground: #64748b;
    --card: #ffffff;
    --card-foreground: #0f1318;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-foreground: #ffffff;
    --secondary: #dde3ef;
    --secondary-foreground: #374151;
    --accent: #dde3ef;
    --accent-foreground: #ffffff;
    --border: #dde1eb;
    --ring: hsla(221, 83%, 53%, 0.5);
    --destructive: #dc2626;
    --live: #dc2626;
}

.dark {
    --background: #090909;
    --foreground: #f5f5f5;
    --muted: #141414;
    --muted-foreground: #6b6b6b;
    --card: #101010;
    --card-foreground: #f5f5f5;
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-foreground: #ffffff;
    --secondary: #1a1a1a;
    --secondary-foreground: #a0a0a0;
    --accent: #1a1a1a;
    --accent-foreground: #ffffff;
    --border: #1e1e1e;
    --ring: hsla(217, 91%, 60%, 0.5);
    --destructive: #ef4444;
    --live: #ef4444;
}

@font-face {
    font-family: "Figtree";
    src: url('/static/Figtree-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Figtree", system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: var(--background);
    color: var(--foreground);
    scrollbar-gutter: stable;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

main {
    flex-grow: 1;
}

::selection {
    color: inherit;
    background: var(--ring);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

* {
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

/* -------------------- */

main>section,
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.muted {
    color: var(--muted-foreground);
}

.grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.live-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.live-card a {
    color: inherit;
    text-decoration: none;
    display: block;
    padding-bottom: .7rem;
}

.live-card h3,
.live-card p {
    margin: .4rem .7rem;
}

.thumb {
    height: 130px;
    background: var(--muted);
    display: grid;
    place-items: center;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-placeholder {
    color: var(--muted-foreground);
    font-weight: 600;
}

.pill {
    display: inline-block;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: .08rem .45rem;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .02em;
}


/* -------------------- */


.card {
    border: 1px solid var(--border);
    padding: var(--padding);
    background-color: var(--card);
    color: var(--card-foreground);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(16, 38, 28, 0.05);
}

.label {
    display: block;
    margin-top: 8px;
    margin-bottom: 4px;
    font-size: 0.95rem;
    color: var(--muted-foreground);
}

.input {
    width: 100%;
    box-sizing: border-box;
    border-radius: var(--radius-small);
    border: 1px solid var(--border);
    background-color: var(--card);
    height: 2rem;
    padding: 0 0.75rem;
}

.button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    height: 2rem;
    padding: 0 0.75rem;
    border-radius: var(--radius-small);
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    border: none;
    background: transparent;
    color: var(--foreground);
    cursor: pointer;
    text-decoration: none;
    transition: color 120ms, background 120ms;
}

.button.border {
    border: 1px solid var(--border);
}

.button.destructive {
    border: 1px solid var(--destructive);
    color: var(--destructive);
}

.button.secondary {
    background: var(--secondary);
    color: var(--secondary-foreground);
}

.button.primary {
    background: var(--primary-dark);
    color: var(--primary-foreground);
}

.button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--ring), 0 0 0 4px var(--ring-offset);
}

.button:disabled {
    pointer-events: none;
    opacity: 0.5;
}

.button:hover:not(:disabled) {
    background: var(--accent);
    color: var(--accent-foreground);
}

.button.primary:hover:not(:disabled) {
    background: var(--primary);
    color: var(--primary-foreground);
}

.button.destructive:hover:not(:disabled) {
    color: var(--destructive);
}

.button:active {
    background: var(--accent);
}

.button i {
    pointer-events: none;
    font-size: 1rem;
    flex-shrink: 0;
}


/* -------------------- */


.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    height: var(--header-height);
    background: var(--card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 18px;
    gap: 6px;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.2px;
    white-space: nowrap;
    margin-right: 4px;
    text-decoration: none;
}

.logo span {
    color: var(--foreground);
    font-style: normal;
    opacity: 0.65;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

.header-nav a {
    padding: 8px 10px;
    border-radius: var(--radius-small);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 120ms, background-color 120ms;
}

.header-nav a:hover {
    color: var(--foreground);
    background-color: var(--muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
}


/* -------------------- */


footer {
    margin-top: 40px;
    border-top: 1px solid var(--border);
    padding: 16px 18px;
    font-size: 0.9rem;
    color: var(--muted-foreground);
}

.footer-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--muted-foreground);
    transition: color 120ms;
}

.footer-links a:hover {
    color: var(--foreground);
}