:root {
    --bg: #0b0b0b;
    --text: #f2f2f2;
    --primary: #b7fd49;
    --secondary: #f8e05b;
    --tertiary: #f788fe;
    --topbar: linear-gradient(90deg, var(--primary), var(--secondary), var(--tertiary));
}

/* Normal, clean style */
body {
    background-color: var(--bg);
    background-image: var(--topbar);
    background-repeat: no-repeat;
    background-size: 100% 3px;
    background-position: top left;
    color: var(--text);
    font-family: "JetBrains Mono", "Cascadia Mono", "Fira Code", Consolas, "SFMono-Regular", ui-monospace, "Liberation Mono", Menlo, monospace;
    max-width: 800px;
    margin: 20px auto;
    padding: 0 10px;
}

h1 {
    color: var(--primary);
    margin-bottom: 8px;
}
/* heading prefixes */
h1::before { content: "# "; color: var(--secondary); }
h2::before { content: "## "; color: var(--secondary); margin-right: 4px; }

hr {
    height: 1px;
    border: none;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary) 60%, transparent), transparent);
    margin: 18px 0;
}

a {
    color: var(--primary);
    text-decoration: none;
}
a:hover { color: var(--secondary); }

::selection {
    background: color-mix(in srgb, var(--tertiary) 30%, transparent);
}

/* Position the CRT toggle at the top-right */
.crt-toggle {
    position: fixed;
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--primary);
    background: rgba(0, 0, 0, 0.4);
    color: var(--primary);
    text-decoration: none;
    z-index: 1001; /* above scanline overlay */
    box-shadow: 0 0 6px color-mix(in srgb, var(--primary) 40%, transparent);
}
.crt-toggle:hover {
    background: color-mix(in srgb, var(--primary) 15%, transparent);
}

/* Make social links show icons horizontally */
main ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 12px;
}
main ul li { margin: 0; }
/* badge-like icon buttons */
main ul a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--primary) 65%, transparent);
    background: rgba(255, 255, 255, 0.02);
    box-shadow: 0 0 0 0 rgba(0,0,0,0);
    transition: box-shadow 0.2s ease, background 0.2s ease, transform 0.12s ease;
}
main ul a:hover {
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    box-shadow: 0 0 12px color-mix(in srgb, var(--primary) 35%, transparent);
    transform: translateY(-1px);
}

.icon {
    width: 24px;
    height: 24px;
    display: inline-block;
    vertical-align: middle;
    filter: invert(1); /* white icons on dark bg */
    transition: transform 0.15s ease, filter 0.2s ease;
}
.icon:hover { transform: scale(1.06); }

/* Inline icon next to text (e.g., Overwatch in intro) */
.icon-inline {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.15em;
    margin-right: 4px;
    filter: invert(1);
}

/* Quick links */
.quick-links { margin-top: 16px; }
.quick-links h2 { margin-bottom: 10px; }
.quick-link-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.quick-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
    background: rgba(255,255,255,0.03);
    color: var(--text);
    text-decoration: none;
}
.quick-link:hover {
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    box-shadow: 0 0 10px color-mix(in srgb, var(--primary) 25%, transparent);
}
.icon-sm {
    width: 18px;
    height: 18px;
    filter: invert(1);
}

/* Flag emoji style */
.flag {
    display: inline-block;
    margin-left: 4px;
    font-size: 1.05em;
    line-height: 1;
}

/* CRT effect styles — softer, inspired by arimelody */
body.crt-enabled {
    background-color: #0e0e0e;
    background-image: var(--topbar);
    background-repeat: no-repeat;
    background-size: 100% 3px;
    background-position: top left;
    color: var(--primary);
    text-shadow: 0 0 4px color-mix(in srgb, var(--primary) 70%, transparent);
    animation: flicker 0.12s infinite;
}

/* Subtle scanlines */
body.crt-enabled::before {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.35) 3px
    );
    pointer-events: none;
    z-index: 999;
}

/* Enhance icons under CRT with a green-ish glow */
body.crt-enabled .icon,
body.crt-enabled .icon-inline {
    filter: invert(1) drop-shadow(0 0 4px var(--primary));
}

/* Simple flicker animation (very light) */
@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.97; }
}

/* Brand icon exceptions (keep original colors) */
.icon-brand-overwatch {
    filter: none !important;
}