:root {
    --bg: #0b1220;
    --panel: #0f1c2e;
    --panel2: #0c1727;
    --text: #e8eef7;
    --muted: #9fb0c6;
    --accent: #6ee7ff;
    --accent2: #7dd3fc;
    --border: rgba(255, 255, 255, .12);
    --btn: #e8eef7;
    --btnText: #0b1220;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: radial-gradient(1200px 700px at 60% 10%, #102a43 0%, var(--bg) 55%, #070c16 100%);
    color: var(--text);
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 16px;
}

.wrap {
    width: min(980px, 100%);
    background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

h1 {
    font-size: clamp(22px, 3vw, 34px);
    margin: 0;
    letter-spacing: .2px;
}

.sub {
    color: var(--muted);
    margin: 0;
    font-size: 14px;
}

.grid {
    display: grid;
    grid-template-columns: 1.3fr .9fr;
    gap: 16px;
    margin-top: 16px;
}

@media (max-width: 860px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

.result {
    background: linear-gradient(180deg, rgba(110, 231, 255, .07), rgba(110, 231, 255, .03));
    border: 1px solid rgba(110, 231, 255, .25);
    border-radius: 16px;
    padding: 18px;
    min-height: 120px;
    display: grid;
    gap: 10px;
    align-content: start;
}

.value {
    font-size: clamp(20px, 2.8vw, 32px);
    font-weight: 700;
    color: var(--accent);
    word-break: break-word;
    line-height: 1.1;
    margin-bottom: 8px;
}

.meta {
    color: var(--muted);
    font-size: 13px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.pill {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border);
}

.controls {
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    display: grid;
    gap: 14px;
}

.row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
}

label {
    color: var(--muted);
    font-size: 13px;
}

input[type="number"],
input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--panel2);
    color: var(--text);
    outline: none;
}

input[type="range"] {
    width: 100%;
}

.inline {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.check {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, .03);
}

.check input {
    transform: scale(1.1);
}

.btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

button {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .06s ease, opacity .2s ease;
    user-select: none;
}

button:active {
    transform: translateY(1px);
}

.primary {
    background: var(--btn);
    color: var(--btnText);
}

.ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.toast {
    color: var(--muted);
    font-size: 13px;
    min-height: 18px;
    margin-top: 4px;
}

.small {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
}

code.kbd {
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .04);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    color: var(--text);
}

.number {
    color: #65abff;
}

.separator {
    color: #ff4e63;
}