/* Museum Header & Scaling Controls */
:root {
  --museum-scale: 1.5;
}

body {
  margin: 0;
  padding: 0;
}

#museum-bar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100000;
  background: rgba(18, 18, 28, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.3;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  user-select: none;
}

.museum-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
}

.museum-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: #cbd5e1;
  white-space: nowrap;
}

.museum-badge {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.museum-author {
  color: #94a3b8;
  font-size: 12px;
}

.museum-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.museum-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.museum-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.museum-btn.active {
  background: #6366f1;
  border-color: #818cf8;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.museum-btn-toggle {
  margin-left: 6px;
}

/* Scaled canvas container */
#museum-stage {
  zoom: var(--museum-scale);
  transform-origin: top center;
  width: 100%;
}

/* Video Player Modal */
#museum-video-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.museum-video-box {
  background: #181824;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 16px;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #e2e8f0;
}

.museum-video-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.museum-video-title {
  font-size: 14px;
  font-weight: 600;
  color: #f1f5f9;
}

.museum-video-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

.museum-video-close:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.museum-video-player {
  width: 100%;
  border-radius: 4px;
  background: #000;
  display: block;
}

.museum-video-footer {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #94a3b8;
}

.museum-video-footer a {
  color: #818cf8;
  text-decoration: none;
}

.museum-video-footer a:hover {
  text-decoration: underline;
}

/* Mobile responsive layout */
@media (max-width: 600px) {
  .museum-bar-inner {
    padding: 8px 12px;
    gap: 8px;
  }
  .museum-title {
    font-size: 12px;
  }
  .museum-badge {
    font-size: 10px;
    padding: 2px 6px;
  }
  .museum-author {
    display: none;
  }
  .museum-controls {
    gap: 4px;
  }
  .museum-btn {
    padding: 4px 8px;
    font-size: 11px;
  }
}

/* CRT Scanline Overlay */
.crt-mode::after {
  content: " ";
  display: block;
  position: fixed;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
  z-index: 99999;
  background-size: 100% 2px, 3px 100%;
  pointer-events: none;
}

/* Keep images crisp under scaling */
#museum-stage img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
