/* =====================================================
   COMPONENTES UI (BOTÕES, NAVBAR, MODAL, CARDS)
   ===================================================== */

/* ===== Botões ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  padding: 12px 22px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  transition: 0.25s;
}

.btn-gold {
  background: linear-gradient(160deg, var(--gold), var(--amber));
  color: #1a1300;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2) inset, 0 4px 20px rgba(229, 193, 88, 0.45);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 32px rgba(229, 193, 88, 0.75), 0 0 18px rgba(255, 159, 67, 0.55);
}

.btn-arcane {
  background: transparent;
  color: var(--arcane);
  border-color: var(--arcane);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.35) inset, 0 0 12px rgba(168, 85, 247, 0.25);
}

.btn-arcane:hover {
  background: rgba(168, 85, 247, 0.22);
  box-shadow: 0 0 28px rgba(168, 85, 247, 0.75), inset 0 0 18px rgba(168, 85, 247, 0.45);
}

.btn-ghost {
  background: transparent;
  color: var(--silver);
  border-color: rgba(203, 213, 225, 0.4);
  font-size: 0.8rem;
  padding: 8px 14px;
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.4);
}

.btn-sm {
  font-size: 0.82rem;
  padding: 8px 14px;
}

/* ===== Header & Navbar ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(11, 10, 16, 0.96);
  border-bottom: 1px solid var(--line);
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-emblem {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 6px var(--gold));
}

.brand-text strong {
  display: block;
  font-family: var(--font-title);
  color: var(--gold);
  font-size: 1.05rem;
}

.brand-text small {
  display: block;
  color: var(--silver);
  font-size: 0.72rem;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--silver);
  font-size: 0.92rem;
  font-family: var(--font-title);
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: 0.2s;
}

.nav-links a:hover {
  color: var(--gold);
  text-shadow: 0 0 8px rgba(229, 193, 88, 0.6);
}

.nav-links a.active {
  color: var(--gold);
  text-shadow: 0 0 10px rgba(229, 193, 88, 0.75);
}

.btn-cv {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  border: 2px solid var(--gold);
  border-radius: 6px;
  padding: 8px 16px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.5px;
  line-height: 1.2;
  color: var(--gold) !important;
  text-decoration: none;
  box-shadow: 0 0 10px rgba(229, 193, 88, 0.2);
  transition: all 0.25s ease;
}

.btn-cv:hover {
  background: var(--gold);
  color: #1a1300 !important;
  box-shadow: 0 0 16px rgba(229, 193, 88, 0.5);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--gold);
  transition: 0.25s;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1120px) and (min-width: 961px) {
  .nav-links {
    gap: 12px;
  }
  .nav-links a {
    font-size: 0.84rem;
  }
  .btn-cv {
    padding: 6px 12px;
    font-size: 0.84rem;
  }
}

@media (max-width: 960px) {
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: var(--panel);
    border-bottom: 1px solid transparent;
    padding: 0 22px;
    gap: 16px;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.25s ease, visibility 0.3s;
  }
  .nav-links.open {
    max-height: 420px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }
  .btn-cv {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
  }
}

/* ===== Seções Genéricas ===== */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 70px 22px;
}

/* ===== Sistema de Telas (Navegação em Abas estilo RPG) ===== */
.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: screenMaterialize 0.55s ease;
}

.screen.screen-leaving {
  display: block;
  position: absolute;
  inset: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  animation: screenDematerialize 0.4s ease forwards;
}

@keyframes screenMaterialize {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes screenDematerialize {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .screen.active,
  .screen.screen-leaving {
    animation: none !important;
  }
}

.screen-nav {
  display: none;
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  align-items: center;
  gap: 18px;
  background: rgba(18, 17, 26, 0.96);
  border: 1.5px solid rgba(229, 193, 88, 0.35);
  border-radius: 40px;
  padding: 10px 18px;
  z-index: 55;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 24px rgba(229, 193, 88, 0.25);
}

.screen-nav-btn {
  background: rgba(29, 26, 39, 0.8);
  border: 1.5px solid var(--gold);
  color: var(--gold);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.25s;
  box-shadow: 0 0 10px rgba(229, 193, 88, 0.2);
}

.screen-nav-btn:hover:not(:disabled) {
  background: var(--gold);
  color: #1a1300;
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(229, 193, 88, 0.85);
}

.screen-nav-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.screen-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  border-color: rgba(203, 213, 225, 0.3);
  color: rgba(203, 213, 225, 0.4);
}

.screen-dots {
  display: flex;
  gap: 10px;
  align-items: center;
}

.screen-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid var(--silver);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: 0.25s;
}

.screen-dot:hover {
  border-color: var(--gold);
  transform: scale(1.2);
}

.screen-dot.active {
  background: var(--gold);
  border-color: var(--gold);
  width: 26px;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(229, 193, 88, 0.9);
}

@media (max-width: 600px) {
  .screen-nav {
    bottom: 16px;
    padding: 8px 14px;
    gap: 14px;
  }
  .screen-nav-btn {
    width: 36px;
    height: 36px;
    font-size: 1.0rem;
  }
  .screen-dot {
    width: 10px;
    height: 10px;
  }
  .screen-dot.active {
    width: 20px;
  }
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  text-align: center;
  color: var(--parchment);
  text-shadow:
    0 0 20px rgba(229, 193, 88, 0.65),
    0 0 45px rgba(168, 85, 247, 0.40);
  margin-bottom: 10px;
}

.section-sub {
  text-align: center;
  color: var(--silver);
  font-size: 1.05rem;
  margin-bottom: 44px;
  font-style: italic;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

/* ===== Modal de Batalha ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 3, 8, 0.88);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  position: relative;
  background: radial-gradient(circle at 50% 0%, #24161b, var(--panel));
  border: 2px solid var(--danger);
  border-radius: 12px;
  padding: 28px;
  max-width: 520px;
  width: 100%;
  box-shadow:
    0 0 50px rgba(239, 68, 68, 0.55),
    inset 0 0 30px rgba(239, 68, 68, 0.20);
}

.modal-box h3 {
  color: var(--danger);
  margin-bottom: 18px;
  font-size: 1.2rem;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: 1px solid var(--silver);
  color: var(--silver);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
}

.modal-close:hover {
  background: var(--silver);
  color: #111;
}

.battle-bars {
  display: flex;
  gap: 20px;
  margin-bottom: 18px;
}

.battle-side {
  flex: 1;
}

.battle-side span {
  display: block;
  font-family: var(--font-title);
  font-size: 0.8rem;
  color: var(--parchment);
  margin-bottom: 4px;
}

.hp-track {
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.hp-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.hp-player {
  width: 100%;
  background: linear-gradient(90deg, var(--heal), #059669);
}

.hp-enemy {
  width: 100%;
  background: linear-gradient(90deg, var(--danger), #b91c1c);
}

.battle-log {
  background: var(--stone);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  height: 130px;
  overflow-y: auto;
  font-size: 0.85rem;
  color: var(--silver);
  margin-bottom: 16px;
}

.battle-log p {
  margin-bottom: 6px;
}
