/* ==========================================================================
   Mileniul Întunecat - Cinematic Ambient Placeholder Styles
   ========================================================================== */

:root {
  --color-bg: #040507;
  --color-gold: #d4af37;
  --color-gold-glow: rgba(212, 175, 55, 0.4);
  --color-ember: #ff7722;
  --color-text-primary: #ede8dc;
  --color-text-secondary: #a09a8a;
  --font-cinzel: 'Cinzel', serif;
  --font-body: 'Marcellus', 'Cinzel', serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================
   Scene Container & Perspective
   ========================================== */
.scene-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  perspective: 1200px;
  background: radial-gradient(circle at center, #0a0c12 0%, #030406 100%);
}

/* Blurred background for ultra-wide screens / aspect ratio fill */
.ambient-backdrop {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  background-size: cover;
  background-position: center;
  filter: blur(40px) brightness(0.25) saturate(1.2);
  transform: scale(1.1);
  z-index: 1;
  pointer-events: none;
}

/* Artwork container */
.artwork-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transform-style: preserve-3d;
  transition: transform 0.15s cubic-bezier(0.2, 0, 0.2, 1);
  will-change: transform;
}

/* Image with subtle breathing / Ken Burns drift */
.artwork-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  animation: kenBurns 28s ease-in-out infinite alternate;
  transform-origin: 52% 40%;
  filter: contrast(1.05) brightness(0.96) saturate(1.08);
}

@keyframes kenBurns {
  0% {
    transform: scale(1.0);
  }
  50% {
    transform: scale(1.035) translate(-0.6%, -0.4%);
  }
  100% {
    transform: scale(1.02) translate(0.5%, 0.3%);
  }
}

/* ==========================================
   Canvas Particles Layer
   ========================================== */
.particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* ==========================================
   Dynamic Torch Glow / Fire Light Reflections
   ========================================== */
.torch-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: screen;
  filter: blur(45px);
}

/* Castle gate fire / bonfire */
.torch-1 {
  bottom: 22%;
  left: 71%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 120, 30, 0.38) 0%, rgba(255, 60, 10, 0.15) 50%, transparent 80%);
  animation: flicker1 3.2s ease-in-out infinite;
}

/* Right tower torch */
.torch-2 {
  top: 18%;
  right: 11%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 140, 40, 0.32) 0%, rgba(255, 80, 20, 0.12) 60%, transparent 80%);
  animation: flicker2 2.6s ease-in-out infinite alternate;
}

/* Central tower torch */
.torch-3 {
  top: 26%;
  left: 64%;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(255, 110, 25, 0.35) 0%, rgba(255, 60, 10, 0.1) 60%, transparent 80%);
  animation: flicker3 3.8s ease-in-out infinite;
}

/* Hanging lantern near the gate */
.torch-4 {
  bottom: 29%;
  left: 69.5%;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255, 170, 50, 0.3) 0%, rgba(255, 90, 20, 0.08) 60%, transparent 80%);
  animation: flicker2 4.1s ease-in-out infinite alternate-reverse;
}

@keyframes flicker1 {
  0%, 100% { opacity: 0.75; transform: scale(0.98); }
  25% { opacity: 0.95; transform: scale(1.05); }
  50% { opacity: 0.65; transform: scale(0.95); }
  75% { opacity: 1.0; transform: scale(1.08); }
}

@keyframes flicker2 {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  30% { opacity: 1.0; transform: scale(1.06); }
  70% { opacity: 0.68; transform: scale(0.96); }
}

@keyframes flicker3 {
  0%, 100% { opacity: 0.7; transform: scale(0.96); }
  40% { opacity: 1.0; transform: scale(1.05); }
  85% { opacity: 0.75; transform: scale(0.98); }
}

/* Atmospheric Mist / Drifting Fog */
.mist-layer {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at bottom, rgba(160, 180, 210, 0.08) 0%, transparent 70%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 4;
  animation: mistPulse 14s ease-in-out infinite alternate;
}

@keyframes mistPulse {
  0% { opacity: 0.4; transform: translateY(0); }
  50% { opacity: 0.75; transform: translateY(-10px); }
  100% { opacity: 0.5; transform: translateY(5px); }
}

/* ==========================================
   Cinematic Vignette & Borders
   ========================================== */
.cinematic-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  background: radial-gradient(ellipse at 50% 50%, transparent 50%, rgba(4, 5, 8, 0.45) 80%, rgba(2, 3, 5, 0.92) 100%);
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.8);
}

.edge-shadows {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  background: linear-gradient(to bottom, rgba(3, 4, 6, 0.65) 0%, transparent 12%, transparent 85%, rgba(3, 4, 6, 0.85) 100%);
}

/* ==========================================
   UI Overlays & Auto-Fade
   ========================================== */
.ui-overlay {
  transition: opacity 0.8s cubic-bezier(0.2, 0, 0.2, 1);
  opacity: 1;
}

.ui-overlay.idle-hidden {
  opacity: 0.15;
}

.ui-overlay.idle-hidden:hover {
  opacity: 1;
}

/* Bottom Bar */
.bottom-overlay {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 24px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
  pointer-events: none;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: rgba(12, 15, 20, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffaa33;
  box-shadow: 0 0 10px #ffaa33, 0 0 20px #ff8800;
  animation: pulseIndicator 2.2s infinite ease-in-out;
}

@keyframes pulseIndicator {
  0%, 100% { opacity: 0.6; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.25); box-shadow: 0 0 15px #ffaa33, 0 0 28px #ff7700; }
}

.status-text {
  font-family: var(--font-cinzel);
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  color: #d8d3c5;
  text-transform: uppercase;
}

/* Control Buttons */
.controls-group {
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

.control-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(14, 18, 24, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 999px;
  color: #dfd8c7;
  font-family: var(--font-cinzel);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0, 0.2, 1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.control-btn:hover {
  background: rgba(26, 32, 44, 0.85);
  border-color: rgba(212, 175, 55, 0.6);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 16px rgba(212, 175, 55, 0.25);
}

.control-btn:active {
  transform: translateY(0);
}

.control-icon {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}

.hidden {
  display: none !important;
}

/* ==========================================
   Responsive adjustments
   ========================================== */
@media (max-width: 768px) {
  .top-nav {
    padding: 16px 20px;
  }
  
  .bottom-overlay {
    padding: 16px 20px;
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
  
  .status-badge {
    order: 2;
    padding: 8px 16px;
    font-size: 0.72rem;
  }
  
  .controls-group {
    order: 1;
  }

  .brand-crest {
    font-size: 0.75rem;
    padding: 6px 14px;
    margin: 0 auto;
  }
}
