/* ====================================================
   ALCHEMY LAB 49 — Mystisches Labor CSS
   ==================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Crimson+Pro:ital,wght@0,300;0,400;1,300;1,400&display=swap');

:root {
  --al-violet:   #581c87;
  --al-gold:     #fbbf24;
  --al-emerald:  #059669;
  --al-black:    #1c1917;
  --al-dark:     #0c0a09;
  --al-fog:      rgba(251,191,36,0.08);
  --al-glow:     rgba(251,191,36,0.35);
}

.alchemy-lab-49-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
  cursor: grab;
  user-select: none;
  font-family: 'Crimson Pro', serif;
}
.alchemy-lab-49-wrapper:active { cursor: grabbing; }

/* Canvas */
.alchemy-lab-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* HUD overlay */
.alchemy-hud {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  z-index: 10;
}
.alchemy-hud-title {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 13px;
  color: var(--al-gold);
  text-shadow: 0 0 12px rgba(251,191,36,0.8), 0 0 24px rgba(251,191,36,0.4);
  letter-spacing: 0.12em;
}
.alchemy-hud-hint {
  font-size: 10px;
  color: rgba(251,191,36,0.5);
  margin-top: 4px;
  letter-spacing: 0.08em;
}

/* Collection button */
.alchemy-collection-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(88,28,135,0.7);
  border: 1px solid var(--al-gold);
  border-radius: 20px;
  padding: 6px 14px;
  color: var(--al-gold);
  font-size: 13px;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(6px);
  transition: background 0.2s, box-shadow 0.2s;
}
.alchemy-collection-btn:hover {
  background: rgba(88,28,135,0.95);
  box-shadow: 0 0 16px var(--al-glow);
}
.collection-count {
  font-family: 'Cinzel Decorative', cursive;
  font-size: 11px;
  background: var(--al-gold);
  color: var(--al-black);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* ── LIGHTBOX ── */
.alchemy-lightbox {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(12,10,9,0.88);
  backdrop-filter: blur(4px);
}
.lightbox-content {
  position: relative;
  z-index: 1;
  background: linear-gradient(160deg, #2d1b4e 0%, #1c1917 60%, #0d2e1a 100%);
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: 8px;
  padding: 32px 28px 24px;
  max-width: 480px;
  width: calc(100% - 32px);
  box-shadow: 0 0 60px rgba(88,28,135,0.5), inset 0 0 40px rgba(0,0,0,0.4);
  animation: lightboxIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes lightboxIn {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.lightbox-symbol {
  text-align: center;
  font-size: 44px;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 12px var(--al-gold));
}
.lightbox-img-wrap {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid rgba(251,191,36,0.25);
  margin-bottom: 16px;
  background: rgba(0,0,0,0.4);
}
.lightbox-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lightbox-title {
  font-family: 'Cinzel Decorative', cursive;
  color: var(--al-gold);
  font-size: 18px;
  margin: 0 0 8px;
  text-align: center;
  text-shadow: 0 0 16px rgba(251,191,36,0.6);
}
.lightbox-desc {
  color: rgba(251,191,36,0.7);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  margin: 0 0 16px;
  font-style: italic;
}
.lightbox-secret-wrap,
.lightbox-collect-wrap {
  text-align: center;
  margin-bottom: 10px;
}
.lightbox-secret-btn,
.lightbox-collect-btn,
.collection-export-btn {
  background: transparent;
  border: 1px solid var(--al-gold);
  color: var(--al-gold);
  font-family: 'Crimson Pro', serif;
  font-size: 14px;
  padding: 7px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  letter-spacing: 0.05em;
}
.lightbox-secret-btn:hover,
.lightbox-collect-btn:hover,
.collection-export-btn:hover {
  background: rgba(251,191,36,0.15);
  box-shadow: 0 0 12px var(--al-glow);
}
.lightbox-secret {
  margin-top: 10px;
  color: var(--al-emerald);
  font-style: italic;
  font-size: 13px;
  line-height: 1.5;
  padding: 8px 12px;
  border-left: 2px solid var(--al-emerald);
  text-align: left;
  animation: fadeIn 0.4s ease;
}
@keyframes fadeIn { from { opacity:0; transform: translateY(4px); } to { opacity:1; transform: none; } }

.lightbox-close {
  position: absolute;
  top: 10px; right: 12px;
  background: none;
  border: none;
  color: rgba(251,191,36,0.5);
  font-size: 18px;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}
.lightbox-close:hover { color: var(--al-gold); }

/* ── COLLECTION MODAL ── */
.alchemy-collection-modal {
  position: absolute;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.collection-overlay {
  position: absolute;
  inset: 0;
  background: rgba(12,10,9,0.92);
  backdrop-filter: blur(6px);
}
.collection-content {
  position: relative;
  z-index: 1;
  background: linear-gradient(160deg, #1a0d2e 0%, #1c1917 100%);
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: 8px;
  padding: 28px;
  max-width: 560px;
  width: calc(100% - 32px);
  max-height: calc(100% - 40px);
  overflow-y: auto;
  box-shadow: 0 0 80px rgba(88,28,135,0.5);
  animation: lightboxIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.collection-content h2 {
  font-family: 'Cinzel Decorative', cursive;
  color: var(--al-gold);
  font-size: 16px;
  text-align: center;
  margin: 0 0 20px;
  text-shadow: 0 0 16px rgba(251,191,36,0.6);
}
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.collection-item {
  background: rgba(88,28,135,0.25);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: 6px;
  padding: 12px 8px;
  text-align: center;
}
.collection-item-symbol { font-size: 28px; margin-bottom: 4px; }
.collection-item-title  { font-family: 'Cinzel Decorative', cursive; font-size: 9px; color: var(--al-gold); }
.collection-close {
  position: absolute;
  top: 10px; right: 12px;
  background: none; border: none;
  color: rgba(251,191,36,0.5);
  font-size: 18px; cursor: pointer;
  transition: color 0.2s;
}
.collection-close:hover { color: var(--al-gold); }
.collection-empty {
  color: rgba(251,191,36,0.4);
  font-style: italic;
  text-align: center;
  padding: 20px 0;
}

/* Scrollbar */
.collection-content::-webkit-scrollbar { width: 4px; }
.collection-content::-webkit-scrollbar-track { background: transparent; }
.collection-content::-webkit-scrollbar-thumb { background: rgba(251,191,36,0.3); border-radius: 2px; }

/* Tooltip */
.alchemy-tooltip {
  position: absolute;
  background: rgba(88,28,135,0.95);
  border: 1px solid rgba(251,191,36,0.4);
  color: var(--al-gold);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 50;
  max-width: 200px;
  line-height: 1.4;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

/* Responsive */
@media (max-width: 600px) {
  .alchemy-hud-title { font-size: 11px; }
  .lightbox-content  { padding: 24px 16px 18px; }
  .lightbox-title    { font-size: 15px; }
}
