html,
body {
  width: 100vw;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light-colour);
}

/* -------------------------------------------------------------------------- */
/*                             SPLIT BACKGROUND                               */
/* -------------------------------------------------------------------------- */

.tf-background {
  position: absolute;
  inset: 0;
  display: flex;
}

.tf-half {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  transition: opacity 0.3s ease;
  margin-top: 3.5vmin;
}

.tf-half p {
  font-size: 4.5vmin;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.3);
  text-transform: uppercase;
}

.tf-half--false p {
  justify-content: flex-start;
}

.tf-half--false {
  background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
  justify-content: flex-start;
  border-right: 0.5vmin solid rgba(0, 0, 0, 0.025);
}

.tf-half--true {
  background: linear-gradient(225deg, #01bc78 0%, #27ae60 100%);
  border-left: 0.5vmin solid rgba(255, 255, 255, 0.05);
}

.arrowHolder {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 2.5%;
}

.leftArrowHolder {
  margin-left: 2.5%;
  margin-right: 0;
}

@media (max-width: 850px) {
  .arrowHolder {
    align-self: flex-start;
    margin-top: 12.5vmin;
  }
}

.tf-half svg {
  width: 7.5vmin;
  height: 7.5vmin;
  fill: rgba(0, 0, 0, 0.3);
  stroke-width: 0;
  stroke-linejoin: miter;
  pointer-events: none;
}

/* -------------------------------------------------------------------------- */
/*                                   TITLE                                    */
/* -------------------------------------------------------------------------- */

.tf-title {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: var(--light-colour);
  z-index: 99;
  user-select: none;
  border-bottom: 0.25vmin solid #ccc;
  box-shadow: 0 0.5vmin 0 rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tf-title p {
  text-align: center;
  padding: 3.5vmin 1vmin;
  font-size: 4.5vmin;
  font-weight: 500;
  color: var(--grey-colour);
  user-select: none;
  width: 80vw;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
}

.tf-streak {
  width: 10vw;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  user-select: none;
}

.tf-streak-icon {
  width: 9vmin;
  height: 9vmin;
  color: #ccc;
  z-index: 2;
}

.tf-streak-count {
  position: absolute;
  font-size: 2.5vmin;
  font-weight: 500;
  color: var(--grey-colour);
  background: var(--yellow-colour);
  min-width: 4.5vmin;
  height: 4.5vmin;
  padding: 0 1vmin;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.tf-counter {
  width: 10vw;
  text-align: center;
  color: var(--grey-colour);
  user-select: none;
}

.tf-counter-current {
  font-size: 3.5vmin;
  font-weight: 700;
}

.tf-counter-sep {
  font-size: 2.5vmin;
  font-weight: 300;
  margin: 0 0.3vmin;
}

.tf-counter-total {
  font-size: 2.5vmin;
  font-weight: 300;
}

/* -------------------------------------------------------------------------- */
/*                                    CARD                                    */
/* -------------------------------------------------------------------------- */

.tf-card-area {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 20;
  margin-top: 3.5vmin;
}

.tf-card {
  width: min(85vw, 70vh);
  aspect-ratio: 3 / 2;
  background-color: #111;
  opacity: 0;
  border-radius: 2vmin;
  box-shadow: rgba(0, 0, 0, 0.25) 0px 0.25vmin 0 -2px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1vmin;
  overflow: hidden;
  transform-origin: center center;
  user-select: none;
  container-type: size;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  will-change: transform;
  background-size: cover;
  background-position: center;
  border: 0.5vmin solid #eee;
}

.tf-card:active {
  cursor: grabbing;
}

.tf-card p {
  color: var(--white-colour);
  font-size: 12cqh;
  font-weight: 300;
  padding: 2cqh 3cqw;
  border-radius: 1cqh;
  width: fit-content;
  height: fit-content;
  max-width: 90%;
  max-height: 90%;
  text-align: center;
  text-wrap: balance;
  pointer-events: none;
}

/* Text overlay when card has background image */
.tf-card[style*='background-image'] p {
  color: var(--white-colour);
  background-color: color-mix(in srgb, var(--dark-colour) 90%, transparent);
}

/* Image-text position 'bottom' (file-level setting): flush full-width caption
   band that grows upward with extra lines. Image cards only — text-only cards
   stay centred. Card is overflow:hidden, so the band clips to its corners. */
.tf-card.tf-text-bottom {
  position: relative;
}

.tf-card.tf-text-bottom[style*='background-image'] p {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  border-radius: 0;
}

/* -------------------------------------------------------------------------- */
/*                                 END SCREEN                                 */
/* -------------------------------------------------------------------------- */

.tf-end-screen {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3vmin;
  background: var(--blue-colour);
}

.tf-end-title {
  font-size: 8vmin;
  font-weight: 900;
  color: #fff;
}

.tf-end-score {
  font-size: 4vmin;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.tf-end-streak {
  font-size: 2.5vmin;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
}

#tf-restart-btn {
  padding: 2vmin 6vmin;
}

/* -------------------------------------------------------------------------- */
/*                            CUSTOM DIALOG CHANGES                           */
/* -------------------------------------------------------------------------- */

.custom-dialog p:first-of-type {
  font-weight: 900 !important;
  font-size: 5vmin !important;
  margin-bottom: 1.5vmin;
  text-transform: uppercase;
}

.custom-dialog p {
  margin-bottom: 2vmin;
  font-size: 2.5vmin !important;
  line-height: 1.75 !important;
  font-weight: 500 !important;
  max-width: 800px;
  color: var(--grey-colour);
}

.custom-dialog .simpleButton {
  font-size: 2.5vmin !important;
  padding: 2vmin 4vmin;
}
