:root {
    color-scheme: light;
    font-family: "Manrope", Arial, sans-serif;
    color: #172033;
    background: #f8fafc;
    --ink: #1e293b;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --blue-soft: #eff6ff;
}

* { box-sizing: border-box; }

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 12% 6%, rgba(37, 99, 235, .08), transparent 28rem),
        linear-gradient(180deg, #ffffff 0, #f8fafc 52%, #eef2f7 100%);
}

button, input { font: inherit; }
button { cursor: pointer; }

.page-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: clamp(48px, 9vw, 100px) 0 86px;
}

.hero {
    max-width: 760px;
    margin: 0 auto 28px;
    text-align: center;
}

h1 {
    margin: 0;
    color: var(--ink);
    font-family: "Bebas Neue", Impact, sans-serif;
    font-size: clamp(3.35rem, 8vw, 6rem);
    font-weight: 400;
    letter-spacing: .025em;
    line-height: .92;
}

.generator-card {
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(280px, .94fr);
    gap: clamp(26px, 5vw, 64px);
    max-width: 940px;
    margin: 0 auto;
    padding: clamp(22px, 4vw, 42px);
    border: 1px solid rgba(203, 213, 225, .8);
    border-radius: 22px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 22px 60px rgba(15, 23, 42, .09);
}

.panel-title {
    margin: 0 0 7px;
    color: var(--ink);
    font-size: 1.25rem;
    font-weight: 800;
}

.panel-copy {
    margin: 0 0 26px;
    color: var(--muted);
    font-size: .87rem;
    line-height: 1.6;
}

.length-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 13px;
}

.field-label {
    color: var(--ink);
    font-size: .82rem;
    font-weight: 800;
}

.length-value {
    min-width: 45px;
    padding: 5px 9px;
    border-radius: 8px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: .86rem;
    font-weight: 800;
    text-align: center;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--blue);
}

.range-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    color: #94a3b8;
    font-size: .7rem;
    font-weight: 700;
}

.options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    margin-top: 28px;
}

.option {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 45px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: #475569;
    font-size: .78rem;
    font-weight: 700;
    transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.option:has(input:checked) {
    border-color: #bfdbfe;
    background: var(--blue-soft);
    color: #1d4ed8;
}

.option input { accent-color: var(--blue); }

.submit-button,
.copy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    border: 1px solid var(--ink);
    border-radius: 10px;
    font-weight: 800;
    transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.submit-button {
    width: 100%;
    margin-top: 25px;
    background: var(--ink);
    color: #fff;
}

.submit-button:hover,
.copy-button:hover { transform: translateY(-2px); }

.submit-button:hover {
    background: #0f172a;
    box-shadow: 0 10px 23px rgba(15, 23, 42, .18);
}

.result-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(19px, 3vw, 28px);
    border-radius: 16px;
    background: var(--ink);
    color: #fff;
}

.result-panel__label {
    margin: 0 0 13px;
    color: #93c5fd;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.password-output {
    display: flex;
    align-items: center;
    min-height: 77px;
    margin-bottom: 21px;
    padding: 16px;
    overflow-wrap: anywhere;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 12px;
    background: rgba(255, 255, 255, .07);
    color: #fff;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: clamp(1.05rem, 2.5vw, 1.45rem);
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.35;
}

.copy-button {
    width: 100%;
    border-color: rgba(255, 255, 255, .45);
    background: #fff;
    color: var(--ink);
}

.copy-button:hover { box-shadow: 0 10px 22px rgba(0, 0, 0, .18); }
.copy-button.is-copied { background: #dcfce7; color: #166534; }

.security-note {
    display: flex;
    gap: 10px;
    margin: 22px 0 0;
    color: #cbd5e1;
    font-size: .76rem;
    line-height: 1.5;
}

.security-note strong { color: #86efac; }

@media (max-width: 760px) {
    .generator-card { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .page-shell { width: min(100% - 28px, 1180px); }
    .options { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
