:root {
    --bg: #0d0f14;
    --bg-alt: #141821;
    --text: #e8eaf0;
    --muted: #9aa3b2;
    --accent: #6c5ce7;
    --accent-2: #00d1ff;
    --radius: 14px;
}

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

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

code {
    font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;
    font-size: 0.9em;
    color: var(--accent-2);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13, 15, 20, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-weight: 900;
    font-size: 20px;
    color: var(--text);
}
.logo span { color: var(--accent-2); }

/* Hero */
.hero {
    padding: 72px 0 48px;
    background:
        radial-gradient(600px 300px at 80% 0%, rgba(108, 92, 231, 0.25), transparent),
        radial-gradient(500px 300px at 10% 30%, rgba(0, 209, 255, 0.15), transparent);
}

.hero__inner { text-align: center; }

.hero h1 {
    font-size: clamp(30px, 5vw, 48px);
    font-weight: 900;
    line-height: 1.15;
}

.accent {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__lead {
    max-width: 620px;
    margin: 18px auto 0;
    font-size: 18px;
    color: var(--muted);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: transform 0.15s, opacity 0.15s;
    white-space: nowrap;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn--primary { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #fff; }
.btn--ghost {
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--text);
    background: transparent;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tab {
    padding: 12px 22px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s;
}
.tab:hover { color: var(--text); }
.tab.is-active {
    color: var(--text);
    border-bottom-color: var(--accent-2);
}

.panel.is-hidden { display: none; }

/* Cards */
.card {
    background: var(--bg-alt);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 28px;
}

/* Controls */
.controls {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.controls--triple { gap: 12px; }

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 140px;
}

.field__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.field__label em { text-transform: none; font-style: normal; font-weight: 400; }

.field input {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    width: 100%;
}
.field input:focus {
    outline: none;
    border-color: var(--accent-2);
}
.field input.is-invalid { border-color: #e5484d; }

.controls__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.field__hint {
    margin-top: 14px;
    font-size: 14px;
    color: var(--muted);
}

.field__error {
    margin-top: 14px;
    font-size: 14px;
    color: #e5484d;
    font-weight: 600;
}

/* Results */
.result-list {
    list-style: none;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-list:empty { display: none; }

.result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--bg);
}

.result-item__value {
    flex: 1;
    font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;
    font-size: 15px;
    word-break: break-all;
    user-select: all;
}

.result-item__copy {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.result-item__copy:hover {
    color: var(--accent-2);
    border-color: var(--accent-2);
}

/* Footer */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 28px 0;
    color: var(--muted);
    font-size: 14px;
}
.footer__inner {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    padding: 12px 22px;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 200;
}
.toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 720px) {
    .hero { padding: 48px 0 36px; }
    .card { padding: 20px; }
    .controls { flex-direction: column; align-items: stretch; }
    .field { min-width: 0; }
    .controls__actions .btn { flex: 1; }
    .result-item { flex-wrap: wrap; }
}
