/* General Game Template Styles */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;800&display=swap');

:root {
  --gt-primary: #4a90e2;
  --gt-secondary: #f39c12;
  --gt-bg-overlay: rgba(255, 255, 255, 0.85);
  /* Slightly more opaque for readability, user asked for 50% but text needs contrast. */
  --gt-text: #2c3e50;
  --gt-white: #ffffff;
  --gt-font: 'Poppins', sans-serif;
  --gt-z-index-overlay: 9999;
  --gt-z-index-menu: 10000;
  --gt-z-index-modal: 10001;
}

/* Global reset for template elements */
.gt-element {
  font-family: var(--gt-font);
  box-sizing: border-box;
}

/* 1. START OVERLAY */
#gt-start-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.3);
  /* Requested: more transparent */
  backdrop-filter: blur(5px);
  /* Adds a modern blur effect */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: var(--gt-z-index-overlay);
  transition: opacity 0.5s ease;
}

.gt-title-container {
  text-align: center;
  margin-bottom: 3rem;
  background: rgba(255, 255, 255, 0.8);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.gt-theme-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 0.5rem;
  letter-spacing: 2px;

}

.gt-game-title {
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(45deg, #2193b0, #6dd5ed);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.gt-play-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gt-play-btn:hover {
  transform: scale(1.1);
}

.gt-play-icon {
  width: 100px;
  height: 100px;
  background-color: var(--gt-primary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 20px rgba(74, 144, 226, 0.4);
  margin-bottom: 1rem;
}

.gt-play-icon::after {
  content: '';
  width: 0;
  height: 0;
  border-top: 20px solid transparent;
  border-bottom: 20px solid transparent;
  border-left: 35px solid white;
  margin-left: 10px;
}

.gt-play-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--gt-text);
}

/* 2. MENU BUTTON */
#gt-menu-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: var(--gt-primary);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: var(--gt-z-index-menu);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#gt-menu-btn:hover {
  transform: rotate(90deg);
}

/* HOTSPOT ANIMATION */
@keyframes gt-hotspot-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 144, 226, 0.7);
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }

  70% {
    box-shadow: 0 0 0 20px rgba(74, 144, 226, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(74, 144, 226, 0);
    transform: scale(1);
  }
}

.gt-hotspot-active {
  animation: gt-hotspot-pulse 2s infinite;
  background-color: var(--gt-secondary) !important;
  /* Make it orange/gold to stand out */
  border: 3px solid white;
}

.gt-hamburger-line {
  width: 30px;
  height: 4px;
  background-color: white;
  margin: 3px 0;
  border-radius: 2px;
}

/* 3. MENU LIST */
#gt-menu-list {
  position: fixed;
  bottom: 90px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: var(--gt-z-index-menu);
  pointer-events: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

#gt-menu-list.active {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.gt-menu-item {
  width: 50px;
  height: 50px;
  background-color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.2s;
  position: relative;
}

.gt-menu-item:hover {
  transform: scale(1.1);
  background-color: #f8f9fa;
}

.gt-menu-item svg {
  width: 24px;
  height: 24px;
  fill: var(--gt-text);
}

/* Tooltip for menu items */
.gt-menu-item::before {
  content: attr(data-tooltip);
  position: absolute;
  right: 60px;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.gt-menu-item:hover::before {
  opacity: 1;
}

/* 4. INFO MODAL */
#gt-info-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: var(--gt-z-index-modal);
  justify-content: center;
  align-items: center;
}

#gt-info-modal.active {
  display: flex;
}

.gt-modal-content {
  background-color: white;
  color: var(--gt-text);
  width: 800px;
  max-width: 90%;
  height: 600px;
  max-height: 90%;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.gt-modal-header {
  background-color: #2c3e50;
  color: white;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gt-modal-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0;
}

.gt-close-modal {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.gt-tabs {
  display: flex;
  background-color: #ecf0f1;
  border-bottom: 2px solid #bdc3c7;
}

.gt-tab-btn {
  flex: 1;
  padding: 1rem;
  border: none;
  background: none;
  font-size: 1.1rem;
  font-weight: 600;
  color: #7f8c8d;
  cursor: pointer;
  transition: all 0.3s;
}

.gt-tab-btn:hover {
  background-color: #dfe6e9;
  color: #2c3e50;
}

.gt-tab-btn.active {
  background-color: white;
  color: var(--gt-primary);
  border-bottom: 3px solid var(--gt-primary);
}

.gt-tab-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.gt-tab-content {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
  display: none;
  text-align: left;
}

.gt-tab-content.active {
  display: block;
}

.gt-tab-content h3 {
  color: var(--gt-primary);
  border-bottom: 2px solid #eee;
  padding-bottom: 0.5rem;
  margin-top: 0;
}

.gt-bib-list,
.gt-credit-list {
  list-style: none;
  padding: 0;
}

.gt-bib-list li,
.gt-credit-list li {
  margin-bottom: 1rem;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--gt-secondary);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .gt-modal-content {
    width: 95%;
    height: auto;
    max-height: 90vh;
    /* Ensure it fits on screen */
    border-radius: 12px;
  }

  .gt-modal-header {
    padding: 1rem;
  }

  .gt-modal-title {
    font-size: 1.25rem;
  }

  .gt-close-modal {
    font-size: 1.5rem;
  }

  .gt-tab-btn {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
  }

  .gt-tab-content {
    padding: 1rem;
  }

  /* Ensure scrollbar is visible/usable */
  .gt-tab-content::-webkit-scrollbar {
    width: 6px;
  }

  .gt-tab-content::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
  }

  /* Make tabs scrollable horizontally on mobile */
  .gt-tabs {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  /* Hide scrollbar for tabs but keep functionality if desired, 
     but standard behavior is often better for affordance. 
     We'll keep default scrollbar or style it minimally if needed. */
  .gt-tabs::-webkit-scrollbar {
    height: 4px;
  }

  .gt-tabs::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
  }

  .gt-tab-btn {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    flex: 0 0 auto;
    /* Allow buttons to take necessary width */
  }
}