html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
  color: #171a1c;
  font-family: 'Montserrat', sans-serif;
}

a {
  color: #0969da;
}

button:hover {
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(100%);
}

/* Main mobile frame */
#app {
  width: 390px;
  height: 100dvh;
  margin: 0 auto;
  background: #f2efea;
  position: relative;
  overflow: hidden;
}

#app-padding {
  padding: 0.75rem;
  height: 100%;

  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Center on desktop */
@media (min-width: 800px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

#camera-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: 9/16;
  overflow: hidden;
  z-index: 1;
}

/* Blurry background covers entire screen */
#camera-preview {
  width: 100%;
  height: 100%;
  aspect-ratio: 9 / 16;

  background: url('assets/blur.gif');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

#camera {
  display: block;

  width: 100%;
  height: 100%;
  aspect-ratio: 9 / 16;

  object-fit: cover;
  transform: scaleX(-1); /* <-- UNMIRRORS CAMERA */
}

#app-header,
#camera-start,
#time-container,
#menu-container {
  position: relative;
  z-index: 5; /* above camera */
}

#app-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#app-title-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#app-icon {
  width: 28px;
  height: 28px;
}

#app-title {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  line-height: 1;
}

.color__sauna {
  color: #ef0241;
}

.color__ice {
  color: #378de2;
}

#lang-select {
  background: #f5f5f7;
  font-size: 0.8rem;
  border: none;
  border-radius: 8px;
  padding: 0.2rem 0.4rem;

  font-family: 'Montserrat', sans-serif;
}

#camera-start {
  margin-top: auto;
  margin-bottom: auto;

  padding: 1rem 1.3rem;
  font-size: 1rem;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 8px;
  color: #0969da;
  text-decoration: underline;
}

.container {
  border-radius: 0.5rem;
  overflow: hidden;
}

#time-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: visible;

  margin-bottom: 8rem;

  position: relative;
}

#time-display {
  font-family: "Roboto Mono", monospace;
  font-size: 7rem;
  text-align: center;
  background: #f5f5f780;
  border-radius: 8px;
}

#live-messages {
  position: absolute;
  bottom: 19rem;
  right: 1rem;
  width: 70%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  z-index: 200;
}

/* bubble style */
.live-message {
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 6px 12px;
  border-radius: 14px;
  margin-top: 6px;
  font-size: 0.9rem;
  max-width: 85%;
  text-align: right;

  opacity: 0;
  transform: translateY(10px);
  animation: chatIn 0.28s ease-out forwards;
}

/* bubble fade/slide animation */
@keyframes chatIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes chatOut {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}

#time-countdown {
  font-family: "Roboto Mono", monospace;
  font-size: 7rem;
  text-align: center;
  color: #fff;
  background: #f5f5f780;
  border-radius: 8px;
}

#time-controls {
  z-index: 999;
  margin-top: -0.75rem;
  overflow: visible;
}

#time-slider {
  width: 100%;
  margin-top: 1rem;
  appearance: none;
  height: 8px;
  border-radius: 8px;
  background: #dfdfdf; /* fallback */
}

/* slider track */
#time-slider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 8px;
  background: transparent;  /* JS controls actual background */
}

#time-slider::-webkit-slider-thumb {
  appearance: none;
  width: 32px;
  height: 32px;
  margin-top: -12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;

  /* remove border — replaced by glow */
  border: none;

  /* new dynamic shadow */
  box-shadow: 0 0 12px #dfdfdf;
}

#time-slider:active::-webkit-slider-thumb {
  transform: scale(1.1);
}

#menu-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 9999;

  /* keep your original spacing */
  padding: 0.75rem 0;

  /* background needed so slider/camera never show behind */
  background: #f2efea80;

  box-shadow: 0 -6px 12px rgba(23, 26, 28, 0.15);
  border-radius: 0;

  display: flex;
  flex-direction: column;
}

#menu-controls {
  display: flex;
  justify-content: space-between;
  padding: 0 0.75rem;
  height: 4rem;
}

#menu-controls button {
  flex: 1;
  min-width: 0;

  border: 1px solid rgba(0, 0, 0, 0.6);
}

.button-left {
  border-radius: 8px 0 0 8px;
}

.button-right {
  border-radius: 0 8px 8px 0;
}

.button-one {
  border-radius: 8px;
}

#menu-controls__sauna, #menu-controls__ice {
  color: #171a1c;
}

#menu-controls__start, #menu-controls__stop {
  color: #fff;
  font-weight: bold;
  text-transform: uppercase;
}

#menu-controls__exit {
  font-weight: bold;
  text-transform: uppercase;
}


#menu-message {
  padding: 0 0.75rem;
  height: 4rem;
  color: #fff;
  font-weight: 700;

  justify-content: center;
  align-items: center;
}
