:root {
  --button-color: #e9eef6;
  --button-bg-color: rgba(0,0,0, .13);
  --button-border-color: rgba(233,238,246,.18);
  --section-bg-color: rgba(0,0,0, .60);
  --section-border-color: rgba(233,238,246,.15);
  --paragraph-color: rgba(233,238,246,.85);
  --controls-border-color: rgba(233,238,246,.15);
  --controls-bg-color: rgba(0,0,0,.90);
  --legend-color: rgba(233,238,246,1);
  --fader-color: rgba(233,238,246,1);
  --warning-bg-color: rgba(15, 20, 28, .95);
  --warning-bg-color2: rgba(0,0,0,.65);
  --warning-border-color: rgba(233,238,246,.18);
  --svg-color: #67f5c7;
  --svg-bg-color: rgb(0,0,0);
  --svg-border-color: rgba(233,238,246,.18);

}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--button-color);
  background-image: url(images/adi-goldstein-u0BVH8IOTUk-unsplash.jpg);
  background-size: cover;
  background-repeat: repeat;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  pointer-events: none;
  z-index: 0;
}

header, main, footer {
  position: relative;
  z-index: 1;
}

main {
  flex: 1;
  padding: 18px;
  font-size: 2.5rem;
}

footer {
  margin-top: auto;
  text-align: center;
  padding: 18px;
}

.play-pause {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

section {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 1rem;
  border-radius: 1rem;
  border: .1rem solid var(--section-border-color);
  background: var(--section-bg-color);
  font-size: 2.5rem;
}

h1 {
  margin: 1rem;
  width: max-content;
  padding: 1rem;
  font-size: 2.5rem;
  border-radius: 1rem;
  background-color: var(--controls-bg-color);
}

h2 {
  margin: 0 0 1rem 0;
}

p  {
  margin: 0 0 .5rem 0;
  color: var(--paragraph-color);
}

fieldset.controls {
  margin-top: 1rem;
  border-radius: 1rem;
  border: .5rem solid var(--controls-border-color);
  padding: 2rem;
  background: var(--controls-bg-color);
  flex-direction: column;
  gap: .5rem;
}

button {
  border: .1rem solid var(--button-border-color);
  background: var(--button-bg-color);
  color: var(--button-color);
  padding: .5rem 1rem;
  border-radius: .5rem;
  cursor: pointer;
  font-size: 1.5rem;
}

button:hover {
  border-color: rgba(103,245,199,.35); 
}

button:disabled {
  opacity: .55;
  cursor: not-allowed; 
}

legend {
  padding: 0 1rem; 
  color: var(--legend-color);
  font-weight: bold;
}

#play, #pause {
  padding: .5rem 1rem;
  margin: .5rem;
  font-size: 2rem;
  padding: 0.6rem 1.2rem;
  border-radius: 1rem;
  font-weight: 600;
}

#oscWaveIcon, #lfoWaveIcon {
  width: 10rem;
  height: auto;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: .2rem .8rem;
  border-radius: .5rem;
  border: 1px solid var(--svg-border-color);
  background: var(--svg-bg-color);
  color: var(--svg-color);
}

#lfoModulation {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid rgba(122,167,255,.28);
  background: rgba(122,167,255,.08);
  border-radius: 16px;
  padding: 12px;
}

fieldset.controls > div {
  display: flex;
  gap: 1rem;
  align-items: center;
}

span {
    margin: 1rem;
  }

label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 1.0rem;
}

.lfo-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(103,245,199,.35);
  background: rgba(103,245,199,.08);
  margin: .5rem;
  font-size: 2.5rem;
}

.waveLabel {
  margin: 0;
  padding: 0; 
  font-weight: 600;
}

select, input[type="range"] {
  text-align: center;
  width: 100%; 
}

select {
  font-size: 1rem;
  padding: 10px 14px;       
  min-height: 44px; 
  border-radius: 12px;
  border: 1px solid rgba(233,238,246,.18);
  background: rgba(0,0,0,.25);
  color: #e9eef6;
}

select:focus,
input[type="checkbox"]:focus {
  outline: 2px solid rgba(103, 245, 199, 0.6);
  outline-offset: 2px;
}

input[type="range"] {
  accent-color: #67f5c7; 
}

input[type="checkbox"] {
  transform: scale(1.5);
  transform-origin: left;
  margin-right: 10px;
  accent-color: #67f5c7;
}

.fader-column {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-top: .5rem;
}

.vertical-slider {
  writing-mode: vertical-lr;
  direction: rtl;
  height: 10rem;
}

.fader {
  align-items: center;
  justify-content: center;
  gap: .5rem;
  color: var(--fader-color);
}

.warning {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--warning-bg-color2);
  z-index: 9999;
}

.warning.show {
  display: flex; 
}

.warning-card {
  width: min(520px, 100%);
  background: var(--warning-bg-color);
  border: .1rem solid var(--warning-border-color);
  border-radius: 1rem;
  padding: 1rem;
}

.warning-card p {
  margin-top: 8px; 
}


@media (min-width: 800px) {
  
  fieldset.controls {
    display: flex;
    flex-direction: row;
  }

  section {
    width: auto;
  }

  fieldset.controls > div {
    flex: 1;
  }

  .play-pause {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .waveform-select {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
  }
}
