@font-face {
  font-family: "Space Grotesk";
  src: url("SpaceGrotesk-VariableFont_wght.ttf") format("truetype-variations");
  font-weight: 300 700;
  font-display: swap;
}

body {
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  max-width: 800px;
  margin: 20px auto;
  padding: 0 20px;
}

label {
  margin-bottom: 4px;
}

h1 {
  font-weight: 300;
  font-size: 24pt;
  color: #161616;
}

h2 {
  margin-top: 40px;
  margin-bottom: 0px;
  color: #5b5b5b;
  font-weight: 300;
}

.container {
  background: #f5f5f5;
  /* background: linear-gradient(0deg, rgba(241,239,239,1) 0%, rgba(249,249,249,1) 100%); */

  padding: 22px 50px 60px 50px;
  border-radius: 43px;
  /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.067),
    0 4px 16px rgba(0, 0, 0, 0.138),
    0 8px 32px rgba(0, 0, 0, 0.183); */
  box-shadow: 0px 10px 15px -3px rgb(255 0 0 / 10%), 0px 10px 22px -3px rgba(1, 0, 0, 0.1), 0px 15px 66px -3px rgba(1, 0, 0, 0.1), 0px 4px 6px -3px rgba(1, 0, 0, 0.3), 0px 52px 58px 12px rgb(255 227 227 / 10%);
  position: relative;
  margin-top: 50px;
}

.content-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.main-content {
  flex: 1;
}

.buzzer-image {
  flex-shrink: 0;
  width: 400px;
  padding: 20px;
}

.buzzer-image svg {
  width: 100%;
  height: auto;
  fill: #333;
}

/* Make layout responsive */
@media (max-width: 1024px) {
  .content-wrapper {
    flex-direction: column;
  }

  .buzzer-image {
    width: 200px;
    margin: 0 auto;
  }
}

.input-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 10px 0px;
  margin-top: 12px;
}

select {
  padding: 6px;
  border-radius: 8px;
  height: 40px;
  width: 100%;
  font-size: 12pt;
}

.input-field {
  display: flex;
  flex-direction: column;
}

input {
  padding: 8px;
  margin: 5px 0;
  font-family: monospace;
}

label.mainkeylabel {
  font-weight: bold;
}

button {
  background: #ff4040;
  color: white;
  border: none;
  padding: 17px 19px;
  border-radius: 12px;
  cursor: pointer;
  width: 100%;
  font-weight: 400;
  font-size: 13pt;
  font-family: "Space Grotesk", sans-serif;
  margin: 5px 0;
}

#buzzer {
  position: absolute;
  bottom: -60px;
  right: -260px;
  width: 300px;
  height: 300px;
  z-index: -1;

  fill: #e1e1e1;
}

#buzzer.active {
  fill: #cccccc;
}

#buzzer.active #buzzer-top {
  fill: #fc4444;
}

#buzzer-top {
  transition: transform 0.1s ease-out;
  z-index: 100;
}

#buzzer-top.pressed {
  transform: translateY(60px);
}

#buzzer.inactive {
  opacity: 0.08;
}

button:disabled {
  background: #cccccc;
}

#status {
  margin-top: 10px;
  margin-bottom: 0px;
  padding: 12px;
  background: #d5dee9;
  border-radius: 8px;
}

#status.error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

button:focus {
  outline: none; /* Ensure focus outline is removed in all browsers */
}

input:focus {
  outline: none; /* Ensure focus outline is removed in all browsers */
}

button:enabled:hover {
  cursor: pointer;
  box-shadow: 0px 0px 12px 0px rgba(255, 102, 102, 0.4);
}

#log {
  border: 2px solid #a0000008;

  margin-top: 10px;
  padding: 10px;
  background: #eeeeee;
  border-radius: 10px;
  height: 100px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 14px;
}

#selectionOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#selectionOverlay.hidden {
  display: none;
}

.overlay-content {
  background: white;
  max-width: 46ch;
  padding: 4rem;
  border-radius: 24px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.overlay-content h2 {
  margin-top: 0;
  color: #333;
}

.overlay-content p {
  color: #666;
  margin-bottom: 0;
}

/*Similar to foot note but left aligned*/
.bottomlink {
  position: fixed;
  bottom: 20px;
  left: 20px;
}

.bottomlink a {
  font-size: 16px;
  color: #418feeab;
  line-height: 2;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 300;
  text-decoration: none;
}

.bottomlink a:hover {
  text-decoration: underline;
}

.bottomlink h3 {
  font-size: 16px;
  color: #397fd5cb;
  line-height: 2;
  margin-bottom: 0;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
}

.footnote {
  position: fixed;
  bottom: 20px;
  right: 20px;
  font-size: 12px;
  color: #999;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 300;
}

.language-selector {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
}

.language-selector select {
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: white;
  cursor: pointer;
}
