/* General Styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;           /* verhindert horizontales Scrollen im Notfall */
}

/* Button Primary Styles */
.btn-primary {
  transition: all 0.2s ease-in-out;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:disabled {
  background-color: #1E40AF; /* Tailwind's bg-blue-700 */
  opacity: 0.8;
  cursor: not-allowed;
}

/* Pannellum Container */
.pannellum-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.hotspot-jump-button {
  cursor: pointer;
  transition: transform 0.2s;
}
.hotspot-jump-button:hover {
  transform: scale(1.1);
}
.video-hotspot {
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Map Styles */
#map {
  width: 100%;
  height: 100%;
  min-height: 320px;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s ease-in-out;
}

.modal.active {
  display: flex;
}

.modal-content {
  margin: auto;
  width: 100%;
  height: 100%;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2.5rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  transition: color 0.2s ease;
}

.close-modal:hover {
  color: #60A5FA;
}

#loginModal {
  background-color: rgba(0, 0, 0, 0.5);
}

#loginForm {
  max-width: 400px;
}

#pictureModal .modal-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

#modalImage {
  max-width: 90%;
  max-height: 90%;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Hotspot Styles */
.hotspot {
  background-color: blue;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
}

.hotspot-picture {
  background-image: url('https://itfourall.com/krimi/img/tafel.png');
  background-size: cover;
  background-position: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}

.hotspot-picture:hover {
  opacity: 0.8;
}

.hotspot-scene {
  background-color: rgba(0, 128, 255, 0.8);
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
}

.hotspot-jump-button {
  background-color: #ff4500;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hotspot-jump-button.wien-hotspot {
  background-color: #ff0000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hotspot-scene:hover, .hotspot-jump-button:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Test Button Styles */
.test-button, .test-button-green {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  background-color: #3b82f6;
  color: white;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.test-button:hover, .test-button-green:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.test-button.clicked {
  background-color: #9ca3af !important;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.test-button-green.clicked {
  background-color: #059669 !important;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Hidden Class */
.hidden {
  display: none;
}

/* Secret Div Animation */
#secretDiv, #secretDiv2, #secretDiv3 {
  animation: fadeIn 0.3s ease-in-out;
}

/* Touch Action for Panorama and Image Modal */
#panorama_5, #modalPanorama {
  touch-action: pinch-zoom;
}

#imageModal {
  touch-action: pinch-zoom;
  overflow: visible;
}

/* Leaflet Attribution */
.leaflet-control-attribution {
  font-size: 8px;
  color: #bbb;
  background: rgba(255, 255, 255, 0.0);
  padding: 1px 3px;
  border-radius: 2px;
  position: absolute;
  bottom: 2px;
  right: 2px;
  z-index: 1000;
  opacity: 0.7;
}

.leaflet-control-attribution a {
  color: #999;
  text-decoration: none;
}

.leaflet-control-attribution a:hover {
  color: #777;
}

/* ────────────────────────────────────────────────
   NEUE / VERBESSERTE REGELN für maximale Textbreite
   bei solved-Divs und Rätsel-Boxen
───────────────────────────────────────────────── */

.container-box {
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  box-sizing: border-box;
}

/* Alle solved-Divs (füge bei Bedarf neue IDs hinzu) */
#solved_1, #solved_2, #solved_3, #solved_4, #solved_5, #solved_8,
#solved_6, #solved_7, #solved_9, #solved_10 {
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 1.5rem 0.75rem;
  box-sizing: border-box;
}

/* Die Rätsel-Box innen – minimaler Rand */
.rätsel-box {
  max-width: 100%;
  margin: 0;
  padding: 1.25rem 1rem;
  border-width: 3px;
  box-sizing: border-box;
}

/* Der Text selbst – maximale Breite + Umbruch-Sicherheit */
.rätsel-box p {
  max-width: 100%;
  margin: 0;
  padding: 0 0.5rem;
  font-size: 1.125rem;
  line-height: 1.48;
  hyphens: auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
  text-align: left;               /* oft besser lesbar bei langen Texten */
}

/* Auf sehr schmalen Displays (Smartphones) noch mehr optimieren */
@media only screen and (max-width: 640px) {
  .container-box {
    padding-left: 0.4rem;
    padding-right: 0.4rem;
  }

  #solved_1, #solved_2, #solved_3, #solved_4, #solved_5, #solved_8,
  #solved_6, #solved_7, #solved_9, #solved_10 {
    padding: 1.25rem 0.5rem;
  }

  .rätsel-box {
    padding: 1rem 0.75rem;
    border-width: 2px;
  }

  .rätsel-box p {
    font-size: 1.05rem;
    padding: 0 0.25rem;
    text-align: left;
  }
}

/* Überschrift etwas kleiner → mehr Platz für Text */
.rätsel-box h4 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  padding: 0 0.5rem;
}

/* Responsive Adjustments for Smartphones (bestehender Block – unverändert) */
@media only screen and (max-width: 600px) {
  .hotspot, .hotspot-scene, .hotspot-jump-button, .hotspot-jump-button.wien-hotspot {
    padding: 20px 40px;
    font-size: 28px;
    border-radius: 12px;
  }

  .hotspot-picture {
    width: 60px;
    height: 60px;
  }

  .test-button, .test-button-green {
    padding: 15px;
    font-size: 20px;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
  }

  .test-buttons-container {
    flex-wrap: wrap;
    gap: 1rem;
  }

  #modalImage {
    max-width: 95%;
    max-height: 95%;
  }
}

/* Optional - verbessert die Optik des Toggles */
#toggle-instructions:hover .group-hover\:text-blue-700 {
  color: #1d4ed8;
}

#toggle-instructions:active {
  transform: translateY(1px);
}

#toggle-instructions:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Pfeil etwas größer und smoother */
#toggle-icon {
  transition: transform 0.35s ease;
}