/* Reset a globální box-sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Custom properties */
:root {
  /* Například červené pozadí a bílé písmo */
  --primary-color: #881c24;
  --text-color: #ffffff;
  --font-family: 'Helvetica Neue', sans-serif;
}

/* Pokud je element v režimu full screen */
:fullscreen .timer,
:-webkit-full-screen .timer {
  padding-left: 12rem;
  padding-right: 12rem;
  max-width: 90%;
  margin: 0 auto;
}

/* Globální styly */
html, body {
  height: 100%;
  font-family: var(--font-family);
  background-color: var(--primary-color);
  color: var(--text-color);
  /* Zde ponechávám overflow-x: hidden,
     pokud však potřebujete i scrolling svisle, 
     lze upravit na overflow: auto (nebo hidden dle potřeby) */
  overflow-x: hidden;
}

/* Kontejner */
.container {
  /* Umístění a odsazení */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  
  /* Minimální výška pro full screen zobrazení */
  min-height: 100vh;
  
  /* Centering obsahu, pokud je k dispozici víc místa */
  max-width: 700px;       /* Nastavte si podle svých potřeb */
  margin: 0 auto;
  
  /* Vodorovné odsazení, aby se text netlačil ke krajům */
  padding: 1rem;
  
  /* V případě, že by bylo vhodné box-sizing i zde (již je výše, ale pro jistotu) */
  box-sizing: border-box;
}

/* Časovač */
.timer {
  font-size: 30vh;
  font-weight: bold;
  text-align: center;
  padding-top: 40px;
  min-height: 30vh;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* Info sekce */
.info {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.score,
.tretina,
.info-text {
  font-size: 3vw;
  margin: 10px 0;
  text-align: center;
}

.score {
  font-size: 6vw;
  font-weight: bold;
}

/* Další informace */
.additional-info {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 20px 0;
  margin-top: auto;
}

.additional-info > div {
  width: 24%;
  font-size: 3vw;
  text-align: center;
  padding: 10px;
}
/* Stylování pro PWA full screen režim (portrait) */
@media screen and (max-width: 768px) and (orientation: portrait) {
  body.pwa-fullscreen .timer {
    padding-left: 0rem;
    padding-right: 0rem;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
  }
  .timer {
    font-size: clamp(2rem, 10vh, 8em) !important;
    padding-top: 0 !important;
  }
}





/* Media Query pro menší obrazovky (portrait) */
@media screen and (max-width: 768px) {
  .timer {
    font-size: 20vh;
    padding-top: 20px;
  }

  .score,
  .tretina,
  .info-text {
    font-size: 5vw;
  }
  
  .score {
    font-size: 8vw;
  }

  .additional-info {
    flex-direction: column;
    align-items: center;
  }

  .additional-info > div {
    width: 90%;
    margin-bottom: 10px;
    font-size: 5vw;
  }
}

/* Media Query pro mobilní zařízení v landscape režimu:
   - skryje sekce s informacemi
   - nechá zobrazit pouze časovač
   - vycentruje timer do středu (vertical & horizontal) */
@media screen and (orientation: landscape) and (max-device-width: 768px) {
  .additional-info {
    display: none !important;
  }

  .container {
    justify-content: center;
    align-items: center;
    padding: 1rem;
  }

  .timer {
    font-size: 35vh !important;
    padding-top: 0 !important;
  }

  .info {
    display: flex !important;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 90%;
    margin-top: 1rem;
    gap: 1rem;
  }

  .score,
  .tretina,
  .info-text {
    display: block !important;
    text-align: center;
    font-size: clamp(1.5rem, 4vh, 2.5rem) !important;
    flex: 1;
  }

  /* Nové pořadí: TRETINA, INFO, SCORE */
  .info {
    flex-direction: row;
  }

  .tretina {
    order: 1;
  }

  .info-text {
    order: 2;
  }

  .score {
    order: 3;
  }
}
