/* Base Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  padding: 0;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  background: #1a1a1a;
  overflow: hidden;
}

/* Unity Container */
#unity-container {
  position: fixed;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#unity-canvas {
  width: 100%;
  height: 100%;
  background: #231F20;
  display: block;
}
#unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none }
#unity-logo { width: 128px; height: 128px; background: url('icons/icon-128x128.png') no-repeat center; background-size: contain; }
#unity-progress-bar-empty { margin-left: auto; margin-right: auto; width: 141px; height: 18px; margin-top: 10px; background: url('progress-bar-empty-dark.png') no-repeat center }
#unity-progress-bar-full { width: 0%; height: 18px; margin-top: 10px; background: url('progress-bar-full-dark.png') no-repeat center }
#unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }
#unity-footer { display: none; } /* Hide footer with build title and controls */

/* PWA Install Prompt */
.pwa-prompt {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.9));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 20px;
  z-index: 10000;
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.pwa-prompt.hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.pwa-prompt-content {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.pwa-prompt-icon {
  flex-shrink: 0;
}

.pwa-prompt-icon img {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.pwa-prompt-text {
  flex: 1;
  min-width: 200px;
  color: white;
}

.pwa-prompt-text h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  color: white;
}

.pwa-prompt-text p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.4;
}

.pwa-prompt-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.pwa-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  outline: none;
}

.pwa-btn-primary {
  background: #4CAF50;
  color: white;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.pwa-btn-primary:hover {
  background: #45a049;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.pwa-btn-primary:active {
  transform: translateY(0);
}

.pwa-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.pwa-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Offline Indicator */
.pwa-offline {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: #FF9800;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10001;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pwa-offline:not(.hidden) {
  transform: translateX(-50%) translateY(0);
}

.pwa-offline.hidden {
  transform: translateX(-50%) translateY(-100px);
  pointer-events: none;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .pwa-prompt {
    padding: 15px;
  }

  .pwa-prompt-content {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .pwa-prompt-icon img {
    width: 50px;
    height: 50px;
  }

  .pwa-prompt-text h3 {
    font-size: 16px;
  }

  .pwa-prompt-text p {
    font-size: 13px;
  }

  .pwa-prompt-buttons {
    width: 100%;
    flex-direction: column;
  }

  .pwa-btn {
    width: 100%;
    padding: 12px;
  }

  .pwa-offline {
    top: 10px;
    font-size: 13px;
    padding: 10px 20px;
  }
}

/* Tablet */
@media (min-width: 601px) and (max-width: 900px) {
  .pwa-prompt-content {
    gap: 12px;
  }

  .pwa-prompt-buttons {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Manual A2HS Guide Modal */
.manual-a2hs-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.manual-a2hs-modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.manual-a2hs-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 30px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  position: relative;
  color: white;
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.manual-a2hs-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.manual-a2hs-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.manual-a2hs-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.manual-a2hs-icon img {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.manual-a2hs-content h3 {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  color: white;
}

.manual-a2hs-description {
  text-align: center;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 24px;
  line-height: 1.5;
}

.manual-a2hs-steps-list {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px 20px 20px 40px;
  margin: 0;
  list-style-position: outside;
}

.manual-a2hs-steps-list li {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 12px;
  padding-left: 8px;
}

.manual-a2hs-steps-list li:last-child {
  margin-bottom: 0;
}

.manual-a2hs-steps-list li strong {
  color: white;
  font-weight: 600;
}

/* Mobile responsive for manual guide */
@media (max-width: 600px) {
  .manual-a2hs-content {
    padding: 25px 20px;
    max-width: 100%;
  }

  .manual-a2hs-content h3 {
    font-size: 20px;
  }

  .manual-a2hs-description {
    font-size: 14px;
  }

  .manual-a2hs-icon img {
    width: 64px;
    height: 64px;
  }

  .manual-a2hs-steps-list {
    padding: 16px 16px 16px 32px;
  }

  .manual-a2hs-steps-list li {
    font-size: 14px;
  }
}

/* Hide scrollbars */
body::-webkit-scrollbar {
  display: none;
}

body {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
