/* ============================================================
   PERIGOS — Cores idênticas à página Poderes (str-base)
   ============================================================ */

@font-face {
  font-family: "Tormenta";
  src: url("../poderes/assets/fonts/Tormenta.ttf") format("truetype");
}

:root {
  /* Tema Sangue */
  --bg-body: #0a0404;
  --bg-card: rgba(22, 14, 14, 0.75);
  --bg-surface: #120a0a;
  --text-color: #e8e4e4;
  --text-muted: #736868;
  --border-color: rgba(204, 13, 13, 0.25);
  --gold-primary: #cc0d0d;
  --gold-secondary: #cfa053;
  --gold-glow: rgba(204, 13, 13, 0.35);
}

.theme-dark {
  /* Tema Sombras */
  --bg-body: #06070c;
  --bg-card: rgba(18, 23, 38, 0.72);
  --bg-surface: #0b0e1a;
  --text-color: #e2d8c3;
  --text-muted: #8e7d65;
  --border-color: rgba(201, 147, 58, 0.2);
  --gold-primary: #c9933a;
  --gold-secondary: #d4af37;
  --gold-glow: rgba(201, 147, 58, 0.22);
}

/* ===== TEMA CLÁSSICO (STR original) ===== */
.theme-classic {
  --bg-body: #f0ece4;
  --bg-card: #ffffff;
  --bg-surface: #ffffff;
  --text-color: #2c3e50;
  --text-muted: #7f8c8d;
  --border-color: #b0b8c8;
  --gold-primary: #e74c3c;
  --gold-secondary: #c0392b;
  --gold-glow: rgba(231, 76, 60, 0.2);
}

body {
  background-color: var(--bg-body);
  color: var(--text-color);
  transition: background-color 0.35s ease, color 0.35s ease;
}

.card {
  background-color: var(--bg-card);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

.form-select,
.form-control {
  background-color: var(--bg-surface);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

.form-select:focus,
.form-control:focus {
  border-color: var(--gold-primary);
  box-shadow: none;
}

.card-img-top {
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

.perigo-card hr {
  border: none;
  border-top: 2px solid var(--gold-primary);
  margin: 1rem 0;
}

.origem {
  color: var(--gold-primary);
}

.efeito.collapse {
  display: none;
}

/* ===== THEME SWITCHER ===== */
.theme-switcher {
  display: flex;
  gap: 4px;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 3px;
  transition: border-color 0.25s ease;
}

.theme-btn {
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  transition: background 0.25s ease, transform 0.1s;
  opacity: 0.55;
}

.theme-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.15);
}

.theme-btn.active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.theme-dark .theme-switcher {
  border-color: rgba(201, 147, 58, 0.3);
}

.theme-classic .theme-switcher {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.2);
}

h1 {
  font-family: "Tormenta", serif;
}

/* ===== HEADER (estilo Poderes) ===== */
.header {
  position: relative;
  text-align: center;
  padding: 28px 60px 22px;
  background: var(--bg-body);
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.header::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  box-shadow: 0 0 10px var(--gold-glow);
}

.header-title {
  font-family: "Tormenta", serif;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  color: var(--gold-primary);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  margin: 0;
  line-height: 1.2;
}

.header-btns {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

.header-home-btn {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  color: var(--gold-primary);
  font-size: 0.9rem;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.header-home-btn:hover {
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
}

.theme-dark .card,
.theme-classic .card {
  background-color: var(--bg-card);
  color: var(--text-color);
  border-color: var(--border-color);
}

.theme-dark .form-select,
.theme-dark .form-control,
.theme-classic .form-select,
.theme-classic .form-control {
  background-color: var(--bg-surface);
  color: var(--text-color);
  border-color: var(--border-color);
}

.theme-dark .form-select:focus,
.theme-dark .form-control:focus,
.theme-classic .form-select:focus,
.theme-classic .form-control:focus {
  border-color: var(--gold-primary);
}

.text-danger { color: var(--gold-primary) !important; }
.text-warning { color: var(--gold-secondary) !important; }
.text-primary { color: var(--gold-primary) !important; }
.text-purple { color: var(--gold-primary) !important; }

@media (max-width: 600px) {
  .header-title { font-size: 1.1rem; }
  .header-home-btn span { display: none; }
  .header-btns { position: static; transform: none; justify-content: center; margin-top: 10px; }
}

.theme-classic .header {
  background: linear-gradient(185deg, #2c3e50 0%, #1a252f 100%) !important;
  border-bottom: 2px solid #e74c3c !important;
}

.theme-classic .header::before {
  display: none !important;
}

.theme-classic .header-title {
  color: #ecf0f1 !important;
  text-shadow: none !important;
}

.theme-classic .header-home-btn,
.theme-classic .theme-switcher {
  color: #ecf0f1 !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  background: rgba(0, 0, 0, 0.2) !important;
}

.theme-classic .header-home-btn:hover,
.theme-classic .theme-switcher:hover {
  border-color: #e74c3c !important;
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.3) !important;
}
