:root {
    --bg: #0b0b12;
    --panel: #15151f;
    --panel-edge: #262636;
    --text: #e8e6f0;
    --muted: #8b89a0;
    --accent: #4dd2ff;
}

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

body {
    font-family: "IBM Plex Sans", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top {
    text-align: center;
    padding: 32px 16px 20px;
}

.top h1 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.prl {
    color: var(--accent);
}

.tagline {
    margin-top: 6px;
    color: var(--muted);
}

.layout {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    width: min(1200px, 100%);
    margin: 0 auto;
    padding: 0 24px 24px;
    align-items: stretch;
}

@media (max-width: 860px) {
    .layout {
        grid-template-columns: 1fr;
    }
}

/* ------- ściana z neonem ------- */

.wall {
    position: relative;
    min-height: 380px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse 90% 70% at 50% 42%, #1c1c2b 0%, #101018 55%, #07070c 100%);
    border: 1px solid var(--panel-edge);
}

/* delikatna faktura ściany */
.wall::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 46px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 96px);
    pointer-events: none;
}

.sign {
    padding: 40px;
    text-align: center;
    line-height: 1.25;
    word-break: break-word;
    max-width: 100%;
}

.sign .line {
    display: block;
}

.letter {
    display: inline-block;
    white-space: pre;
    color: var(--core, #fff);
    text-shadow:
        0 0 4px rgba(255, 255, 255, 0.9),
        0 0 11px var(--neon),
        0 0 26px var(--neon),
        0 0 55px var(--neon),
        0 0 90px var(--neon);
}

.letter.burned {
    color: var(--burned, #23232e);
    text-shadow: none;
}

.letter.flicker {
    animation: flicker var(--dur, 3.1s) linear infinite;
    animation-delay: var(--delay, 0s);
}

@keyframes flicker {
    0%, 88%, 100% { opacity: 1; }
    89% { opacity: 0.35; }
    90% { opacity: 0.95; }
    92% { opacity: 0.15; }
    93% { opacity: 0.9; }
    95% { opacity: 0.45; }
    96% { opacity: 1; }
}

/* ------- panel sterowania ------- */

.panel {
    background: var(--panel);
    border: 1px solid var(--panel-edge);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-self: start;
}

.control label,
.control .label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 8px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.control output {
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

textarea,
select {
    width: 100%;
    background: #0d0d15;
    border: 1px solid var(--panel-edge);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    padding: 10px 12px;
    resize: vertical;
}

textarea:focus,
select:focus {
    outline: 2px solid var(--accent);
    outline-offset: -1px;
}

.swatches {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.swatch {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: var(--c);
    cursor: pointer;
    box-shadow: 0 0 10px color-mix(in srgb, var(--c) 60%, transparent);
    transition: transform 0.12s ease;
}

.swatch:hover {
    transform: scale(1.12);
}

.swatch.selected {
    border-color: #fff;
    transform: scale(1.12);
}

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

.buttons {
    display: flex;
    gap: 10px;
}

.btn {
    flex: 1;
    padding: 11px 14px;
    border-radius: 8px;
    border: 1px solid var(--panel-edge);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.12s ease;
}

.btn:hover {
    filter: brightness(1.15);
}

.btn.primary {
    background: var(--accent);
    border-color: transparent;
    color: #06222e;
}

.btn.secondary {
    background: #1e1e2b;
    color: var(--text);
}

.hint {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.5;
}

.foot {
    text-align: center;
    padding: 16px;
}

.foot a {
    color: var(--muted);
    text-decoration: none;
}

.foot a:hover {
    color: var(--text);
}
