html, body {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  background: black;
  color: white;
  font-family: sans-serif;
  overscroll-behavior-y: contain;
  touch-action: none;
}

#card {
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 9vw;
  user-select: none;
  text-align: center;
  padding: 2vh;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Counter row */
#counter-row {
  position: fixed;
  bottom: 5.6rem;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  z-index: 1001;
  pointer-events: auto;
}

#card-counter {
  font-size: 1.2rem;
  color: #0ff;
}

/* Scrubber row */
#scrub-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4.2rem;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 .9rem;
  z-index: 1000;
  touch-action: pan-x pinch-zoom;
}

#scrubber {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 10px;
  background: #1f2937;
  border-radius: 999px;
  outline: none;
  touch-action: pan-x pinch-zoom;
  -webkit-tap-highlight-color: transparent;
}

#scrubber::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #0ff;
  border: none;
  box-shadow: 0 0 0 2px #000 inset;
}

#scrubber::-moz-range-thumb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #0ff;
  border: none;
}

#scrubber:disabled {
  opacity: .5;
}

/* Top left controls */
#top-left-wrap {
  position: fixed;
  top: 1rem;
  left: 1rem;
  display: flex;
  gap: 0.4rem;
  z-index: 1002;
}

.pill-btn {
  background: #0ff;
  color: black;
  font-size: 1rem;
  border: none;
  border-radius: 1rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background .2s ease, transform .05s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pill-btn:active {
  transform: scale(0.98);
}

.active-green {
  background: #11c700 !important;
  color: black !important;
}

.active-red {
  background: #c70039 !important;
  color: white !important;
}

/* Top right controls */
#top-right-wrap {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.4rem;
  z-index: 1002;
}

.flag-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flag-count {
  font-size: .8rem;
  color: #0ff;
  line-height: 1;
  margin-top: .2rem;
  user-select: none;
}

.top-right-btn {
  background: #0ff;
  color: black;
  font-size: 1rem;
  border: none;
  border-radius: 1rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background .2s ease, transform .05s ease;
}

.top-right-btn:active {
  transform: scale(0.98);
}

/* Language row */
#lang-row {
  position: fixed;
  top: 4.4rem;
  left: 0;
  width: 100%;
  display: flex;
  gap: .5rem;
  align-items: center;
  justify-content: center;
  padding: .25rem .5rem;
  z-index: 1001;
  background: linear-gradient(to bottom, rgba(0,0,0,.85), rgba(0,0,0,.35));
  backdrop-filter: blur(2px);
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #111;
  color: #0ff;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: .45rem .75rem;
  font-size: .95rem;
  min-width: 9rem;
  max-width: 48vw;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.hint {
  font-size: 5vw;
  color: #0ff;
  opacity: .8;
  margin-top: 1rem;
}
