:root {
    --bg: #0b1220;
    --panel: rgba(255, 255, 255, 0.08);
    --panel-strong: rgba(255, 255, 255, 0.12);
    --text: rgba(255, 255, 255, 0.92);
    --muted: rgba(255, 255, 255, 0.72);
    --border: rgba(255, 255, 255, 0.14);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --accent: #7c3aed; /* violet */
    --accent2: #06b6d4; /* cyan */
    --success: #22c55e;
    --danger: #ef4444;
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    color: var(--text);
    background: radial-gradient(1200px 700px at 20% 0%, rgba(124, 58, 237, 0.35), transparent 55%),
                radial-gradient(1000px 650px at 90% 20%, rgba(6, 182, 212, 0.28), transparent 55%),
                linear-gradient(180deg, #0b1220, #080d18);
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: linear-gradient(180deg, rgba(11, 18, 32, 0.92), rgba(11, 18, 32, 0.70));
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
}

.brand-title {
    font-weight: 750;
    font-size: 18px;
    letter-spacing: 0.2px;
}

.brand-subtitle {
    margin-top: 2px;
    font-size: 13px;
    color: var(--muted);
    max-width: 620px;
}

.navbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link {
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--muted);
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.35), rgba(6, 182, 212, 0.25));
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--text);
}

.main {
    padding: 22px 0 26px;
}

h1 {
    margin: 0 0 14px;
    font-size: 28px;
    letter-spacing: -0.02em;
}

h2 {
    margin: 0 0 10px;
    font-size: 16px;
    color: var(--muted);
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

section {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 14px;
}

p {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.6;
}

ul, ol {
    margin: 10px 0 0 18px;
    padding: 0;
    color: rgba(255, 255, 255, 0.86);
}

li {
    margin: 6px 0;
}

.result-box {
    margin-top: 10px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.20);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.notice {
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.86);
}

.notice.warn {
    border-color: rgba(239, 68, 68, 0.28);
    background: rgba(239, 68, 68, 0.10);
}

.muted {
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
}

a:hover {
    text-decoration: underline;
}

form {
    margin: 10px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

label {
    color: var(--muted);
    font-size: 13px;
}

input[type="text"],
input[type="number"],
select,
textarea {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 10px 12px;
    outline: none;
    min-width: 220px;
}

textarea {
    width: 100%;
    min-width: 100%;
    resize: vertical;
}

input[type="text"]::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    border-color: rgba(124, 58, 237, 0.65);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}

button {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 650;
    color: var(--text);
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.75), rgba(6, 182, 212, 0.55));
    cursor: pointer;
    transition: transform 120ms ease, filter 120ms ease;
}

button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

pre {
    margin: 12px 0 0;
    padding: 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.10);
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    color: rgba(255, 255, 255, 0.86);
}

#results, #wn-sim-result, #vec-sim-result {
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.site-footer {
    border-top: 1px solid var(--border);
    background: rgba(11, 18, 32, 0.65);
}

.footer-inner {
    padding: 16px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.footer-muted {
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 720px) {
    .header-inner {
        align-items: flex-start;
        flex-direction: column;
    }
    .navbar {
        justify-content: flex-start;
    }
    input[type="text"], input[type="number"], select {
        min-width: 100%;
    }
}