:root {
    --bg: #04060b;
    --panel: #0c111d;
    --panel-2: #101827;
    --line: rgba(255,255,255,.12);
    --text: #f8fbff;
    --muted: #aeb9ca;
    --cyan: #00d5ff;
    --pink: #ff2f92;
    --green: #18ffb2;
    --amber: #ffbf3f;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
    margin: 0;
    min-width: 320px;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 10%, rgba(255,47,146,.14), transparent 25rem),
        radial-gradient(circle at 90% 15%, rgba(0,213,255,.13), transparent 27rem),
        var(--bg);
    font-family: Roboto, Arial, sans-serif;
}
button, input { font: inherit; }
a { color: inherit; }

.config-header {
    min-height: 76px;
    padding: 0 max(4vw, 24px);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    background: rgba(4,6,11,.86);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 20;
}
.brand {
    width: fit-content;
    text-decoration: none;
    font: .84rem/1.4 "Press Start 2P", cursive;
    text-shadow: 0 0 12px var(--cyan), 0 0 18px var(--pink);
}
.header-steps { display: flex; gap: 30px; color: #69768a; font-size: .82rem; font-weight: 700; }
.header-steps .active { color: var(--green); }
.back-link { justify-self: end; color: #dce7f7; font-size: .92rem; text-underline-offset: 5px; }

.facebook-float { position: fixed; right: 20px; bottom: 22px; z-index: 100; display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 17px 10px 13px; border: 1px solid rgba(255,255,255,.32); border-radius: 999px; color: #fff; background: #1877f2; box-shadow: 0 10px 30px rgba(0,0,0,.4), 0 0 22px rgba(24,119,242,.45); font-weight: 700; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.facebook-float svg { width: 25px; height: 25px; fill: currentColor; flex: none; }
.facebook-float:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0,0,0,.48), 0 0 28px rgba(24,119,242,.6); }
.facebook-float:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.config-app { width: min(1480px, 94%); margin: 0 auto; padding: 42px 0 64px; }
.intro { max-width: 760px; margin-bottom: 30px; }
.eyebrow { margin: 0 0 14px; color: var(--green); text-transform: uppercase; letter-spacing: .16em; font: .7rem/1.5 "Press Start 2P", cursive; }
h1 { margin: 0 0 12px; font: clamp(1.65rem, 3vw, 2.65rem)/1.25 "Press Start 2P", cursive; letter-spacing: -.03em; }
.intro > p:last-child { margin: 0; max-width: 680px; color: var(--muted); font-size: 1.05rem; line-height: 1.65; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(430px, .85fr); gap: 26px; align-items: start; }
.preview-column { position: sticky; top: 102px; }
.preview-stage {
    --accent: var(--cyan);
    min-height: 700px;
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    padding: 60px 28px 124px;
    border: 1px solid color-mix(in srgb, var(--accent) 36%, white 8%);
    border-radius: 28px;
    background:
        radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 46%),
        linear-gradient(155deg, #111928, #060910 76%);
    box-shadow: 0 28px 80px rgba(0,0,0,.38), inset 0 0 50px rgba(0,0,0,.45);
    transition: border-color .3s ease, background .3s ease;
}
.preview-stage[data-front-led="off"] { --accent: #778398; }
.stage-grid {
    position: absolute;
    inset: 0;
    opacity: .18;
    background-image: linear-gradient(rgba(255,255,255,.13) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.13) 1px, transparent 1px);
    background-size: 42px 42px;
    transform: perspective(460px) rotateX(62deg) scale(1.6) translateY(24%);
    transform-origin: bottom;
    mask-image: linear-gradient(transparent 20%, black 78%);
}
.preview-stage::after {
    content: "";
    position: absolute;
    width: 58%;
    height: 40px;
    left: 21%;
    bottom: 82px;
    background: var(--accent);
    filter: blur(34px);
    opacity: .28;
    border-radius: 50%;
}
.preview-badge { position: absolute; top: 24px; left: 24px; display: flex; align-items: center; gap: 9px; color: #dbe6f3; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.preview-badge span { width: 8px; height: 8px; background: var(--green); border-radius: 50%; box-shadow: 0 0 12px var(--green); }
.cabinet-frame { position: relative; z-index: 2; width: min(78%, 420px); aspect-ratio: 2 / 3; display: grid; place-items: center; overflow: hidden; border-radius: 20px; transition: transform .28s ease, width .28s ease; box-shadow: 0 28px 60px rgba(0,0,0,.5), 0 0 36px color-mix(in srgb, var(--accent) 18%, transparent); }
.preview-stage[data-model="27"] .cabinet-frame { width: min(63%, 340px); }
.preview-stage[data-model="32"] .cabinet-frame { width: min(70%, 380px); }
.preview-stage[data-model="43"] .cabinet-frame { width: min(78%, 420px); }
.cabinet-frame img { width: 100%; height: 100%; object-fit: contain; display: block; background: #070b12; filter: saturate(.94) contrast(1.02); transition: opacity .18s ease, filter .3s ease; }
.cabinet-frame img.changing { opacity: .2; }
.build-status { position: absolute; top: 22px; right: 22px; max-width: 54%; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; z-index: 3; }
.build-status span { padding: 8px 10px; border-radius: 999px; background: rgba(3,7,13,.82); border: 1px solid rgba(255,255,255,.18); color: #edf6ff; backdrop-filter: blur(10px); font-size: .74rem; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.stage-caption span { display: block; color: #8794a8; font-size: .7rem; margin-bottom: 4px; }
.stage-caption { position: absolute; z-index: 3; left: 24px; right: 24px; bottom: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.stage-caption strong { font: .72rem/1.45 "Press Start 2P", cursive; }

.price-panel { margin-top: 14px; padding: 20px 22px; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.price-panel span, .price-panel small { display: block; color: var(--muted); font-size: .82rem; }
.price-panel strong { display: block; margin: 4px 0; font: 1.55rem/1.3 "Press Start 2P", cursive; color: var(--amber); }
.summary-toggle { padding: 10px 13px; color: #dce7f7; background: transparent; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.summary-list { grid-column: 1 / -1; margin: 8px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); list-style: none; }
.summary-list li { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; color: var(--muted); font-size: .9rem; }

.controls { padding: 28px; border-radius: 28px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(16,24,39,.96), rgba(8,13,23,.98)); box-shadow: 0 28px 80px rgba(0,0,0,.3); }
.controls-heading p { margin: 0 0 7px; color: var(--cyan); font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .13em; }
.controls-heading h2 { margin: 0; font: 1.1rem/1.5 "Press Start 2P", cursive; }
.control-group { margin: 28px 0 0; padding: 0; border: 0; }
.control-group legend { width: 100%; margin-bottom: 14px; font-weight: 700; font-size: .98rem; }
.control-group legend span { width: 25px; height: 25px; margin-right: 8px; display: inline-grid; place-items: center; border-radius: 7px; color: #061018; background: var(--green); font-size: .75rem; }
.model-options, .glass-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.model-options input, .glass-options input { position: absolute; opacity: 0; pointer-events: none; }
.model-options label > span { min-height: 72px; padding: 14px; display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; background: rgba(255,255,255,.025); transition: .2s ease; }
.model-options strong { font: .8rem/1.4 "Press Start 2P", cursive; }
.model-options small { margin-top: 6px; color: var(--muted); }
.model-options input:checked + span, .glass-options input:checked + span { border-color: var(--cyan); background: rgba(0,213,255,.1); box-shadow: inset 0 0 0 1px rgba(0,213,255,.18); }
.model-options input:focus-visible + span, .glass-options input:focus-visible + span { outline: 3px solid white; outline-offset: 3px; }
.glass-options label > span { min-height: 78px; padding: 14px; display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; background: rgba(255,255,255,.025); transition: .2s ease; }
.glass-options strong, .glass-options small { display: block; }
.glass-options small { margin-top: 6px; color: var(--muted); line-height: 1.35; }
.switch-list { display: grid; gap: 10px; }
.switch-list label { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px; border-radius: 13px; border: 1px solid var(--line); background: rgba(255,255,255,.025); cursor: pointer; }
.switch-list strong, .switch-list small { display: block; }
.switch-list small { margin-top: 4px; color: var(--muted); line-height: 1.35; }
.switch-list input { appearance: none; width: 48px; min-width: 48px; height: 27px; border-radius: 99px; background: #3a4555; cursor: pointer; position: relative; transition: .2s ease; }
.switch-list input::after { content: ""; position: absolute; width: 21px; height: 21px; left: 3px; top: 3px; background: white; border-radius: 50%; transition: .2s ease; }
.switch-list input:checked { background: var(--green); }.switch-list input:checked::after { transform: translateX(21px); background: #04100c; }
.switch-list input:focus-visible { outline: 3px solid white; outline-offset: 3px; }
.switch-list input:disabled { opacity: .45; cursor: not-allowed; }
.actions { display: grid; gap: 10px; margin-top: 28px; }
.primary-action, .secondary-action { min-height: 53px; display: flex; align-items: center; justify-content: center; padding: 13px 18px; border-radius: 13px; text-align: center; font-weight: 700; text-decoration: none; }
.primary-action { justify-content: space-between; color: #061018; background: linear-gradient(135deg, var(--green), var(--cyan)); box-shadow: 0 0 24px rgba(0,213,255,.2); }
.primary-action span { font-size: 1.5rem; }
.secondary-action { border: 1px solid var(--line); color: #e9f3ff; background: rgba(255,255,255,.04); }

@media (max-width: 1050px) {
    .workspace { grid-template-columns: 1fr; }
    .preview-column { position: static; }
    .preview-stage { min-height: 650px; }
}
@media (max-width: 720px) {
    .facebook-float { right: 14px; bottom: 14px; width: 52px; min-height: 52px; padding: 0; justify-content: center; }
    .facebook-float span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    .config-header { min-height: 68px; grid-template-columns: 1fr auto; padding: 0 18px; }
    .header-steps { display: none; }
    .back-link { font-size: .82rem; }
    .brand { font-size: .68rem; }
    .config-app { width: min(94%, 620px); padding-top: 28px; }
    .preview-stage { min-height: 560px; padding: 76px 16px 104px; border-radius: 20px; }
    .cabinet-frame { width: min(76%, 300px); }
    .preview-badge { top: 18px; left: 16px; }
    .stage-caption { left: 16px; right: 16px; bottom: 18px; }
    .stage-caption strong { font-size: .6rem; }
    .controls { padding: 20px 16px; border-radius: 20px; }
    .glass-options { grid-template-columns: 1fr; }
}
@media (max-width: 450px) {
    .intro > p:last-child { font-size: .98rem; }
    .model-options { grid-template-columns: 1fr 1fr; }
    .model-options strong { font-size: .68rem; }
    .price-panel { grid-template-columns: 1fr; }
    .summary-toggle { justify-self: start; }
    .build-status { top: 48px; right: 12px; max-width: 72%; }
}
