/* Galactic Orbit Presenter – frontend.css */

/* ── Container ────────────────────────────────────────────────────────────── */
.gop-scene-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.gop-scene-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: block;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.gop-canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  position: absolute;
  inset: 0;
}

/* ── Loading indicator ────────────────────────────────────────────────────── */
.gop-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(0, 212, 255, 0.8);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  gap: 1rem;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.5s ease;
}

.gop-loading-ring {
  width: 44px;
  height: 44px;
  border: 2px solid rgba(0, 212, 255, 0.2);
  border-top-color: rgba(0, 212, 255, 0.9);
  border-radius: 50%;
  animation: gop-spin 0.9s linear infinite;
}

@keyframes gop-spin {
  to { transform: rotate(360deg); }
}

/* ── Tooltip ──────────────────────────────────────────────────────────────── */
.gop-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.72);
  color: #e0f7ff;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(0, 212, 255, 0.3);
  white-space: nowrap;
  z-index: 20;
  transform: translate(-50%, -100%);
  display: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ── Gyroscope button ─────────────────────────────────────────────────────── */
.gop-gyro-btn {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #00d4ff;
  border: 1px solid rgba(0, 212, 255, 0.4);
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 0.8rem;
  cursor: pointer;
  z-index: 30;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s;
}
.gop-gyro-btn:hover {
  background: rgba(0, 212, 255, 0.15);
}

/* ── WebGL Fallback ───────────────────────────────────────────────────────── */
.gop-fallback {
  position: absolute;
  inset: 0;
  background: #000011;
  align-items: flex-start;
  justify-content: center;
  z-index: 5;
  overflow-y: auto;
  padding: 2rem;
}
.gop-fallback-inner {
  width: 100%;
  max-width: 900px;
  color: #aaa;
  font-family: system-ui, sans-serif;
  text-align: center;
}
.gop-fallback-inner p {
  color: #666;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
.gop-fallback-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.gop-fallback-item {
  margin: 0;
}
.gop-fallback-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.gop-fallback-item figcaption {
  font-size: 0.75rem;
  color: #888;
  margin-top: 4px;
}

/* ── Lightbox ─────────────────────────────────────────────────────────────── */
.gop-lightbox {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.gop-lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 0;
  transition: opacity 0.3s ease;
}

.gop-lightbox-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 92vw;
  max-height: 90vh;
  gap: 1rem;
}

.gop-lightbox-close {
  position: absolute;
  top: -3rem;
  right: 0;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  padding: 0;
}
.gop-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}
.gop-lightbox-close svg { pointer-events: none; }

.gop-lightbox-image-wrap {
  max-width: 88vw;
  max-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gop-lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 0 60px rgba(0, 212, 255, 0.15), 0 20px 60px rgba(0, 0, 0, 0.6);
  display: block;
}

.gop-lightbox-caption {
  text-align: center;
  color: #ddd;
  font-family: system-ui, -apple-system, sans-serif;
  padding: 0 1rem;
}
.gop-lightbox-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #e0f7ff;
  margin: 0 0 0.25rem;
}
.gop-lightbox-desc {
  font-size: 0.85rem;
  color: #888;
  margin: 0;
  line-height: 1.5;
}

/* ── Screenshot Button ────────────────────────────────────────────────────── */
.gop-screenshot-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(0, 212, 255, 0.35);
  color: rgba(0, 212, 255, 0.85);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s, color 0.2s, transform 0.15s;
  padding: 0;
}
.gop-screenshot-btn:hover {
  background: rgba(0, 212, 255, 0.2);
  color: #fff;
  transform: scale(1.1);
}
.gop-screenshot-btn svg { pointer-events: none; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .gop-scene-container { height: 60vh; }
  .gop-lightbox-img { max-height: 60vh; }
}
@media (max-width: 1024px) and (min-width: 769px) {
  .gop-scene-container { height: 80vh; }
}
