:root {
  --progress-area: 32px;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Garet", sans-serif;
  z-index: 0;
  position: relative;
}

html,
body {
  overflow: auto;
}

/* Skrytí scrollbarů ve WebKit */
::-webkit-scrollbar {
  display: none;
}

/* Skrytí scrollbarů ve Firefox */
* {
  scrollbar-width: none;
}

h1,
h2,
.heading {
  font-size: 50px;
}

body.no-scroll {
  overflow: hidden;
  height: 100vh;
  touch-action: none; /* vypne tahání stránky na mobilech při první fázi */
}

body { font-family: "Garet", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
h1, h2, .heading { font-family: "TAN Tangkinwood", Georgia, "Times New Roman", serif; }


@supports (env(safe-area-inset-top)) {
  #main-screen {
    padding-top: calc(var(--progress-area) + env(safe-area-inset-top));
  }
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  flex-direction: column;
  font-family: sans-serif;
  z-index: 1;
}

#card-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#card-area {
  margin-bottom: 2rem;
}

#controls {
  display: flex;
  justify-content: center;
  gap: 10rem;
  margin-top: clamp(0.75rem, 2.4vw, 1.5rem);
}

.action-btn {
  width: clamp(52px, 6.5vw, 70px);
  height: clamp(52px, 6.5vw, 70px);
  border-radius: 50%;
  border: 3px solid #99115c;
  background: transparent;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  user-select: none;
}

.action-btn.pressed {
  transform: scale(1.05);
  background-color: #f2e6fa;
}

.action-btn:hover {
  transform: scale(1.15);
  background-color: #f2e6fa;
}

#accept {
  border-color: #28a745;
  color: #28a745;
}

#accept:hover {
  background-color: #e6f9ed;
}

#reject {
  border-color: #dc3545;
  color: #dc3545;
}

#reject:hover {
  background-color: #fdeaea;
}

#main-screen {
  padding-top: calc(var(--progress-area) + 8px);
}

#progress-text {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 15px;
  font-weight: bold;
  color: #99115c;
  font-weight: 700;
  background: transparent;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 3;
  font-family: sans-serif;
}

#progress-container {
  width: min(520px, 46vw);
  height: 10px;
  background: rgba(240, 240, 240, 0.92);
  backdrop-filter: saturate(150%) blur(6px);
  position: fixed;
  top: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  border-radius: 999px;
  overflow: hidden;
}

#progress-bar {
  height: 100%;
  width: 0%;
  background-color: #99115c;
  transition: width 0.3s ease;
}

#next-phase {
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  background-color: #99115c;
  color: white;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#next-phase:hover {
  background-color: #ad2c70;
  transform: scale(1.05);
}

#next-phase:active {
  transform: scale(0.98);
}

#start-button {
  margin-top: 2rem;
  width: 10rem;
  padding: 0.75rem 1.5rem;
  background-color: #99115c;
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#start-button:hover {
  background-color: #ad2c70;
  transform: scale(1.05);
}

#start-button:active {
  transform: scale(0.98);
}

.celebration-title {
  margin: 1 1 1 1rem;
  font-size: 2.8rem;
  font-weight: bold;
  color: #000000;
}

.celebration-subtitle {
  opacity: 0.85;
  margin: 1rem;
  font-size: 1.2rem;
  color: #555;
}

.celebration-cta {
  margin-top: 0.5rem;
}

#app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  z-index: 2000;
}

#app-logo {
  position: fixed;
  height: 200px;
  z-index: 2000;
  object-fit: contain;
  background: transparent;
}

/* Menší obrazovka na desktopu */
@media (max-height: 820px) {
  #controls {
    margin-top: 0.3rem;
    gap: 7rem;
  }
  .action-btn {
    width: 62px;
    height: 62px;
  }
  :root {
    --progress-area: 20px;
  }
}

/* Mobil */
@media (max-width: 600px) {
  h1,
  h2,
  .heading {
    font-size: 30px;
  }

  #controls {
    margin-top: 1rem;
  }

  .action-btn {
    width: 55px;
    height: 55px;
    font-size: 1rem;
  }

  .action-btn:hover,
  #accept:hover,
  #reject:hover {
    transform: none !important;
    background: inherit !important;
  }

  #accept.pressed {
    background-color: #e6f9ed;
  }

  #reject.pressed {
    background-color: #fdeaea;
  }

  #progress-text {
    font-size: 12px;
    top: 28px;
  }

  #progress-container {
    top: 55px;
    height: 10px;
    width: 250px;
  }

  #next-phase {
    font-size: 0.9rem;
    padding: 0.6 1.2rem;
  }

  #card-screen {
    padding: 0 1rem;
  }

  #celebration-screen h1 {
    font-size: 2rem;
    margin: 2.5rem;
  }

  #celebration-screen p {
    font-size: 1rem;
  }

  .action-btn {
    -webkit-tap-highlight-color: transparent;
  }

  #app-logo {
    top: 5px;
    height: 150px;
  }
}

@media (max-width: 480px) {
  :root {
    --progress-area: 20px;
  }
}
