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

html, body {
  margin: 0px;
  padding: 0px;
}

:root {
  --green: rgb(80,150,5);
  --darkgray: rgb(100, 100, 100);
  --yellow: rgb(255,200,0);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

header {
  text-align: center;
  margin-bottom: 1em;
}

footer {
  text-align: center;
  margin-top: 1em;
  margin-bottom: 0.5em;
}

.keyboard-button-holder {
  display: flex;
  flex-direction: column;
  align-items: center;
  font: inherit;
}

.english {
  width: 80%;
}
.sound {
  font-size: 0.8em;
  font-weight: 200;
}
.ipaonly .sound {
  display: none;
}

.toggle-ipa {
  margin-bottom: 1em;
  margin-top: 1em;
  font-family: inherit;
}
.sound em {
  text-decoration: underline;
  font-style: normal;
  font-weight: normal;
}

.app {
  max-width: 360px;
  margin: auto;
/*
  display: grid;
  grid-template-rows: auto;
  gap: 1rem;
  padding: 1rem;
  justify-content: center;
  text-align: center;
  */
}
.board {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  gap: 0.4rem;
}
.round {
  display: flex;
  gap: 0.4rem;
}
.letter {
  color: #000000;
  font-size: 1.65rem;
  border: 1px solid #999999;
  display: flex;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 0.1rem;
  align-items: center;
  justify-content: center;
}
.letter--hint-correct {
  background: var(--green) !important;
}
.letter--hint-wrong {
  background: var(--darkgray);
}
.letter--hint-close {
  background: var(--yellow);
}
.letter--hint-correct,
.letter--hint-wrong,
.letter--hint-close,
.key--hint-correct,
.key--hint-wrong,
.key--hint-close {
  color: #ffffff !important;
}
.feedback {

  
      white-space: pre-wrap;
    height: 1.9em;
    text-align: center;
    margin-top: 0.5em;
}

.keyboard {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.keyboard__row {
  display: flex;
  gap: 5px;
  justify-content: center;
}
.key {
  font: inherit;
  display: block;
  height: 2.6rem;
  background: #eeeeee;
  border-radius: 0.25rem;
  border: .1px solid #cccccc;
  color: #000000;
  font-size: 1rem;
  padding: 1px 2px;
    min-width: 32px;

}

.ipaonly .key {
  width: 1.75rem;
}

.ipaonly .key.wide {
  width: 2.7rem;
}

.ipaonly .key--control {
  width: 2.6rem;
}

.key:hover {
  box-shadow: 0 0 0 0.1rem currentColor;
  cursor: pointer;
}

.key--control {
  width: 3rem;
  font-size: 0.7rem;
  margin: 0 1.5rem;
}

.key--hint-correct {
  background: var(--green) !important;
}
.key--hint-wrong {
  background: var(--darkgray);
}
.key--hint-close {
  background: var(--yellow);
}

@keyframes shake {
  8% {
    transform: translateX(6%);
  }
  16% {
    transform: translateX(-6%);
  }
  24% {
    transform: translateX(5%);
  }
  32% {
    transform: translateX(-5%);
  }
  40% {
    transform: translateX(4%);
  }
  48% {
    transform: translateX(-4%);
  }
  56% {
    transform: translateX(3%);
  }
  64% {
    transform: translateX(-3%);
  }
  72% {
    transform: translateX(2%);
  }
  80% {
    transform: translateX(-2%);
  }
  88% {
    transform: translateX(1%);
  }
  96% {
    transform: translateX(-1%);
  }
  100% {
    transform: translateX(0);
  }
}

::-webkit-input-placeholder {
  text-align: center;
  font: inherit;
}

:-moz-placeholder {
  /* Firefox 18- */
  text-align: center;
  font: inherit;
}

::-moz-placeholder {
  /* Firefox 19+ */
  text-align: center;
  font: inherit;
}

:-ms-input-placeholder {
  text-align: center;
  font: inherit;
}

/* Bookmark Banner */
.bookmark-banner {
  background: #4a90e2;
  color: white;
  padding: 12px 16px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.banner-content {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.banner-text {
  font-size: 14px;
  font-weight: 500;
}

.url-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 400px;
}

.url-input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #ffffff40;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 13px;
  min-width: 200px;
}

.url-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.copy-button {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: background-color 0.2s;
}

.copy-button:hover {
  background: rgba(255, 255, 255, 0.3);
}

.dismiss-button {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 13px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background-color 0.2s;
  font-weight: 500;
}

.dismiss-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Adjust app layout when banner is shown */
body:has(.bookmark-banner[style*="block"]) .app {
  margin-top: 60px;
}

@media (max-width: 600px) {
  .banner-content {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  
  .url-container {
    max-width: none;
  }
  
  .dismiss-button {
    align-self: center;
    margin-top: 8px;
  }
  
  body:has(.bookmark-banner[style*="block"]) .app {
    margin-top: 80px;
  }
}
