:root {
    --color-blue: rgb(0 0 204);
    --color-blue-bright: rgb(0 0 255);
    --color-text: #000;
    --color-muted: #4a4a4a;
    --color-surface: #fff;
    --color-bar: var(--color-blue);
    --color-active: var(--color-blue-bright);
    --radius: 0;
}

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

body,
button,
select,
input {
    font: inherit;
}

body {
    font-family: "Century Gothic", CenturyGothic, Geneva, AppleGothic, sans-serif;
    background: var(--color-surface);
    color: var(--color-text);
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(1.5rem, 5vw, 3.75rem) clamp(1rem, 5vw, 3.75rem);
}

.glow-container {
    position: fixed;
    z-index: 0;
    width: 1000px;
    height: 1000px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(
        circle,
        rgb(0 0 255 / 15%) 15%,
        rgb(0 0 255 / 0%) 50%
    );
    transform: translate(-500px, -500px);
    transition: transform 0.1s ease-out;
}

button,
select,
input {
    color: inherit;
}

.app-shell {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 7.5rem);
    min-height: calc(100dvh - 7.5rem);
    position: relative;
    z-index: 1;
    margin-inline: auto;
    background: transparent;
    border-radius: var(--radius);
    padding: 0;
    max-width: 1100px;
    width: 100%;
}

.page-header {
    margin-bottom: clamp(2rem, 6vw, 3.75rem);
    text-align: center;
}

h1 {
    color: var(--color-blue);
    margin-inline: auto;
    font-size: 3rem;
    font-weight: 400;
    line-height: 1.1;
}

.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 260px));
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding: 1.25rem;
    background: transparent;
    border-radius: var(--radius);
}

.control-group {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.control-group label {
    font-weight: 700;
    color: var(--color-text);
    font-size: 14px;
    line-height: 1.4;
}

output {
    color: var(--color-muted);
    font-variant-numeric: tabular-nums;
    font-weight: 400;
}

.select-wrapper {
    position: relative;
    width: min(100%, 260px);
}

.select-wrapper::after {
    border-bottom: 2px solid var(--color-blue);
    border-right: 2px solid var(--color-blue);
    content: "";
    height: 7px;
    pointer-events: none;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-65%) rotate(45deg);
    width: 7px;
}

.control-group select {
    appearance: none;
    padding: 8px;
    border: 0;
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-blue);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    padding-right: 2.5rem;
    text-align: center;
    width: 100%;
}

.control-group select:hover {
    color: var(--color-blue-bright);
}

.select-wrapper:focus-within::after {
    border-color: var(--color-blue-bright);
}

.control-group input[type="range"] {
    accent-color: var(--color-blue);
    cursor: pointer;
    max-width: 260px;
    width: 100%;
}

.buttons {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    justify-content: center;
}

button {
    padding: 12px 24px;
    background: transparent;
    color: var(--color-blue);
    border: 2px solid transparent;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.3s ease-in-out, transform 0.1s ease;
}

button:hover {
    border-color: var(--color-blue-bright);
}

button:active {
    transform: scale(0.98);
}

button:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 3px solid rgb(0 0 255 / 25%);
    outline-offset: 2px;
}

button:disabled {
    background: #e6e6e6;
    color: #666;
    cursor: not-allowed;
    transform: none;
}

.bars-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex: 1;
    min-height: clamp(240px, 45dvh, 400px);
    background: transparent;
    border-radius: var(--radius);
    padding: 20px;
    gap: 2px;
    overflow-x: auto;
}

.bar {
    background-color: var(--color-bar);
    display: inline-block;
    transition: height 0.2s ease, background-color 0.2s ease;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.bar.active {
    background-color: var(--color-active);
}

@media (max-width: 768px) {
    body {
        padding: 1.5rem 1rem;
    }

    .app-shell {
        padding: 0;
        min-height: calc(100vh - 3rem);
        min-height: calc(100dvh - 3rem);
    }

    .glow-container {
        display: none;
    }

    .controls {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
    }

    .bars-container {
        min-height: clamp(240px, 45dvh, 300px);
    }

    .bar {
        width: auto;
    }
}

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

    .glow-container {
        display: none;
    }
}
