:root {
    --bg: #0f172a;
    --card: #111827;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --accent: #6366f1;
    --error: #f87171;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    height: 100%;
    width: 100%;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background: radial-gradient(circle at top, #1f2937, var(--bg));
    color: var(--text);
}

body {
    display: grid;
    place-items: center;
}

main {
    max-width: 640px;
    padding: 2rem;
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    text-align: center;
}

h1 {
    margin-top: 0;
    font-size: 1.8rem;
    letter-spacing: 0.5px;
}

p {
    color: var(--muted);
    line-height: 1.6;
}

ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--muted);
}

li {
    padding: 4px 0;
}

.loader {
    margin: 1.5rem auto;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.status {
    font-size: 0.85rem;
    color: var(--muted);
}

.fallback {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(248, 113, 113, 0.1);
    color: #fca5a5;
    font-size: 0.85rem;
}

#no-wasm, #wasm-fail {
    display: none;
}

footer {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--muted);
}

footer a {
    color: var(--muted);
    text-decoration: none;
}

footer a:hover {
    color: var(--text);
}

.store-links {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.store-links img {
    transition: transform 0.15s ease;
}

.store-links img:hover {
    transform: scale(1.05);
}