/* Module Showcase Styles */
.module-showcase {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  border-radius: 24px;
  overflow: hidden;
}

.module-gui-wrapper {
  position: relative;
  width: 100%;
  border-radius: 24px 24px 24px 34px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
  background: #05030a;
}

.module-showcase.is-active .module-gui-wrapper {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}

.module-main-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
  transition:
    opacity 220ms ease,
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 320ms ease;
  transform-origin: center;
  will-change: opacity, transform, filter;
}

.gui-hotspot-layer,
.gui-category-nav {
  position: absolute;
  inset: 0;
}

.gui-hotspot-layer {
  z-index: 10;
  pointer-events: none;
  transition:
    opacity 220ms ease,
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 320ms ease;
  transform-origin: center;
  will-change: opacity, transform, filter;
}

.gui-category-nav {
  z-index: 6;
  pointer-events: none;
}

.gui-category-hitbox {
  position: absolute;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  border-radius: 22px;
  cursor: pointer;
  pointer-events: auto;
}

.gui-category-hitbox:focus-visible {
  outline: 2px solid rgba(167, 139, 250, 0.9);
  outline-offset: 2px;
}

.module-gui-wrapper.is-switching .module-main-image,
.module-gui-wrapper.is-switching .gui-hotspot-layer {
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  filter: blur(7px);
}

.module-video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 5, 20, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  box-sizing: border-box;
  opacity: 0;
  transform: translateX(-100%);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

.module-showcase.is-active .module-video-container {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.module-video-panel {
  width: 100%;
  height: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.module-video-toolbar {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.module-video-actions {
  display: inline-flex;
  gap: 10px;
}

.module-video-frame {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  border-radius: inherit;
  overflow: hidden;
  background: rgba(6, 6, 10, 0.98);
  border: none;
  box-shadow: none;
}

.module-video-frame.has-video .video-empty-state {
  opacity: 0;
  pointer-events: none;
}

.module-video-frame.has-video .module-video {
  opacity: 1;
}

.module-video-frame:fullscreen {
  border-radius: 0;
  border: 0;
}

.module-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
  opacity: 0;
  transition: opacity 180ms ease;
}

.video-empty-state {
  position: absolute;
  inset: 0;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  display: grid;
  place-items: center;
  align-items: center;
  gap: 14px;
  padding: 22px;
  text-align: center;
  transition: opacity 180ms ease;
}

.video-icon {
  width: 42px;
  height: 42px;
  color: rgba(255,255,255,0.4);
}

#video-module-name {
  color: #fff;
  font-weight: 700;
  font-size: 1.06rem;
  line-height: 1.2;
}

.expand-video-btn,
.close-video-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s ease;
}

.expand-video-btn:hover,
.close-video-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.expand-video-btn svg,
.close-video-btn svg {
  width: 18px;
  height: 18px;
}

.expand-video-btn:disabled {
  opacity: 0.42;
  cursor: default;
  transform: none;
}

/* Hotspots */
.gui-hotspot {
  position: absolute;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 10;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
}

.hotspot-pulse {
  width: 18px;
  height: 18px;
  background: rgba(167, 139, 250, 0.85);
  border: none;
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(167, 139, 250, 0.6);
  transition: all 0.3s ease;
}

.gui-hotspot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(167, 139, 250, 0.8);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: hotspotPulse 2s infinite;
}

@keyframes hotspotPulse {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

.gui-hotspot:hover .hotspot-pulse {
  transform: scale(1.1);
  border-color: #fff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.8), inset 0 0 15px rgba(255, 255, 255, 0.6);
}

/* Custom Video Controls */
.custom-video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px 24px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 20;
}

.module-video-frame.has-video:hover .custom-video-controls {
  opacity: 1;
}

.custom-video-controls.is-audio-locked #mute-btn {
  display: none;
}

.control-btn {
  background: transparent;
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
  padding: 0;
}

.control-btn:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

.control-btn svg {
  width: 20px;
  height: 20px;
}

.video-timeline-container {
  flex: 1;
  height: 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.video-timeline {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.video-progress {
  height: 100%;
  width: 0%;
  background: var(--accent-primary, #a78bfa);
  border-radius: 2px;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.video-time {
  color: #fff;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  min-width: 80px;
  text-align: center;
}
