/* Layout: container, header, footer, main layout, game-container, progress, phoneme display, edge buttons, thank you, upload progress */
html, body {
  height: 100%;
  width: 100vw;
  min-height: 100vh;
  min-width: 100vw;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}
body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-width: 100vw;
  width: 100vw;
  height: 100vh;
  background-color: var(--background-color);
}
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-width: 100vw;
  width: 100vw;
  height: 100vh;
  margin: 0 auto;
  box-sizing: border-box;
}
header {
  text-align: center;
  flex-shrink: 0;
}
footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-color);
  opacity: 0.7;
  padding: 0.5rem 0;
  flex-shrink: 0;
}
.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  width: 100%;
  max-width: 1000px;
  box-sizing: border-box;
  background-color: white;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  position: relative;
  flex-grow: 1;
  overflow-y: hidden;
}
#phoneme-display {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  margin: 0 0 1.5rem;
  min-height: 120px;
  text-align: center;
}
#phoneme {
  font-size: 7rem;
  font-weight: bold;
  color: var(--primary-color);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}
.progress-container {
  margin-bottom: 1.2rem;
  flex-shrink: 0;
  width: 100%;
  position: relative;
  min-height: 120px;
  overflow: hidden;
}
.phoneme-progress {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  padding: 1.5rem 2.5rem;
  background-color: rgba(75, 123, 236, 0.05);
  border-radius: 10px;
  position: relative;
  margin: 0 auto;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -ms-overflow-style: -ms-autohiding-scrollbar;
  scroll-behavior: smooth;
}
.phoneme-progress::before,
.phoneme-progress::after {
  content: '';
  min-width: 20px;
  height: 1px;
}
.progress-line {
  position: absolute;
  top: 50%;
  height: 4px;
  background-color: #e0e0e0;
  z-index: 1;
  transform: translateY(-50%);
  left: 0;
  right: 0;
  width: 100%;
  min-width: max-content;
}
.progress-line-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
  width: 0%;
}
.phoneme-bubble {
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 600;
  background-color: white;
  color: var(--text-color);
  transition: all 0.3s ease;
  margin: 0 0.6rem;
  z-index: 2;
  border: 3px solid #e0e0e0;
  position: relative;
  flex-shrink: 0;
}
.phoneme-bubble.completed {
  background-color: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}
.phoneme-bubble.current {
  background-color: var(--primary-color);
  color: white;
  transform: scale(1.2);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(75, 123, 236, 0.3);
}
.phoneme-bubble:hover {
  transform: scale(1.1);
  cursor: help;
}
.progress-counter {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-color);
  margin-top: 0.5rem;
  opacity: 0.8;
}
.controls {
  display: flex;
  flex-direction: column;
  gap: 0.1.2rem;
  margin-bottom: 1.2rem;
  width: 100%;
  position: relative;
}
.control-row {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
}
.record-row {
  margin-bottom: 1.2rem;
}
.edge-btn {
  position: absolute;
  z-index: 20;
  width: 70px;
  height: 70px;
  background-color: var(--background-color);
  border: 2px solid var(--secondary-color);
  opacity: 0.9;
  border-radius: 16px;
  top: 20px;
  transform: none !important;
}
.prev-btn {
  left: 5px;
}
.next-btn {
  right: 5px;
}
.hidden {
  display: none;
}
.thank-you-container {
  text-align: center;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  position: relative;
  z-index: 10;
}
.llama-container {
  position: relative;
  margin-bottom: 1.2rem;
  max-width: 220px;
}
.llama-image {
  width: 100%;
  height: auto;
  display: block;
}
.speech-bubble {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: white;
  border: 1px solid var(--primary-color);
  border-radius: 15px;
  padding: 0.4rem 0.6rem;
  max-width: 120px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-size: 0.8rem;
}
.speech-bubble:after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 15px;
  border-width: 10px 6px 0;
  border-style: solid;
  border-color: white transparent transparent;
  transform: rotate(0deg);
}
.speech-bubble:before {
  content: "";
  position: absolute;
  bottom: 9px;
  left: 14px;
  border-width: 11px 7px 0;
  border-style: solid;
  border-color: var(--primary-color) transparent transparent;
  transform: rotate(0deg);
  z-index: -1;
}
.restart-button-container {
  margin-top: 0.75rem;
  width: 100%;
  display: flex;
  justify-content: center;
}
.upload-progress-container {
  width: 160px;
  margin: 0 auto 1.8rem;
  max-width: 400px;
  position: relative;
  height: 10px;
  min-height: 10px;
  display: block;
}
.upload-progress {
  width: 100%;
  height: 10px;
  background-color: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  display: block;
}
.upload-progress-bar {
  height: 100%;
  background-color: var(--accent-color);
  border-radius: 10px;
  width: 0%;
  transition: width 0.3s ease;
}
