#game-wrapper {
  position: relative;
  width: 1200px;
  height: 480px;
  background-color: #ffffff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  overflow: hidden;
}

canvas {
  display: block;
  background: #ffffff;
  cursor: crosshair;
  touch-action: none;
}

/* SLADĚNÝ ÚVODNÍ PERGAMEN */
#intro-pergamen {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #f4ecd8;
  border: 2px solid #bfa17a;
  box-shadow:
    inset 0 0 30px rgba(139, 90, 43, 0.25),
    0 15px 35px rgba(0, 0, 0, 0.3);
  padding: 35px 70px;
  border-radius: 4px;
  text-align: center;
  cursor: pointer;
  z-index: 20;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
  user-select: none;
}

#intro-pergamen::before,
#intro-pergamen::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 90%;
  top: 5%;
  border-radius: 50%;
  background: rgba(139, 90, 43, 0.15);
}
#intro-pergamen::before {
  left: 4px;
}
#intro-pergamen::after {
  right: 4px;
}

.pergamen-row-large {
  font-family: "Georgia", serif;
  font-size: 54px;
  font-weight: 900;
  color: #3a2212;
  letter-spacing: 6px;
  line-height: 1.1;
  text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5);
}

.pergamen-row-small {
  font-family: "Georgia", serif;
  font-size: 18px;
  font-weight: bold;
  color: #3a2212;
  letter-spacing: 4px;
  margin: 6px 0;
  text-transform: lowercase;
}

.pergamen-hint {
  font-family: "Georgia", serif;
  font-size: 12px;
  font-style: italic;
  color: #70482b;
  margin-top: 20px;
  letter-spacing: 1px;
}

/* Overlay Text Screen Styling */
#overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(26, 32, 44, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 60px;
  color: #ffffff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease-in-out;
  z-index: 10;
  text-align: center;
}

#overlay.active {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

#text-card {
  max-width: 900px;
  transform: scale(0.92);
  transition: transform 0.35s ease-out;
}

#overlay.active #text-card {
  transform: scale(1);
}

#text-tag {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #319795;
  font-weight: 700;
  margin-bottom: 14px;
}

#text-title {
  font-size: 34px;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 30px;
  color: #fff;
  line-height: 1.35;
  letter-spacing: -0.5px;
}

#text-content {
  font-size: 17px;
  line-height: 1.8;
  color: #e2e8f0;
  margin-bottom: 40px;
  font-weight: 400;
  text-align: left;
  white-space: pre-line; /* Klíčové pro zachování konců řádků (\n) */
}

.btn-again {
  background-color: #319795;
  color: white;
  border: none;
  padding: 13px 34px;
  font-size: 17px;
  font-weight: 600;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(49, 151, 149, 0.4);
  transition: all 0.2s ease;
}

.btn-again:hover {
  background-color: #2b6cb0;
  transform: translateY(-1px);
}
