/* ===== OVERLAY STYLES ===== */

@font-face {
  font-family: 'Gravitas One';
  src: url('../fonts/GravitasOne-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Libre Caslon Text';
  src: url('../fonts/LibreCaslonText-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Libre Caslon Text';
  src: url('../fonts/LibreCaslonText-Italic.ttf') format('truetype');
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: 'Libre Caslon Text';
  src: url('../fonts/LibreCaslonText-Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

.overlay-screen {
  font-size: 1rem;
  position: absolute;
  inset: 0;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200;
  text-align: center;
  padding: 40px;
}

.overlay-content h1 {
  font-family: 'Gravitas One', Georgia, serif;
  font-size: 2.3rem;
  text-transform: uppercase;
  color: black;
  margin: 0.5rem;
  padding: 0;
}

.overlay-screen a {
	color: yellow;
}

.overlay-content hr {
    margin: 0.75rem;
    color: tan;
 }

.overlay-screen .subtitle, .overlay-content-body .subtitle {
  font-family: 'Libre Caslon Text', Georgia, serif;
  font-size: 1.8rem;
  font-style: italic;
  color: black;
  margin-top: 0rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.overlay-screen .instructions {
  font-size: 1.5rem;
  margin-bottom: 36px;
  max-width: 500px;
}

.overlay-screen .overlay-card-body {
  font-size: 1.5rem;
}

/* Card body — scrollable HTML content */
.overlay-card-body {
  font-family: 'Libre Caslon Text', Georgia, serif;
  color: black;
  font-size: 1.4rem;
  line-height: 1.9rem;
  max-width: 560px;
  text-align: left;
  max-height: 80vh;
  overflow-y: auto;
  padding: 0;
  margin: 0;
}

.overlay-card-body p {
  margin: revert;
  padding-right: 1rem;
}

.overlay-card-body a {
  color: blue;
  font-weight: bold;
}

.overlay-card-body .youtube {
  margin-top: 1rem;
  text-align: center;
}
.overlay-card-body .youtube iframe {
  width: 480px;
  height: 270px;
  border: 1px solid black;
}

.primary-btn {
  background: linear-gradient(135deg, #8a0000, #9a0000);
  border: 1px solid #8b7355;
  color: #dcc8a9;
  font-family: 'Gravitas One', Georgia, serif;
  font-size: 18px;
  font-weight: bold;
  padding: 16px 48px;
  margin-top: 1rem;
  border-radius: 4px;
  outline: 1px solid black;
  outline-offset: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 1px;
}
.primary-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 30px rgba(139,115,85,0.5);
  background: linear-gradient(135deg, #8a0000, #9a0000);
}

/* Conductor selector on start screen */
#conductor-select {
  border: 1px solid rgba(200, 160, 80, 0.3);
  border-radius: 6px;
  padding: 24px 24px;
  margin-top: 28px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(26, 20, 14, 0.6);
}

#conductor-select legend {
  font-size: 1.5rem;
  background: rgba(26, 20, 14);
  color: tan;
  padding:0.5rem;
}

#conductor-select label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

#conductor-select label:hover {
  background: rgba(200, 160, 80, 0.12);
  color: #dcc8a9;
}

#conductor-select input[type="radio"] {
  accent-color: #d4a843;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

#conductor-select input[type="radio"]:checked + span,
#conductor-select label:has(input:checked) {
  color: #e8d8b8;
}

.hidden { display: none !important; }

/* Pause overlay — semi-transparent so the game is still visible behind */
#generic-overlay {
  background: rgba(2, 2, 2, 0.9);
  backdrop-filter: blur(4px);
}

/* Generic overlay inner wrapper */
.overlay-content {
  outline: 1px solid white;
  outline-offset: 1px;
  padding: 2rem 0;
  background: #f0efe9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 800px;
  width: 90%;
}

/* Close button spacing */
.overlay-close-btn {
  margin-top: 8px;
}

/* Debug Interstitial Tester */
#debug-interstitial-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 200;
  width: 32px;
  height: 32px;
  background: rgba(26, 20, 14, 0.7);
  border: 1px solid rgba(200, 160, 80, 0.3);
  border-radius: 4px;
  color: #a89878;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.2s;
  line-height: 1;
  pointer-events: auto;
}

#debug-interstitial-btn:hover {
  opacity: 1;
}

#debug-interstitial-menu {
  position: absolute;
  top: 44px;
  right: 8px;
  z-index: 200;
  background: rgba(26, 20, 14, 0.95);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(200, 160, 80, 0.3);
  border-radius: 6px;
  padding: 8px 0;
  min-width: 200px;
  max-height: 70vh;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
}

.debug-interstitial-header {
  padding: 4px 14px 8px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8a7a5a;
  border-bottom: 1px solid rgba(200, 160, 80, 0.15);
  margin-bottom: 4px;
}

.debug-interstitial-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 14px;
  background: none;
  border: none;
  color: #d4c4a4;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}

.debug-interstitial-item:hover {
  background: rgba(200, 160, 80, 0.15);
  color: #ffd700;
}

/* Overlay responsive overrides */
@media (max-width: 700px) {
  .overlay-screen h1 { font-size: 32px; }
  .overlay-screen .instructions { font-size: 13px; }
  .overlay-card-body { font-size: 14px; max-height: 40vh; }
}
