﻿/* ===================================================
   D.U.T.S. â€” CaÃ§adores de Monstros: O Jogo de Cartas
   EstÃ©tica noir brasileira
   =================================================== */

:root {
  --bg-primary:    #0d0d1a;
  --color-red:     #c0392b;
  --color-green:   #1abc9c;
  --color-gold:    #f39c12;
  --color-text:    #e8e8e8;
  --color-dim:     #888;
  --card-attack-bg:  #2c0b0b;
  --card-attack-br:  #c0392b;
  --card-skill-bg:   #0b1a2c;
  --card-skill-br:   #2980b9;
  --card-power-bg:   #1a0b2c;
  --card-power-br:   #8e44ad;
  --card-curse-bg:   #1a1a00;
  --card-curse-br:   #7f8c00;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--color-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

#game-container {
  min-height: 100vh;
}

/* === COOKIE BANNER === */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #12121f;
  border-top: 2px solid var(--color-red);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.6);
}

.cookie-content {
  max-width: 900px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cookie-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}

.cookie-desc {
  font-size: 0.875rem;
  color: var(--color-dim);
  line-height: 1.5;
}

.cookie-link {
  color: var(--color-green);
  text-decoration: underline;
}

.cookie-link:hover {
  color: var(--color-text);
}

.cookie-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-cookie-accept {
  background: var(--color-green);
  color: #0d0d1a;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.875rem;
  transition: opacity 0.2s;
}

.btn-cookie-accept:hover {
  opacity: 0.85;
}

.btn-cookie-decline {
  background: transparent;
  color: var(--color-dim);
  border: 1px solid var(--color-dim);
  padding: 0.5rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: color 0.2s, border-color 0.2s;
}

.btn-cookie-decline:hover {
  color: var(--color-text);
  border-color: var(--color-text);
}

/* === PÃGINAS INFORMATIVAS (termos / privacidade) === */
.info-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.info-page h1 {
  color: var(--color-red);
  font-size: 2rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #2a2a3a;
  padding-bottom: 1rem;
}

.info-page h2 {
  color: var(--color-gold);
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

.info-page p {
  color: var(--color-dim);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.info-page a {
  color: var(--color-green);
}

.info-nav {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #2a2a3a;
}

.info-nav a {
  color: var(--color-green);
  text-decoration: none;
  font-size: 0.875rem;
}

.info-nav a:hover {
  text-decoration: underline;
}

/* === ANIMAÃ‡Ã•ES DO JOGO === */
@keyframes shake-animation {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

@keyframes flash-damage {
  0%, 100% { background-color: transparent; }
  50%       { background-color: rgba(192, 57, 43, 0.5); }
}

@keyframes flash-heal {
  0%, 100% { background-color: transparent; }
  50%       { background-color: rgba(26, 188, 156, 0.4); }
}

.shake    { animation: shake-animation 0.4s ease; }
.dmg-flash { animation: flash-damage 0.3s ease; }
.heal-flash { animation: flash-heal 0.3s ease; }

/* === CARTAS === */
.card {
  border-radius: 8px;
  padding: 0.75rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  position: relative;
}

.card:hover:not(.card-disabled) {
  transform: scale(1.05) translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.card-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.card.attack  { background: var(--card-attack-bg); border: 2px solid var(--card-attack-br); }
.card.skill   { background: var(--card-skill-bg);  border: 2px solid var(--card-skill-br);  }
.card.power   { background: var(--card-power-bg);  border: 2px solid var(--card-power-br);  }
.card.curse   { background: var(--card-curse-bg);  border: 2px solid var(--card-curse-br);  }

/* ============== SCREENS ============== */
.screen { display: none; }
.screen.active { display: block; min-height: 100vh; }

/* ============== TITLE ============== */
.title-screen {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 100vh; gap: 1rem;
  background: radial-gradient(ellipse at center, #1a0a0a 0%, var(--bg-primary) 70%);
}
.title-logo { font-size: 5rem; }
.title-logo-img { width: 180px; height: 180px; object-fit: contain; filter: drop-shadow(0 0 20px #cc00ff); border-radius: 50%; }
.title-main { font-size: 3rem; color: var(--color-red); letter-spacing: 0.3em; text-transform: uppercase; }
.title-sub  { font-size: 1.25rem; color: var(--color-gold); letter-spacing: 0.15em; }
.title-tagline { color: var(--color-dim); font-size: 0.9rem; }
.title-buttons { display: flex; flex-direction: column; gap: 0.75rem; align-items: center; margin: 1.5rem 0; }
.title-lore { color: var(--color-dim); text-align: center; font-size: 0.8rem; }

/* ============== BUTTONS ============== */
.btn-primary {
  background: var(--color-red); color: #fff; border: none;
  padding: 0.75rem 2rem; border-radius: 6px; cursor: pointer;
  font-size: 1rem; font-weight: 700; min-width: 200px;
  transition: opacity 0.2s, transform 0.1s;
}
.btn-primary:hover { opacity: 0.85; transform: scale(1.02); }
.btn-secondary {
  background: transparent; color: var(--color-text);
  border: 1px solid var(--color-dim); padding: 0.75rem 2rem;
  border-radius: 6px; cursor: pointer; font-size: 0.9rem; min-width: 200px;
  transition: border-color 0.2s;
}
.btn-secondary:hover { border-color: var(--color-text); }
.btn-end-turn {
  background: var(--color-gold); color: #1a1a00; border: none;
  padding: 0.75rem 1.5rem; border-radius: 6px; cursor: pointer;
  font-size: 1rem; font-weight: 700; transition: opacity 0.2s;
}
.btn-end-turn:hover { opacity: 0.85; }
.btn-end-turn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-warning {
  background: var(--color-red); color: #fff; border: none;
  padding: 0.75rem 1.5rem; border-radius: 6px; cursor: pointer; font-weight: 700;
}
.btn-pile {
  background: #1a1a2e; border: 1px solid var(--color-dim);
  color: var(--color-text); padding: 0.4rem 0.75rem; border-radius: 4px;
  cursor: pointer; font-size: 0.85rem;
}
.btn-pile:hover { border-color: var(--color-text); }
.btn-rest {
  background: #0f2a1a; border: 2px solid var(--color-green);
  color: var(--color-text); padding: 1.25rem 2rem; border-radius: 8px;
  cursor: pointer; font-size: 1rem; text-align: center; min-width: 200px;
  transition: background 0.2s;
}
.btn-rest:hover { background: #1a3f28; }
.btn-rest:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-close {
  background: none; border: none; color: var(--color-dim);
  font-size: 1.25rem; cursor: pointer; float: right;
}
.btn-close:hover { color: var(--color-text); }
.btn-event-option {
  display: block; width: 100%; background: #12121f;
  border: 1px solid var(--color-dim); color: var(--color-text);
  padding: 0.85rem 1rem; border-radius: 6px; cursor: pointer;
  text-align: left; font-size: 0.95rem; margin-bottom: 0.5rem;
  transition: border-color 0.2s, background 0.2s;
}
.btn-event-option:hover { border-color: var(--color-gold); background: #1a1a30; }

/* ============== HUD BAR ============== */
.hud-bar {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.75rem 1.5rem; background: #12121f;
  border-bottom: 1px solid #2a2a3a; flex-wrap: wrap;
}
.hud-char { display: flex; align-items: center; gap: 0.5rem; }
.hud-char-img {
  width: 32px; height: 32px; border-radius: 50%;
  object-fit: cover; object-position: top center;
  border: 1px solid var(--color-gold);
}
.hud-hp { color: #e74c3c; font-weight: 700; }
.hud-gold { color: var(--color-gold); font-weight: 700; }
.hud-act { color: var(--color-dim); }
.hud-relics { font-size: 1.2rem; }

/* ============== MAP ============== */
@keyframes pulseCurrentNode {
  0%, 100% { box-shadow: 0 0 8px rgba(192,57,43,0.6), 0 0 0 2px rgba(192,57,43,0.4); }
  50%       { box-shadow: 0 0 18px rgba(192,57,43,1), 0 0 0 4px rgba(192,57,43,0.6); }
}

.map-screen { padding: 1rem; }
.map-title { text-align: center; color: var(--color-gold); margin: 0.5rem 0 1rem; }
.map-grid { display: flex; flex-direction: column-reverse; gap: 0.5rem; max-width: 700px; margin: 0 auto; }
.map-row { display: flex; gap: 0.5rem; justify-content: center; }
.map-node {
  width: 52px; height: 52px; border-radius: 8px; cursor: default;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 2px solid transparent; transition: all 0.2s; font-size: 0.7rem; gap: 2px;
}
.map-node.available {
  border-color: var(--node-color, var(--color-gold));
  background: rgba(255,255,255,0.07); cursor: pointer;
  box-shadow: 0 0 8px var(--node-color, var(--color-gold));
}
.map-node.available:hover {
  transform: scale(1.1);
  box-shadow: 0 0 16px var(--node-color, var(--color-gold));
}
.map-node.visited { opacity: 0.5; border-color: #333; pointer-events: none; }
.map-node.locked { opacity: 0.2; }
.map-node.current {
  border-color: var(--color-red);
  animation: pulseCurrentNode 1.5s ease-in-out infinite;
}
.map-empty { width: 52px; height: 52px; }
.node-icon { font-size: 1.3rem; line-height: 1; }
.node-label { font-size: 0.55rem; color: var(--color-dim); text-align: center; line-height: 1.2; }
.map-legend { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 1rem; }
.legend-item { font-size: 0.75rem; color: var(--color-dim); }

/* ============== CHAR SELECT ============== */
.char-select-screen { padding: 1.5rem; }
.section-title { text-align: center; color: var(--color-gold); margin-bottom: 1.5rem; font-size: 1.5rem; }
.char-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; max-width: 1000px; margin: 0 auto; }
.char-card {
  background: #12121f; border: 2px solid #2a2a3a; border-radius: 10px;
  padding: 0; cursor: pointer; text-align: center; overflow: hidden;
  transition: border-color 0.25s, transform 0.2s, box-shadow 0.25s;
}
.char-card:hover {
  border-color: var(--color-gold);
  transform: scale(1.03);
  box-shadow: 0 0 20px rgba(243,156,18,0.3);
}
.char-portrait {
  width: 100%;
  aspect-ratio: 3 / 4;
  position: relative;
  overflow: hidden;
  background: #0d0d1a;
}
.char-portrait img.char-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.char-portrait .char-emoji-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}
.char-portrait[data-img]:not([data-img=""]) .char-emoji-fallback { display: none; }
.char-info { padding: 1rem; }
.char-icon { font-size: 3rem; margin-bottom: 0.5rem; position: relative; }
.char-image { width: 100%; height: 100%; object-fit: cover; object-position: top center; border-radius: 0; display: block; }
.char-emoji { display: block; }
.enemy-image {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 2px solid rgba(192,57,43,0.5);
  box-shadow: 0 0 16px rgba(192,57,43,0.3);
  display: block;
}
.char-name { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.25rem; }
.char-title { color: var(--color-gold); font-size: 0.85rem; margin-bottom: 0.5rem; }
.char-hp { color: #e74c3c; font-weight: 700; margin-bottom: 0.5rem; }
.char-desc { color: var(--color-dim); font-size: 0.8rem; line-height: 1.5; }
.char-deck-preview { margin-top: 0.75rem; color: var(--color-green); font-size: 0.75rem; }

/* ============================================================
   COMBAT SCREEN — D.U.T.S. Noir Redesign
   ============================================================ */

/* --- Keyframes --- */
@keyframes pulseGold {
  0%, 100% { box-shadow: 0 0 10px rgba(243,156,18,0.3), inset 0 0 10px rgba(243,156,18,0.05); border-color: rgba(243,156,18,0.6); }
  50%       { box-shadow: 0 0 28px rgba(243,156,18,0.75), inset 0 0 20px rgba(243,156,18,0.1); border-color: #f39c12; }
}
@keyframes pulseRed {
  0%, 100% { box-shadow: 0 0 8px rgba(192,57,43,0.4); }
  50%       { box-shadow: 0 0 22px rgba(192,57,43,0.8); }
}
@keyframes damageFloat {
  0%   { opacity: 1; transform: translateY(0) scale(1.3); }
  100% { opacity: 0; transform: translateY(-70px) scale(0.7); }
}
@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(40px) scale(0.85); }
  to   { opacity: 1; }
}
@keyframes hpBarFlash {
  0%, 100% { filter: brightness(1); }
  50%       { filter: brightness(1.8) saturate(1.5); }
}
@keyframes intentPulse {
  0%, 100% { opacity: 0.85; }
  50%       { opacity: 1; }
}
@keyframes scanline {
  0%   { background-position: 0 0; }
  100% { background-position: 0 4px; }
}

/* --- Layout principal --- */
.combat-screen {
  display: grid;
  grid-template-rows: 44% 8% 36% 12%;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(192,57,43,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 100% 100% at 50% 100%, rgba(10,10,20,0.95) 0%, transparent 80%),
    #0a0a14;
}

/* Scanline texture overlay */
.combat-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.08) 3px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
  z-index: 0;
}

/* --- combat-top: área do inimigo --- */
.combat-top {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem 1rem 0.5rem;
  gap: 2rem;
  z-index: 1;
}

/* Player info — canto superior esquerdo */
.player-info {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: rgba(10,10,20,0.92);
  border: 1px solid rgba(192,57,43,0.25);
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  backdrop-filter: blur(6px);
  z-index: 5;
  min-width: 180px;
}

.player-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.player-hp-bar {
  width: 100%;
  height: 5px;
  background: #1a1a2e;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 3px;
}

.enemy-hp-bar {
  width: 100%;
  height: 5px;
  background: rgba(0,0,0,0.5);
  border-radius: 3px;
  overflow: hidden;
  margin: 6px 0 3px;
}

.hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #922b21 0%, #e74c3c 60%, #ff6b6b 100%);
  border-radius: 3px;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.player-hp-text,
.enemy-hp-text {
  font-size: 0.72rem;
  color: #aaa;
  letter-spacing: 0.02em;
}

.effects-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 3px;
}

.effect-badge {
  background: rgba(20,20,40,0.9);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.7rem;
  cursor: default;
  backdrop-filter: blur(4px);
}

.relics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.relic-badge {
  font-size: 1rem;
  cursor: help;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6));
}

/* --- Inimigos --- */
.enemies-area {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2rem;
  flex: 1;
}

.enemy-card {
  position: relative;
  width: 200px;
  background: rgba(18,8,8,0.88);
  border: 1px solid rgba(192,57,43,0.22);
  border-radius: 14px;
  padding: 1rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, border-color 0.2s ease;
  animation: cardEntrance 0.35s ease-out both;
}

.enemy-card:hover {
  transform: translateY(-4px);
  border-color: rgba(192,57,43,0.5);
}

.enemy-card.selected-target {
  border-color: rgba(243,156,18,0.7);
  animation: pulseGold 1.8s ease-in-out infinite;
}

.enemy-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.enemy-icon {
  font-size: 3.2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.8));
  display: block;
}

.enemy-name {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #e8e8e8;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(0,0,0,0.8);
}

.enemy-hp-text {
  text-align: center;
  font-size: 0.72rem;
  color: #999;
  margin-bottom: 0.4rem;
}

.enemy-intent {
  background: rgba(192,57,43,0.12);
  border-left: 3px solid #c0392b;
  border-radius: 0 6px 6px 0;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  color: #e8a090;
  margin-top: 0.5rem;
  animation: intentPulse 2s ease-in-out infinite;
  text-align: center;
  line-height: 1.3;
}

/* --- combat-mid: energia + log --- */
.combat-mid {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.energy-display {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #0e0e22;
  border: 2px solid #f39c12;
  border-radius: 999px;
  padding: 0.35rem 1.4rem;
  font-size: 1.5rem;
  font-weight: 900;
  color: #f39c12;
  letter-spacing: 0.05em;
  text-shadow: 0 0 14px rgba(243,156,18,0.7);
  box-shadow: 0 0 18px rgba(243,156,18,0.25), inset 0 0 12px rgba(243,156,18,0.06);
  white-space: nowrap;
  z-index: 10;
}

.combat-log {
  position: absolute;
  bottom: 0;
  left: 1rem;
  font-size: 0.7rem;
  color: #555;
  max-height: 54px;
  overflow: hidden;
  pointer-events: none;
}

.log-entry {
  margin-bottom: 1px;
  line-height: 1.4;
}

.log-entry:last-child {
  color: #888;
}

/* --- combat-hand: mão de cartas --- */
.combat-hand {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0.5rem;
  overflow: visible;
  z-index: 2;
  background: linear-gradient(to top, #050510 0%, transparent 60%);
}

.hand-cards {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: -8px;
  padding-bottom: 0.5rem;
  perspective: 900px;
  position: relative;
  min-height: 210px;
}

/* --- Cartas --- */
.card {
  width: 140px;
  height: 200px;
  border-radius: 10px;
  padding: 0.75rem;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease, z-index 0s;
  transform-origin: bottom center;
  user-select: none;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
  animation: cardEntrance 0.3s ease-out both;
}

/* Brilho interno */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 40% at 50% 0%, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
  border-radius: inherit;
}

/* Glow colorido por tipo */
.card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.card.attack  { background: var(--card-attack-bg); border: 2px solid var(--card-attack-br); }
.card.skill   { background: var(--card-skill-bg);  border: 2px solid var(--card-skill-br);  }
.card.power   { background: var(--card-power-bg);  border: 2px solid var(--card-power-br);  }
.card.curse   { background: var(--card-curse-bg);  border: 2px solid var(--card-curse-br);  }

.card.attack::after  { box-shadow: 0 0 20px rgba(192,57,43,0.6); }
.card.skill::after   { box-shadow: 0 0 20px rgba(41,128,185,0.6); }
.card.power::after   { box-shadow: 0 0 20px rgba(142,68,173,0.6); }

.card:hover:not(.card-disabled) {
  transform: translateY(-36px) scale(1.1) rotateZ(0deg) !important;
  z-index: 100;
  box-shadow: 0 18px 40px rgba(0,0,0,0.7), 0 0 24px rgba(243,156,18,0.2);
}

.card:hover:not(.card-disabled)::after {
  opacity: 1;
}

.card-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.4);
}

.card-cost {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 900;
  background: #0d0d1a;
  z-index: 2;
  line-height: 1;
}

.card.attack  .card-cost { border: 2px solid var(--card-attack-br); color: #e57373; }
.card.skill   .card-cost { border: 2px solid var(--card-skill-br);  color: #64b5f6; }
.card.power   .card-cost { border: 2px solid var(--card-power-br);  color: #ce93d8; }
.card.curse   .card-cost { border: 2px solid var(--card-curse-br);  color: #cddc39; }

.card-name {
  font-weight: 800;
  font-size: 0.75rem;
  text-align: center;
  color: #f0f0f0;
  margin-top: 2rem;
  margin-bottom: 0.4rem;
  letter-spacing: 0.03em;
  line-height: 1.25;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.card-desc {
  font-size: 0.67rem;
  color: #c0c0c0;
  text-align: center;
  line-height: 1.35;
  flex: 1;
  overflow: hidden;
}

.card-type {
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  margin-top: auto;
  padding-top: 0.3rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.card.attack  .card-type { color: var(--card-attack-br); }
.card.skill   .card-type { color: var(--card-skill-br);  }
.card.power   .card-type { color: var(--card-power-br);  }
.card.curse   .card-type { color: #a0a000;               }

.card-after {
  font-size: 0.62rem;
  color: var(--color-green);
  text-align: center;
  margin-top: 0.2rem;
}

/* --- combat-bottom --- */
.combat-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.5rem;
  background: rgba(5,5,16,0.95);
  border-top: 1px solid rgba(255,255,255,0.04);
  z-index: 5;
}

.pile-buttons {
  display: flex;
  gap: 0.5rem;
}

.btn-pile {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: #888;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-pile:hover {
  background: rgba(255,255,255,0.09);
  color: #ccc;
  border-color: rgba(255,255,255,0.25);
}

.btn-end-turn {
  background: linear-gradient(135deg, #c0392b 0%, #7b241c 100%);
  color: #fff;
  border: none;
  padding: 0.7rem 2.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 4px 20px rgba(192,57,43,0.5), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  position: relative;
  overflow: hidden;
}

.btn-end-turn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: left 0.4s ease;
}

.btn-end-turn:hover:not(:disabled)::before { left: 160%; }

.btn-end-turn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 30px rgba(192,57,43,0.7), inset 0 1px 0 rgba(255,255,255,0.2);
  filter: brightness(1.12);
}

.btn-end-turn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-end-turn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-warning {
  background: linear-gradient(135deg, #c0392b, #7b241c);
  color: #fff;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 16px rgba(192,57,43,0.4);
  transition: filter 0.15s;
}

.btn-warning:hover { filter: brightness(1.15); }

/* --- Números flutuantes de dano/cura --- */
.damage-float {
  position: absolute;
  color: #e74c3c;
  font-size: 1.9rem;
  font-weight: 900;
  pointer-events: none;
  animation: damageFloat 0.9s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
  z-index: 200;
  text-shadow: 0 2px 10px rgba(0,0,0,0.9), 0 0 20px rgba(231,76,60,0.5);
  letter-spacing: -0.02em;
}

.heal-float {
  color: #1abc9c;
  text-shadow: 0 2px 10px rgba(0,0,0,0.9), 0 0 20px rgba(26,188,156,0.5);
}

/* Leque de cartas — classes aplicadas por JS */
.hand-cards .card { margin: 0 -6px; }

/* Responsivo combate */
@media (max-width: 768px) {
  .combat-screen { grid-template-rows: 40% 8% 40% 12%; }
  .enemy-card { width: 160px; }
  .card { width: 118px; height: 172px; }
  .card-name { font-size: 0.68rem; }
  .card-desc { font-size: 0.6rem; }
  .player-info { min-width: 150px; padding: 0.5rem 0.75rem; }
  .btn-end-turn { padding: 0.6rem 1.4rem; font-size: 0.85rem; }
}

/* ============== REWARD ============== */
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(60px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.reward-screen { max-width: 900px; margin: 0 auto; padding: 2rem 1rem; text-align: center; }
.reward-gold { color: var(--color-gold); font-size: 1.25rem; font-weight: 700; margin: 0.5rem 0 1.5rem; }
.cards-grid { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; margin: 1.5rem 0; }
.cards-grid .card {
  width: 180px !important;
  height: 260px !important;
  animation: slideInUp 0.4s ease-out both;
}
.cards-grid .card:nth-child(1) { animation-delay: 0.05s; }
.cards-grid .card:nth-child(2) { animation-delay: 0.15s; }
.cards-grid .card:nth-child(3) { animation-delay: 0.25s; }
.cards-grid-small { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.5rem; }
.card-small { min-width: 100px !important; max-width: 120px !important; font-size: 0.7rem !important; }

/* ============== EVENT ============== */
.event-screen { max-width: 700px; margin: 0 auto; padding: 3rem 1.5rem; }
.event-title { color: var(--color-gold); font-size: 1.5rem; margin-bottom: 1rem; }
.event-text { color: var(--color-dim); line-height: 1.7; margin-bottom: 2rem; }
.event-options { margin-bottom: 1rem; }
.event-result { background: #12121f; border: 1px solid var(--color-green); border-radius: 6px; padding: 1rem; margin: 1rem 0; color: var(--color-text); }
.hidden { display: none !important; }

/* ============== REST ============== */
.rest-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; gap: 1.5rem; }
.rest-icon { font-size: 4rem; }
.rest-options { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }

/* ============== FORGE ============== */
.forge-screen { padding: 1.5rem; }
.forge-screen h2 { color: var(--color-gold); margin-bottom: 1rem; }
.forge-card { cursor: pointer; }
.forge-card:hover { border-color: var(--color-gold) !important; }

/* ============== SHOP ============== */
.shop-screen { max-width: 900px; margin: 0 auto; padding: 1.5rem; }
.shop-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.shop-header h2 { color: var(--color-gold); }
.shop-gold { color: var(--color-gold); font-weight: 700; font-size: 1.25rem; }
.shop-price { font-weight: 700; text-align: center; margin-top: 0.5rem; font-size: 0.85rem; }
.can-afford { color: var(--color-gold); }
.cant-afford { color: var(--color-red); }
.relics-shop { display: flex; flex-direction: column; gap: 0.75rem; margin: 1rem 0; }
.relic-shop-item {
  display: flex; align-items: center; gap: 1rem;
  background: #12121f; border: 1px solid #2a2a3a; border-radius: 8px;
  padding: 0.75rem 1rem; cursor: pointer; transition: border-color 0.2s;
}
.relic-shop-item:hover:not(.cant-afford) { border-color: var(--color-gold); }
.relic-shop-item.cant-afford { opacity: 0.5; cursor: not-allowed; }
.relic-icon { font-size: 2rem; }
.relic-name { font-weight: 700; margin-bottom: 0.25rem; }
.relic-desc { color: var(--color-dim); font-size: 0.8rem; }
.shop-screen h3 { color: var(--color-dim); margin: 1rem 0 0.5rem; }

/* ============== END SCREENS ============== */
.end-screen {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 100vh; gap: 1rem; text-align: center; padding: 2rem;
}
.end-screen.victory { background: radial-gradient(ellipse at center, #0a1f0a 0%, var(--bg-primary) 70%); }
.end-icon { font-size: 5rem; }
.end-screen h2 { font-size: 2rem; color: var(--color-gold); }
.end-stats { display: flex; gap: 2rem; color: var(--color-dim); flex-wrap: wrap; justify-content: center; }
.end-buttons { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-top: 1rem; }

/* ============== OVERLAY ============== */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.overlay-panel {
  background: #12121f; border: 1px solid #2a2a3a; border-radius: 10px;
  padding: 1.5rem; max-width: 90vw; max-height: 85vh; overflow-y: auto; min-width: 300px;
}
.overlay-panel h2 { color: var(--color-gold); margin-bottom: 1rem; }

/* ============== TOOLTIP ============== */
.tooltip {
  position: fixed; background: #1a1a30; border: 1px solid var(--color-gold);
  border-radius: 6px; padding: 0.5rem 0.75rem; font-size: 0.8rem; max-width: 220px;
  pointer-events: none; z-index: 9999; display: none;
}

/* ============== SCROLLBAR ============== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0a0a14; }
::-webkit-scrollbar-thumb { background: #2a2a3a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-dim); }

/* ============== RESPONSIVE ============== */
@media (max-width: 600px) {
  .char-grid { grid-template-columns: repeat(2, 1fr); }
  .combat-top { flex-direction: column; }
  .hand-cards .card { min-width: 90px; max-width: 110px; }
  .map-node { width: 42px; height: 42px; }
  .map-empty { width: 42px; height: 42px; }
  .node-icon { font-size: 1rem; }
  .title-main { font-size: 2rem; }
  .cards-grid .card { width: 140px !important; height: 200px !important; }
}

/* ===== CARD TYPE VISUALS ===== */
.card[data-type="attack"] {
  background: linear-gradient(135deg,#3d0000,#1a0000);
  border-color: #ff2020;
  box-shadow: 0 0 8px #ff2020, inset 0 0 20px rgba(0,0,0,0.5);
}
.card[data-type="skill"] {
  background: linear-gradient(135deg,#003d3d,#001a1a);
  border-color: #00d4ff;
  box-shadow: 0 0 8px #00d4ff, inset 0 0 20px rgba(0,0,0,0.5);
}
.card[data-type="power"] {
  background: linear-gradient(135deg,#2d1a00,#1a0d00);
  border-color: #ff8800;
  box-shadow: 0 0 8px #ff8800, inset 0 0 20px rgba(0,0,0,0.5);
}
.card[data-type="curse"] {
  background: linear-gradient(135deg,#1a001a,#0d000d);
  border-color: #660066;
  box-shadow: 0 0 8px #660066, inset 0 0 20px rgba(0,0,0,0.5);
}
.card.especial {
  background: linear-gradient(135deg,#3d003d,#1a001a) !important;
  border-color: #cc00ff !important;
  box-shadow: 0 0 12px #cc00ff, 0 0 20px rgba(255,215,0,0.3), inset 0 0 20px rgba(0,0,0,0.5) !important;
  animation: shimmerGold 2s infinite;
}
@keyframes shimmerGold {
  0%,100% { box-shadow: 0 0 12px #cc00ff, 0 0 20px rgba(255,215,0,0.3), inset 0 0 20px rgba(0,0,0,0.5); }
  50% { box-shadow: 0 0 18px #cc00ff, 0 0 30px rgba(255,215,0,0.6), inset 0 0 20px rgba(0,0,0,0.5); }
}
.card .card-logo {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0.7;
}

/* ==================== NAVBAR ==================== */
.duts-navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: rgba(10,10,26,0.95);
  border-bottom: 1px solid rgba(204,0,255,0.3);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 20px;
  z-index: 10000;
  backdrop-filter: blur(8px);
}
.navbar-logo { display: flex; align-items: center; text-decoration: none; }
.navbar-logo-img { height: 40px; border-radius: 6px; }
.navbar-links { display: flex; gap: 8px; flex: 1; margin-left: 16px; }
.navbar-link {
  color: #ccc;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: color 0.2s, background 0.2s;
}
.navbar-link:hover { color: #fff; background: rgba(204,0,255,0.15); }
.navbar-auth { display: flex; gap: 8px; align-items: center; }
.navbar-btn {
  padding: 6px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.navbar-btn-login {
  background: transparent;
  border: 1px solid rgba(204,0,255,0.5);
  color: #cc00ff;
}
.navbar-btn-login:hover { background: rgba(204,0,255,0.15); }
.navbar-btn-cadastro { background: #cc00ff; color: #fff; }
.navbar-btn-cadastro:hover { background: #aa00dd; }
.navbar-btn-sair { background: rgba(255,40,40,0.2); color: #ff4040; border: 1px solid rgba(255,40,40,0.3); }
.navbar-btn-sair:hover { background: rgba(255,40,40,0.3); }
.navbar-user { color: #ccc; font-size: 0.85rem; }

/* Body offset para navbar */
body { padding-top: 56px; }
#game-container { min-height: calc(100vh - 56px); }

/* ==================== CARTAS — VISUAL NEON ==================== */
.card[data-type="attack"] {
  background: linear-gradient(135deg, #3d0000, #1a0000) !important;
  border-color: #ff2020 !important;
  box-shadow: 0 0 8px #ff2020, inset 0 0 20px rgba(0,0,0,0.5) !important;
}
.card[data-type="skill"] {
  background: linear-gradient(135deg, #003d3d, #001a1a) !important;
  border-color: #00d4ff !important;
  box-shadow: 0 0 8px #00d4ff, inset 0 0 20px rgba(0,0,0,0.5) !important;
}
.card[data-type="power"] {
  background: linear-gradient(135deg, #2d1a00, #1a0d00) !important;
  border-color: #ff8800 !important;
  box-shadow: 0 0 8px #ff8800, inset 0 0 20px rgba(0,0,0,0.5) !important;
}
.card[data-type="curse"] {
  background: linear-gradient(135deg, #1a001a, #0d000d) !important;
  border-color: #660066 !important;
  box-shadow: 0 0 8px #660066, inset 0 0 20px rgba(0,0,0,0.5) !important;
}
.card.especial,
.card[data-especial="true"] {
  background: linear-gradient(135deg, #3d003d, #1a001a) !important;
  border-color: #cc00ff !important;
  box-shadow: 0 0 12px #cc00ff, 0 0 24px rgba(255,215,0,0.3), inset 0 0 20px rgba(0,0,0,0.5) !important;
  animation: shimmerGoldCard 2s ease-in-out infinite !important;
}
@keyframes shimmerGoldCard {
  0%, 100% { box-shadow: 0 0 12px #cc00ff, 0 0 20px rgba(255,215,0,0.2), inset 0 0 20px rgba(0,0,0,0.5); }
  50% { box-shadow: 0 0 20px #cc00ff, 0 0 35px rgba(255,215,0,0.5), inset 0 0 20px rgba(0,0,0,0.5); }
}
/* Logo no canto das cartas */
.card-logo-badge {
  position: absolute;
  top: 4px; left: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
}
.card-logo-badge img { width: 100%; height: 100%; object-fit: cover; }

/* === WEAK INDICATOR === */
.weak-indicator { font-size: 1.4rem; cursor: help; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }

/* === XP BAR === */
.xp-bar-container { position: relative; height: 6px; background: #222; border-radius:3px; margin-top:4px; width:120px; }
.xp-fill { height:100%; background: linear-gradient(90deg, #8e44ad, #f39c12); border-radius:3px; transition:width 0.3s; }
.xp-label { position:absolute; left:0; top:-16px; font-size:0.65rem; color:#888; white-space:nowrap; }

/* === CAPTURE MODAL === */
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.8); display:flex; align-items:center; justify-content:center; z-index:10000; }
.modal-panel { background:#12121f; border:2px solid var(--color-red); border-radius:12px; padding:2rem; max-width:420px; width:90%; text-align:center; }
.modal-panel h2 { margin-bottom:1rem; }
.modal-desc { color:#aaa; margin-bottom:1.5rem; }
.capture-buttons { display:flex; gap:1rem; justify-content:center; }
.btn-eliminate { background:#c0392b; color:#fff; border:none; padding:1rem 1.5rem; border-radius:8px; cursor:pointer; font-size:1rem; }
.btn-capture { background:#27ae60; color:#fff; border:none; padding:1rem 1.5rem; border-radius:8px; cursor:pointer; font-size:1rem; }

/* === BARGAIN MODAL === */
.bargain-quote { font-style:italic; color:#ccc; margin:1rem 0; background:#1a1a2e; padding:0.75rem; border-radius:6px; }
.bargain-buttons { display:flex; flex-direction:column; gap:0.5rem; margin:1rem 0; }
.btn-bargain-opt { background:#1a2a3a; color:#e8e8e8; border:1px solid #2980b9; padding:0.75rem; border-radius:6px; cursor:pointer; text-align:left; }
.btn-bargain-opt:hover { background:#2a3a4a; }
.bargain-result { margin:1rem 0; padding:1rem; background:#0d1f1a; border-radius:6px; border:1px solid #1abc9c; }
.hidden { display:none !important; }

/* === CORPOSECO MODAL === */
.corposeco-panel { border-color: #4a4a00; background: #1a1a00; }

/* === CHECKIN MODAL === */
.checkin-days { display:grid; grid-template-columns:repeat(7,1fr); gap:0.25rem; margin:1rem 0; }
.checkin-day { background:#1a1a2e; border:1px solid #333; border-radius:6px; padding:0.3rem; font-size:0.7rem; text-align:center; }
.checkin-day.done { background:#1a3a1a; border-color:#1abc9c; }
.checkin-day.today { border-color:#f39c12; font-weight:bold; }
.checkin-reward { color:#f39c12; font-size:1.1rem; margin:1rem 0; }
.checkin-already { color:#888; margin:1rem 0; }

/* === TEAM MODE === */
.team-select-screen { max-width:900px; margin:0 auto; padding:2rem; }
.team-card { position:relative; cursor:pointer; }
.team-card.selected { border-color:#f39c12; box-shadow:0 0 12px rgba(243,156,18,0.5); }
.team-check { position:absolute; top:0.5rem; right:0.5rem; color:#f39c12; font-size:1.2rem; font-weight:bold; }
.team-actions { margin-top:2rem; display:flex; gap:1rem; justify-content:center; }
.team-hint { color:#888; margin-bottom:1rem; }
.btn-team-mode, .btn-checkin { background:#1a2a3a; border:1px solid #2980b9; color:#e8e8e8; padding:0.5rem 1rem; border-radius:6px; cursor:pointer; margin: 0.25rem; }

/* === LOCKED CHARACTERS === */
.char-card.locked { opacity:0.6; cursor:not-allowed; }
.locked-portrait { position:relative; }
.locked-icon { filter: grayscale(100%) brightness(0.4); }
.lock-icon { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); font-size:2rem; }
.unlock-condition { font-size:0.75rem; color:#f39c12; margin-top:0.25rem; font-style:italic; }

/* === TOAST === */
.toast-notification { position:fixed; top:1rem; right:1rem; background:#1abc9c; color:#000; padding:0.75rem 1.5rem; border-radius:8px; z-index:99999; animation: fadeInOut 3s ease forwards; }
@keyframes fadeInOut { 0%{opacity:0;transform:translateY(-10px)} 10%{opacity:1;transform:translateY(0)} 80%{opacity:1} 100%{opacity:0} }