/* ==========================================================================
   KAMASYLVIA REALM — THEME CSS
   Estética Élfica de Black Desert Online: Floresta Viva, Ouro e Esmeralda
   ========================================================================== */

/* ─── RESET E SELEÇÃO ─────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

p, blockquote, li {
  text-wrap: pretty;
}

::selection {
  background-color: rgba(245, 158, 11, 0.35);
  color: #fef08a;
}

/* ─── FUNDO PANORÂMICO DINÂMICO (IMAGENS REAIS DE KAMASYLVIA) ───────── */
#ambient-backdrop {
  overflow: hidden;
}

#fairy-canvas {
  z-index: 5;
  width: 100%;
  height: 100%;
  opacity: 0.92;
  mix-blend-mode: screen;
}

@media (prefers-reduced-motion: reduce) {
  #fairy-canvas {
    display: none;
  }
}

.bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 8s ease-out;
  filter: saturate(1.2) contrast(1.05) brightness(0.85);
}

.bg-slide.active {
  opacity: 1;
  transform: scale(1);
}

.bg-slide.bg-hero {
  background-image: url('../img/kamasylvia-fairies.jpg');
}

.bg-slide.bg-architecture {
  background-image: url('../img/grana-gazebo.jpg');
}

.bg-slide.bg-waterfalls {
  background-image: url('../img/kamasylvia-waterfalls.jpg');
}

.bg-slide.bg-stream {
  background-image: url('../img/forest-stream.jpg');
}

.bg-slide.bg-sunset {
  background-image: url('../img/kamasylve-sunset.jpg');
}

/* Vinheta Suave: Preserva a beleza das árvores e águas enquanto garante legibilidade */
.ambient-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(6, 20, 15, 0.3) 0%,
    rgba(4, 15, 11, 0.65) 65%,
    rgba(2, 9, 7, 0.9) 100%
  );
  pointer-events: none;
}

/* Raios de Sol Élficos (God Rays) */
.sun-god-rays {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, 0.12) 0%,
    rgba(16, 185, 129, 0.06) 40%,
    transparent 70%
  );
  pointer-events: none;
  animation: lightShift 12s ease-in-out infinite alternate;
}

@keyframes lightShift {
  0% {
    opacity: 0.6;
    transform: translateY(-2%) scale(1);
  }
  100% {
    opacity: 1;
    transform: translateY(2%) scale(1.03);
  }
}

/* ─── NAVBAR ÉLFICA ──────────────────────────────────────────────────── */
.navbar-kamasylve {
  background: rgba(6, 20, 15, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(16, 185, 129, 0.2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.nav-anchor {
  color: rgba(226, 232, 240, 0.85);
  transition: all 0.25s ease;
  position: relative;
  text-decoration: none;
  padding: 4px 0;
}

.nav-anchor::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #fbbf24, #10b981);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
  transition: width 0.3s ease;
  border-radius: 9999px;
}

.nav-anchor:hover {
  color: #fef08a;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.nav-anchor:hover::after,
.nav-anchor.active::after {
  width: 100%;
}

.mobile-nav-link {
  color: #e2e8f0;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.mobile-nav-link:hover {
  background: rgba(16, 185, 129, 0.15);
  color: #fbbf24;
}

/* ─── BOTÕES COM ACABAMENTO AAA ──────────────────────────────────────── */
.btn-kama-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 9999px;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  color: #061812;
  background: linear-gradient(135deg, #fbbf24 0%, #34d399 50%, #10b981 100%);
  background-size: 200% auto;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.45), 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.35s ease;
  text-decoration: none;
}

.btn-kama-primary:hover {
  background-position: right center;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.7), 0 12px 28px rgba(0, 0, 0, 0.5);
}

.btn-kama-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 9999px;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  color: #f1f5f9;
  background: rgba(6, 26, 19, 0.7);
  border: 1px solid rgba(251, 191, 36, 0.4);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.35s ease;
  text-decoration: none;
}

.btn-kama-secondary:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: #fbbf24;
  color: #fef08a;
  transform: translateY(-3px);
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.35);
}

.btn-kama-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 9999px;
  font-family: 'Fira Code', monospace;
  font-weight: 500;
  font-size: 0.825rem;
  color: rgba(226, 232, 240, 0.8);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-kama-ghost:hover {
  border-color: rgba(16, 185, 129, 0.6);
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  transform: translateY(-2px);
}

/* ─── CARDS COM VIDRO ÉLFICO (GLASSMORPHISM) ─────────────────────────── */
.kama-card {
  background: rgba(6, 26, 19, 0.68);
  border: 1px solid rgba(16, 185, 129, 0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.kama-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(7, 32, 23, 0.78);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 25px rgba(16, 185, 129, 0.18);
  transform: translateY(-4px);
}

/* Pills de Tecnologia */
.tech-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 9999px;
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  color: #fef08a;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  backdrop-filter: blur(6px);
  transition: all 0.25s ease;
}

.tech-pill:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #fbbf24;
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.badge-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-family: 'Fira Code', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Links de Ação dos Cards */
.card-action-link {
  display: inline-flex;
  align-items: center;
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: #34d399;
  text-decoration: none;
  transition: all 0.2s ease;
}

.card-action-link:hover {
  color: #fbbf24;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
  transform: translateX(3px);
}

/* ─── PIPELINE STEPS INTERATIVOS ─────────────────────────────────────── */
.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  transition: transform 0.3s ease;
}

.pipeline-step:hover {
  transform: translateY(-4px);
}

.pipeline-step:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 6px;
  border-radius: 8px;
}

.step-icon-box {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  border: 1.5px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.35s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.step-num {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  background: #061812;
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #fbbf24;
  font-family: 'Fira Code', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── TERMINAL CLI ───────────────────────────────────────────────────── */
.terminal-window {
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
}

#terminal-output {
  --scrollbar-thumb: rgba(16, 185, 129, 0.35);
  --scrollbar-track: transparent;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

@supports not (scrollbar-color: auto) {
  #terminal-output::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }

  #terminal-output::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
  }

  #terminal-output::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
  }
}

.cmd-pill {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cmd-pill:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #fbbf24;
  color: #fef08a;
  transform: translateY(-1px);
}

/* ─── FILTROS DE REPOSITÓRIOS ────────────────────────────────────────── */
.repo-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 9999px;
  font-family: 'Fira Code', monospace;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.85);
  background: rgba(6, 26, 19, 0.65);
  border: 1px solid rgba(16, 185, 129, 0.28);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.25s ease;
}

.repo-filter-btn:hover {
  border-color: rgba(251, 191, 36, 0.6);
  color: #fef08a;
  transform: translateY(-1px);
}

.repo-filter-btn.active {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(16, 185, 129, 0.28));
  border-color: #fbbf24;
  color: #fef08a;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.25);
}

/* ─── BOTÕES SOCIAIS ─────────────────────────────────────────────────── */
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #ffffff;
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.25s ease;
}

.social-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: #fbbf24;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.25);
}