:root {
    --bg: #0f1117;
    --card: #121826;
    --text: #e6eaf3;
    --muted: #9aa4bd;
    --primary: #7c5cff;
    --primary-2: #5c3dff;
    --ring: 0 0 0 2px rgba(124, 92, 255, .35), 0 10px 30px rgba(124, 92, 255, .15);
    --card-w: 710px;
    --credit-w: 560px;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
    color: var(--text);
    background:
        radial-gradient(60% 60% at 20% 0%, rgba(124, 92, 255, .15) 0, transparent 60%),
        radial-gradient(60% 60% at 100% 100%, rgba(0, 212, 255, .12) 0, transparent 55%),
        var(--bg);
    display: grid;
    place-items: center;
    padding: 24px;
}

.container {
    width: var(--card-w);
    max-width: min(92vw, 1200px);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0)) border-box,
        linear-gradient(180deg, #182132, #0b1220) padding-box;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
    padding: 22px;
    transition: width .25s ease, box-shadow .2s ease, transform .2s ease;
    backdrop-filter: blur(6px);
}

.container:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 50px rgba(0, 0, 0, .55);
}

h2 {
    margin: 0 0 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.password-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, 0));
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    padding: 12px 12px 12px 14px;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .03);
}

.result {
    font: 600 15px ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    line-height: 1.2;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .25) transparent;
    flex: 1 1 auto;
}

.result::-webkit-scrollbar {
    height: 8px
}

.result::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .25);
    border-radius: 8px
}

.actions {
    display: flex;
    gap: 8px;
    flex: 0 0 auto
}

.btn {
    appearance: none;
    border: 0;
    cursor: pointer;
    user-select: none;
    padding: 12px 14px;
    border-radius: 14px;
    width: 100%;
    font-weight: 700;
    letter-spacing: .2px;
    font-size: 16px;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: var(--ring);
    transition: transform .12s ease, filter .2s ease, box-shadow .2s ease;
}

.btn:hover {
    filter: saturate(110%);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 0 0 2px rgba(124, 92, 255, .4) inset;
}

.icon-btn {
    height: 40px;
    width: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--text);
    background: radial-gradient(120% 120% at 50% -20%, rgba(124, 92, 255, .12), transparent 50%), #121929;
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .04);
    transition: transform .12s ease, background .2s ease, color .2s ease;
}

.icon-btn:hover {
    transform: translateY(-1px);
    background: #172238;
    color: #fff;
}

.row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.row label {
    color: var(--muted);
    font-weight: 600;
}

input[type="number"] {
    width: 82px;
    padding: 10px 12px;
    font-weight: 700;
    color: var(--text);
    background: #111827;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    outline: none;
    transition: box-shadow .2s ease, border-color .2s ease;
}

input[type="number"]:focus {
    border-color: rgba(124, 92, 255, .6);
    box-shadow: var(--ring);
}

.range {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    background: transparent;
    outline: none;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(124, 92, 255, .35), rgba(124, 92, 255, .15));
}

input[type="range"]::-moz-range-track {
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(124, 92, 255, .35), rgba(124, 92, 255, .15));
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    margin-top: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border: 0;
    box-shadow: 0 4px 12px rgba(124, 92, 255, .45);
}

input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border: 0;
    box-shadow: 0 4px 12px rgba(124, 92, 255, .45);
}

.options {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, .08);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
}

.opt {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    color: #d7def0;
}

.opt input {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%) translateY(20px);
    background: #111827;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .12);
    padding: 10px 14px;
    border-radius: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.credits-wrap {
    width: 100%;
    margin-top: 14px;
    display: flex;
    justify-content: flex-start;
}

.gh-card {
    width: 20rem;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, 0));
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .03);
}

.gh-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .18);
    object-fit: cover;
}

.gh-title {
    font-weight: 800;
}

.gh-meta {
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
}

.gh-link {
    color: #c9cfff;
    text-decoration: none;
    font-weight: 800;
}

.gh-link:hover {
    text-decoration: underline;
}

.gh-title,
.gh-meta {
    overflow-wrap: anywhere;
}

.lang-switch {
    position: absolute;
    top: 18px;
    right: 22px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, .12);
    padding: 4px;
    border-radius: 12px;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .04);
}

.lang-sep {
    color: rgba(255, 255, 255, .25);
}

.lang-btn {
    appearance: none;
    border: 0;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .2px;
    color: #cbd5e1;
    background: transparent;
}

.lang-btn:hover {
    color: #fff;
}

.lang-btn.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: var(--ring);
}