/* ───────────────────────────────────────────────────────────────────────────-
   Dark Theme & No Scrolling
──────────────────────────────────────────────────────────────────────────── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  overflow: hidden;                  /* prevent any scrolling */
  background: #1e1e1e;               /* dark gray */
  color: #f0f0f0;                    /* light text */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}


/* ───────────────────────────────────────────────────────────────────────────-
   Waveform Canvas
──────────────────────────────────────────────────────────────────────────── */

#waveform-container {
  width: 200px;
  height: 40px;
  background-color: #121212;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  margin-top: 1em;
}

#waveform-canvas {
  display: block;
  width: 100%;
  height: 100%;
}


/* ───────────────────────────────────────────────────────────────────────────-
   Centering Helpers
──────────────────────────────────────────────────────────────────────────── */
body.page-wrapper,
.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  /* use dynamic viewport unit where supported, fallback to standard vh */
  min-height: 100dvh;
  min-height: 100vh;
  padding: 1rem;
}



/* ───────────────────────────────────────────────────────────────────────────-
   Headings & Text
──────────────────────────────────────────────────────────────────────────── */
.page-wrapper h1,
.container h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #fff;
}

.page-wrapper p {
  font-size: 1rem;
  line-height: 1.4;
}


/* ───────────────────────────────────────────────────────────────────────────-
   Record / Stop Button
──────────────────────────────────────────────────────────────────────────── */
#record-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 300px;
  padding: 1rem;
  font-size: 1.25rem;
  font-weight: bold;
  background: #e53e3e;              /* red */
  color: #fff;
  border: none;
  border-radius: 0.5rem;             /* softly rounded */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

/* stop state: toggle `.recording` class in JS when recording */
#record-btn.recording {
  background: #fff;
  color: #e53e3e;
  border: 2px solid #e53e3e;
}

/* disabled after upload */
#record-btn.disabled {
  background: #444;
  color: #888;
  cursor: not-allowed;
  box-shadow: none;
}

/* press effect */
#record-btn:active:not(.disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ───────────────────────────────────────────────────────────────────────────-
   Mobile Optimizations
──────────────────────────────────────────────────────────────────────────── */
@media only screen and (max-width: 600px) {
  div.container {
    margin-top: -15vh;
  }

  div.message {
    margin-top: -25vh;
  }

  div.container h1 {
    font-size: 2.2rem;
  }

  #record-btn {
    font-size: 1.4rem;
    padding: 1.2rem;
  }
}
