/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0a0a;
  --bg-elevated: #111111;
  --bg-card: #0d0d0d;
  --bg-hover: #1a1a1a;
  --text: #ffffff;
  --text-muted: #888888;
  --text-dim: #555555;
  --accent: #ffffff;
  --accent-dim: #cccccc;
  --accent-glow: rgba(255, 255, 255, 0.15);
  --border: #222222;
  --border-hover: #ffffff;
  --header-height: 56px;
  --carousel-height: 140px;
  --card-size: 100px;
  --radius: 0;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  /* Align with info panel text (panel left: 1rem + padding: 1.25rem = 2.25rem) */
  padding-left: 0.75rem;
}

.logo-icon {
  color: var(--text);
  flex-shrink: 0;
}

.logo {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
}

.info-btn {
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.75rem;
  font-style: italic;
  font-family: Georgia, serif;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.info-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.room-title {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 400;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-link {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color var(--transition);
}

.header-link:hover {
  color: var(--text);
}

/* Scene Container */
.scene-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* 3D Viewer Canvas */
#viewer-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Interaction Hint - Pulsing Circle */
.interaction-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.interaction-hint.visible {
  opacity: 1;
}

.interaction-hint.hidden {
  opacity: 0;
  pointer-events: none;
}

.pulse-circle {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  position: relative;
  animation: pulse 2s ease-in-out infinite;
}

.pulse-circle::before,
.pulse-circle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  width: 100%;
  height: 100%;
  animation: pulse-ring 2s ease-in-out infinite;
}

.pulse-circle::after {
  animation-delay: 0.5s;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

@keyframes pulse-ring {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0;
  }
}

/* Controls Hint */
.controls-hint {
  position: absolute;
  bottom: calc(var(--carousel-height) + 3rem);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 10;
}

.controls-hint .key {
  background: var(--bg-elevated);
  padding: 0.125rem 0.5rem;
  border-radius: 3px;
  margin-right: 0.25rem;
  color: var(--text);
}

/* Empty State */
.empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 100px;
  background: var(--bg);
  pointer-events: none;
}

.empty-state.hidden {
  display: none;
}

.empty-content {
  text-align: center;
}

.empty-icon {
  color: #ffffff;
  margin-bottom: 2rem;
}

.empty-icon svg {
  width: 142px;
  height: 80px;
}

.empty-content h2 {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
}

.empty-content p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Loading Overlay */
.loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.9);
  gap: 1rem;
  z-index: 10;
}

.loading-overlay.hidden {
  display: none;
}

.spinner {
  position: relative;
  width: 56px;
  height: 56px;
}

.spinner::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid var(--border);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

#loading-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text);
}

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


/* Room Info Panel */
.room-info-panel {
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 320px;
  max-height: calc(100% - 2rem);
  background: rgba(17, 17, 17, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-y: auto;
  z-index: 50;
  backdrop-filter: blur(10px);
}

.room-info-panel.hidden {
  display: none;
}

.room-info-panel.collapsed .info-description,
.room-info-panel.collapsed .info-meta,
.room-info-panel.collapsed .view-toolbar {
  display: none;
}

.room-info-panel.collapsed {
  cursor: pointer;
}

.room-info-panel.collapsed:hover {
  background: rgba(17, 17, 17, 1);
}

.room-info-panel.collapsed .info-close {
  transform: rotate(-90deg);
}

.info-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 20px;
  height: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: transform 0.2s ease;
}

.info-close:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.room-info-panel h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  padding-right: 2rem;
}

.info-architect {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-bottom: 1rem;
}

.info-architect a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.info-architect a:hover {
  color: var(--text);
  text-decoration: underline;
}

.info-description {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.info-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.info-series,
.info-slots,
.info-cc0 {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  background: var(--bg);
  white-space: nowrap;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent-dim);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

/* Carousel Container */
.carousel-container {
  position: absolute;
  bottom: 2rem;
  left: 0;
  right: 0;
  height: var(--carousel-height);
  background: transparent;
  display: flex;
  flex-direction: column;
  z-index: 100;
  pointer-events: none;
}

.carousel-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 0 1.5rem 0.5rem;
  pointer-events: auto;
  /* Prevent layout shift by keeping consistent height */
  flex-shrink: 0;
}

.carousel-filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.series-tags-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex: 1;
  position: relative;
}

.series-tags-wrapper.collapsed .series-tags {
  display: none;
}

.series-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex: 1;
}

.series-tags-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  white-space: nowrap;
}

.series-tags-toggle:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.series-tag {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.series-tag:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.series-tag.active {
  border-color: #ffffff;
  color: #ffffff;
}

.search-input,
.filter-select {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.75rem;
  transition: border-color var(--transition);
}

.search-input {
  width: 160px;
}

.search-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--accent);
}

.search-input::placeholder {
  color: var(--text-dim);
}

.carousel-nav {
  display: none;
}

/* Carousel Track */
.carousel-track-wrapper {
  flex: 1;
  overflow: visible;
  position: relative;
  pointer-events: auto;
}

.carousel-track {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 1.5rem;
  height: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  align-items: flex-end;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

/* Room Card (Carousel) */
.room-card {
  flex-shrink: 0;
  width: var(--card-size);
  height: var(--card-size);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.room-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.room-card.active {
  border-color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

.room-card-image {
  position: absolute;
  inset: 0;
  background: var(--bg-card);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.room-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.room-card:hover .room-card-image img {
  transform: scale(1.05);
}

.room-card-image .placeholder {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.room-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  z-index: 2;
  pointer-events: none;
}

.room-card:hover .room-card-info {
  opacity: 1;
  visibility: visible;
}

.room-card-name {
  font-size: 0.6875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-card-token {
  display: none;
}

/* Hidden utility */
.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    --carousel-height: 160px;
  }

  .header-center {
    display: none;
  }

  /* Hide header buttons on mobile */
  .header-right {
    display: none;
  }

  /* Keep info button visible on mobile */
  .info-btn {
    display: flex;
  }

  /* Hide panels on mobile */
  .right-panels {
    display: none !important;
  }

  /* Hide room info panel on mobile */
  .room-info-panel {
    display: none;
  }

  /* Collapse series tags by default on mobile (via JS) */
  .series-tags-wrapper {
    flex: 0;
  }

  .carousel-filters {
    flex-direction: row;
  }

  .search-input {
    width: 120px;
  }

  .room-card {
    width: 80px;
  }
}

@media (max-width: 480px) {
  :root {
    --header-height: 48px;
    --carousel-height: 140px;
  }

  /* Center header on mobile */
  .header {
    padding: 0 1rem;
    justify-content: center;
  }

  .header-left {
    padding-left: 0;
  }

  .logo {
    font-size: 1rem;
  }

  .carousel-header {
    padding: 0.5rem 1rem;
  }

  .carousel-track {
    padding: 0.5rem 1rem;
    gap: 0.5rem;
  }

  /* Square 1:1 ratio for thumbnails */
  .room-card {
    width: 70px;
    height: 70px;
  }

  .room-card-image {
    height: 70px;
  }

  .room-card-info {
    display: none;
  }

  /* Hide series tags toggle button on mobile */
  .series-tags-toggle {
    display: none;
  }

  /* Mobile-friendly About modal */
  .modal-content {
    margin: 1rem;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 2rem);
    padding: 1.25rem;
  }

  .about-modal-content {
    max-width: calc(100vw - 2rem);
  }

  .about-modal-content h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .about-modal-content p {
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
  }

  .about-modal-content .modal-actions {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .about-modal-content .modal-actions .btn {
    width: 100%;
    text-align: center;
  }

  /* Hide controls hint on mobile */
  .controls-hint {
    display: none !important;
  }
}

/* Scrollbar for info panel */
.room-info-panel::-webkit-scrollbar {
  width: 4px;
}

.room-info-panel::-webkit-scrollbar-track {
  background: transparent;
}

.room-info-panel::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* View Toolbar */
.view-toolbar {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.view-toolbar .btn {
  padding: 0.5rem 1rem;
  font-size: 0.6875rem;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.view-btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.view-btn:active {
  background: var(--border);
}

/* Right Panels Container */
.right-panels {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 240px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 50;
}

/* Base Panel Styles */
.panel {
  background: rgba(17, 17, 17, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.panel.hidden {
  display: none;
}

.panel.collapsed .panel-content {
  display: none;
}

.panel.collapsed .panel-header {
  border-bottom: none;
}

.panel.collapsed .panel-toggle {
  transform: rotate(-90deg);
}

/* Panel Header */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  user-select: none;
}

.panel-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

.panel-header > span:first-child {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.artwork-count {
  font-size: 0.6875rem;
  color: var(--text-muted);
  background: var(--bg);
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
}

/* Panel Toggle Button */
.panel-toggle {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.panel-toggle:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

/* Panel Content */
.panel-content {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 70vh;
  overflow-y: auto;
}

.panel-content::-webkit-scrollbar {
  width: 4px;
}

.panel-content::-webkit-scrollbar-track {
  background: transparent;
}

.panel-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* Scene Controls */
.scene-control {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.scene-control label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.scene-control input[type="color"] {
  width: 100%;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  padding: 2px;
}

.scene-control input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.scene-control input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 3px;
}

.scene-control input[type="range"] {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.scene-control input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
}

.scene-control input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
  border: none;
}

.view-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.25rem;
}

.scene-control .view-btn {
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all var(--transition);
}

.scene-control .view-btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.scene-control .view-btn:active {
  background: var(--border);
}

/* Model Stats */
.scene-stats {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.model-stats {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-item {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stat-item span {
  color: var(--text);
}

#wireframe-toggle {
  margin-top: 0.5rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all var(--transition);
  width: 100%;
}

#wireframe-toggle:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

#wireframe-toggle.active {
  border-color: #44ff88;
  color: #44ff88;
}

/* Artwork Grid */
.artwork-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  max-height: 156px; /* ~3 rows of thumbnails, then scroll */
  overflow-y: auto;
}

.artwork-grid::-webkit-scrollbar {
  width: 4px;
}

.artwork-grid::-webkit-scrollbar-track {
  background: transparent;
}

.artwork-grid::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.artwork-thumb {
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.artwork-thumb:hover {
  border-color: var(--border-hover);
  transform: scale(1.05);
}

.artwork-thumb.active {
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.artwork-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Empty state for artwork grid */
.artwork-empty {
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-align: center;
  padding: 1rem 1.5rem;
}

.artwork-empty.hidden {
  display: none;
}

/* Curation Controls - shown when artwork selected */
.curation-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.curation-controls.hidden {
  display: none;
}

.curation-control {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.curation-control label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.curation-control input[type="color"] {
  width: 100%;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  padding: 2px;
}

.curation-control input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.curation-control input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 3px;
}

.curation-control input[type="range"] {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  appearance: none;
  cursor: pointer;
}

.curation-control input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
}

.curation-control input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
  border: none;
}

.curation-actions {
  display: flex;
  gap: 0.5rem;
}

.transform-modes {
  display: flex;
  gap: 0.25rem;
}

.transform-mode {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all var(--transition);
}

.transform-mode:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.transform-mode.active {
  border-color: #ffffff;
  color: #ffffff;
}

.btn-danger {
  flex: 1;
  background: transparent;
  color: #ff4444;
  border: 1px solid #ff4444;
}

.btn-danger:hover {
  background: rgba(255, 68, 68, 0.1);
}

/* Export Button */
.export-btn {
  position: absolute;
  bottom: calc(var(--carousel-height) + 3rem);
  right: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 50;
}

.export-btn:hover {
  background: var(--accent-dim);
}

.export-btn.hidden {
  display: none;
}

/* Drop Zone */
.drop-zone {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 255, 136, 0.1);
  border: 3px dashed var(--accent);
  z-index: 200;
  pointer-events: none;
}

.drop-zone.hidden {
  display: none;
}

.drop-zone-content {
  background: rgba(10, 10, 10, 0.9);
  padding: 2rem 3rem;
  border-radius: var(--radius);
}

.drop-zone-content span {
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

/* Header Buttons */
#add-artwork-btn {
  margin-right: 0;
}

#export-btn {
  margin-right: 0;
}

#export-btn:disabled {
  background: var(--bg-elevated);
  color: var(--text-dim);
  border: 1px solid var(--border);
  cursor: not-allowed;
}

#export-btn:disabled:hover {
  background: var(--bg-elevated);
}

/* Carousel Collapsed State */
.carousel-container.collapsed .carousel-header,
.carousel-container.collapsed .carousel-track-wrapper {
  display: none;
}

.carousel-collapsed {
  position: absolute;
  bottom: -1rem;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  padding: 0;
  padding-left: 1.5rem;
  padding-bottom: 0.5rem;
  pointer-events: auto;
}

.carousel-collapsed.hidden {
  display: none;
}

.collapsed-room {
  width: var(--card-size);
  height: var(--card-size);
  background: var(--bg-card);
  border: 1px solid #ffffff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

.collapsed-room img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-expand-btn {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all var(--transition);
}

.carousel-expand-btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
}
/* Tour Generator Section (inside Curation Panel) */
.tour-generator-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 2px solid var(--border);
}

.tour-generator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  margin: 0 -0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.recording-control {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.recording-control label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.duration-input-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.duration-input-group input[type="range"] {
  flex: 1;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  appearance: none;
  -webkit-appearance: none;
}

.duration-input-group input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
}

.duration-input-group input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
  border: none;
}

.duration-input-group span {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 3ch;
  text-align: right;
}

.tour-separator {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0;
}

.recording-actions {
  display: flex;
  gap: 0.25rem;
}

.recording-actions .btn {
  flex: 1;
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all var(--transition);
}

.recording-actions .btn:hover:not(:disabled) {
  border-color: var(--border-hover);
  color: var(--text);
}

.recording-actions .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* A-B Path Controls */
.ab-path-control {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.ab-path-control label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.ab-set-buttons,
.ab-action-buttons {
  display: flex;
  gap: 0.25rem;
}

.ab-set-buttons .btn,
.ab-action-buttons .btn {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all var(--transition);
}

.ab-set-buttons .btn:hover:not(:disabled),
.ab-action-buttons .btn:hover:not(:disabled) {
  border-color: var(--border-hover);
  color: var(--text);
}

.ab-set-buttons .btn:disabled,
.ab-action-buttons .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ab-set-buttons .btn.set {
  border-color: #44ff88;
  color: #44ff88;
}

.ab-set-buttons .btn.set:hover {
  border-color: #55ff99;
  color: #55ff99;
}

.recording-status {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid rgba(255, 0, 0, 0.3);
  border-radius: var(--radius);
}

.recording-status.hidden {
  display: none;
}

.recording-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
}

.recording-dot {
  width: 8px;
  height: 8px;
  background: #ff0000;
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

.recording-progress {
  display: flex;
  align-items: center;
  font-size: 0.75rem;
}

  gap: 0.75rem;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #ff0000;
  transition: width 0.1s linear;
}

.recording-progress span {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 5ch;
  text-align: right;
}

.btn-sm {
  padding: 0.5rem;
  font-size: 0.6875rem;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: rgba(17, 17, 17, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  backdrop-filter: blur(10px);
}

.modal-content h3 {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

.modal-content p {
  margin: 0 0 1.5rem 0;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: center;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.modal-actions .btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.modal-actions .btn:hover {
  border-color: var(--border-hover);
}

.modal-actions .btn-danger {
  background: transparent;
  color: #ff4444;
  border-color: #ff4444;
}

.modal-actions .btn-danger:hover {
  background: rgba(255, 68, 68, 0.1);
  border-color: #ffffff;
  color: #ffffff;
}

/* About Modal */
.about-modal-content {
  max-width: 500px;
  position: relative;
}

.about-modal-content .about-date {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.about-modal-content p {
  text-align: left;
  font-size: 0.9rem;
}

.about-modal-content .modal-actions {
  justify-content: center;
  margin-top: 1.5rem;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-close:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

/* Export Modal Specific Styles */
.export-modal-content {
  max-width: 400px;
  background: rgba(255, 0, 0, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 0, 0, 0.3);
}

.export-modal-content h3 {
  color: #ff4444;
}

.export-progress {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.75rem;
  background: rgba(255, 0, 0, 0.1);
  border-radius: var(--radius);
}

.export-progress .recording-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

.export-progress .recording-indicator span {
  color: #ff4444;
}

.export-progress .recording-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4444;
  animation: pulse 1.5s ease-in-out infinite;
}

.export-progress .recording-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.export-progress .recording-progress span {
  color: #ff4444;
}

.export-progress .progress-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 0, 0, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

.export-progress .progress-fill {
  height: 100%;
  background: #ff4444;
  border-radius: 4px;
  transition: width 0.1s linear;
}

.export-modal-content .modal-actions {
  justify-content: center;
  margin-top: 1rem;
}

.export-modal-content .modal-actions .btn-danger:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

/* Subtle tooltips */
[title] {
  position: relative;
  cursor: help;
}

[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 0.5rem;
  padding: 0.375rem 0.625rem;
  background: #111111;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  animation: tooltipFadeIn 0.2s ease-in-out 0.3s forwards;
  z-index: 1000;
}

[title]:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 0.25rem;
  border: 4px solid transparent;
  border-top-color: var(--border);
  pointer-events: none;
  opacity: 0;
  animation: tooltipFadeIn 0.2s ease-in-out 0.3s forwards;
  z-index: 1000;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
