/**
 * Duskara — densidade visual: partículas, profundidade, ornamento.
 */

.dsk-ambient-root {
  position: relative;
  isolation: isolate;
}

.dsk-ambient-root::before,
.dsk-ambient-root::after {
  content: '';
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 0;
}

.dsk-ambient-root > * {
  position: relative;
  z-index: 1;
}

/* Partículas leves no viewport principal */
.dsk-main-view::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(212, 175, 55, 0.5), transparent),
    radial-gradient(1px 1px at 80% 40%, rgba(139, 92, 246, 0.45), transparent),
    radial-gradient(1.5px 1.5px at 50% 80%, rgba(74, 222, 128, 0.35), transparent),
    radial-gradient(1px 1px at 30% 60%, rgba(255, 255, 255, 0.25), transparent);
  animation: dsk-drift-particles 48s linear infinite;
}

@keyframes dsk-drift-particles {
  0% { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}

/* Divisória ornamental */
.dsk-ornament-divider {
  height: 1px;
  margin: 0.75rem 0;
  border: none;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(212, 175, 55, 0.35) 20%,
    rgba(139, 92, 246, 0.4) 50%,
    rgba(212, 175, 55, 0.35) 80%,
    transparent
  );
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.15);
}

/* Glow respirando */
.dsk-breathe-glow {
  animation: dsk-breathe-glow 4s ease-in-out infinite;
}

@keyframes dsk-breathe-glow {
  0%, 100% {
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.15);
  }
  50% {
    box-shadow: 0 0 22px rgba(212, 175, 55, 0.28);
  }
}

/* Cards com profundidade */
.dsk-card-depth {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: linear-gradient(145deg, rgba(18, 14, 28, 0.88), rgba(8, 6, 14, 0.92));
  border: 1px solid rgba(139, 92, 246, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 32px rgba(0, 0, 0, 0.45);
}

/* Cenas de NPC */
.dsk-npc-scene {
  position: relative;
  padding: 0.75rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.2);
  background: linear-gradient(165deg, rgba(14, 12, 22, 0.95), rgba(8, 6, 12, 0.98));
}

.dsk-npc-scene::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}

.dsk-npc-scene > * {
  position: relative;
  z-index: 1;
}

.dsk-npc-scene--farm::before {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(74, 222, 128, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 80%, rgba(212, 175, 55, 0.08), transparent 50%);
}

.dsk-npc-scene--farm::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 15% 30%, rgba(74, 222, 128, 0.4), transparent),
    radial-gradient(1px 1px at 70% 60%, rgba(212, 175, 55, 0.35), transparent);
  animation: dsk-drift-particles 32s linear infinite;
  opacity: 0.4;
  z-index: 0;
}

.dsk-npc-scene-head {
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(74, 222, 128, 0.2);
}

/* Podium cinematográfico */
.dsk-rank-podium-slot--1 {
  animation: dsk-podium-breathe 5s ease-in-out infinite;
}

@keyframes dsk-podium-breathe {
  0%, 100% {
    box-shadow: 0 0 24px rgba(212, 175, 55, 0.2);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 0 36px rgba(212, 175, 55, 0.38);
    transform: translateY(-3px);
  }
}

.dsk-rank-podium-slot--1 .dsk-rank-podium-avatar {
  animation: dsk-podium-ring 6s ease-in-out infinite;
}

@keyframes dsk-podium-ring {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .dsk-main-view::after,
  .dsk-npc-scene--farm::after,
  .dsk-npc-scene--smith::after,
  .dsk-npc-scene--merchant::after,
  .dsk-breathe-glow,
  .dsk-rank-podium-slot--1,
  .dsk-rank-podium-slot--1 .dsk-rank-podium-avatar {
    animation: none;
  }
}

.dsk-npc-scene--smith::before {
  background:
    radial-gradient(ellipse 70% 55% at 50% 100%, rgba(249, 115, 22, 0.22), transparent 60%),
    radial-gradient(ellipse 40% 30% at 20% 20%, rgba(251, 191, 36, 0.1), transparent 50%);
}

.dsk-npc-scene--smith::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 25% 70%, rgba(249, 115, 22, 0.55), transparent),
    radial-gradient(1px 1px at 60% 40%, rgba(251, 191, 36, 0.45), transparent);
  animation: dsk-drift-particles 18s linear infinite;
  opacity: 0.55;
  z-index: 0;
}

.dsk-npc-scene--smith .dsk-npc-scene-head {
  border-bottom-color: rgba(249, 115, 22, 0.25);
}

.dsk-npc-scene--merchant::before {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(212, 175, 55, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(239, 68, 68, 0.1), transparent 50%);
}

.dsk-npc-scene--merchant::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 40% 35%, rgba(251, 191, 36, 0.5), transparent),
    radial-gradient(1px 1px at 75% 65%, rgba(239, 68, 68, 0.35), transparent);
  animation: dsk-drift-particles 24s linear infinite;
  opacity: 0.45;
  z-index: 0;
}

.dsk-npc-scene--merchant .dsk-npc-scene-head {
  border-bottom-color: rgba(212, 175, 55, 0.25);
}

.dsk-season-host {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.dsk-season-board {
  padding: 0.75rem;
}

.dsk-rank-mode-tabs {
  margin-bottom: 0.65rem;
}
