* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    width: 100vw;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
}

#ui {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 48px 32px 40px;
    gap: 32px;
}

/* Logo — scales with viewport, generous on 4K */
#logo {
    width: min(880px, 88vw);
    height: auto;
    filter: drop-shadow(0 2px 32px rgba(0, 0, 0, 0.85));
}

/* Community links */
#community-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

#community-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    transition:
        color 0.15s,
        background 0.15s,
        border-color 0.15s,
        transform 0.15s;
}

#community-links a:hover {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
}

#community-links a:active {
    transform: translateY(0);
    opacity: 0.7;
}

#community-links a img,
#community-links a svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
    opacity: 0.6;
}

#community-links a:hover img,
#community-links a:hover svg {
    opacity: 0.95;
}

#community-links a[aria-label="YouTube"] img {
    width: auto;
    height: 14px;
}

/* Badge grid — strict 2x2, centered */
#badges {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 280px));
    grid-template-rows: repeat(2, auto);
    gap: 20px;
    align-content: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
}

#badges a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition:
        opacity 0.15s,
        transform 0.15s;
}

#badges a:hover {
    opacity: 0.88;
    transform: translateY(-3px);
}
#badges a:active {
    opacity: 0.7;
    transform: translateY(0);
}

#badges img {
    width: 100%;
    height: auto;
    display: block;
}

/* Contribute button */
#contribute {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    transition:
        color 0.15s,
        background 0.15s,
        border-color 0.15s,
        transform 0.15s;
}

#contribute:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

#contribute:active {
    transform: translateY(0);
    opacity: 0.75;
}

#contribute img {
    width: 18px;
    height: 18px;
}

/* Disclaimer */
#disclaimer {
    max-width: 640px;
    text-align: center;
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
    line-height: 1.6;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

#disclaimer a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: underline;
}

@media (max-width: 640px) {
    #badges {
        grid-template-columns: minmax(0, 320px);
        grid-template-rows: unset;
        gap: 14px;
    }
    #badges img {
        width: 75%;
        margin: 0 auto;
    }
    #ui {
        padding: 36px 20px 32px;
    }
    #community-links {
        gap: 6px;
    }
    #community-links a {
        font-size: 11px;
        padding: 5px 10px;
        gap: 5px;
    }
    #community-links a img,
    #community-links a svg {
        width: 13px;
        height: 13px;
    }
    #community-links a[aria-label="YouTube"] img {
        width: auto;
        height: 13px;
    }
}
