/* ============================================
   PARAGONS: CONTRACT RUN — GAME STYLES
   ============================================ */

:root {
  --gold: #C9A84C;
  --gold-light: #E8C97A;
  --gold-dark: #8B6914;
  --bg-deep: #0a0806;
  --bg-dark: #110e09;
  --bg-mid: #1a1510;
  --bg-card: #1e1a12;
  --bg-card-hover: #262015;
  --text-primary: #E8DCC8;
  --text-secondary: #A89878;
  --text-muted: #6B5C44;
  --accent-red: #8B2020;
  --accent-green: #1A5C2A;
  --health-player: #2E7D32;
  --health-enemy: #7B1F1F;
  --border-subtle: rgba(201, 168, 76, 0.15);
  --border-gold: rgba(201, 168, 76, 0.4);
  --font-display: 'Cinzel', serif;
  --font-body: 'EB Garamond', serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
}

/* ============================================
   SCREEN SYSTEM
   ============================================ */

.screen {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.screen.active {
  display: flex;
}

.screen-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.18;
}

.screen-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, var(--bg-deep) 75%);
}

.screen-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1000px;
  height: 100vh;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dark) transparent;
}

.return {
    color: #fff;
    position: relative;
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    text-decoration: none;
    font-style: italic;
    font-size: 18px;
    opacity: .5;
    transition: linear .1s;
    z-index: 999;
}

.return:hover {
  opacity: 1;
}

/* ============================================
   GAME HEADER
   ============================================ */

.game-header {
  text-align: center;
  margin-bottom: 8px;
}

.game-logo {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
}

.game-subtitle {
  font-family: var(--font-display);
  font-size: 45px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: -12px;
  font-weight: 700;
}

.screen-intro {
  font-family: var(--font-display);
  color: #fff;
  font-size: 16px;
  margin: 30px 0;
  letter-spacing: 1px;
  text-align: center;
  text-transform: uppercase;
}

/* ============================================
   DIVIDER
   ============================================ */

.gold-divider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}

.gold-divider::before,
.gold-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-dark));
}

.gold-divider::after {
  background: linear-gradient(to left, transparent, var(--gold-dark));
}

.gold-diamond {
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ============================================
   CHARACTER SELECT
   ============================================ */

.character-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  margin-bottom: 28px;
}

.spinning {
    width: 1000px;
    position: absolute;
    top: -300px;
    right: -300px;
    opacity: .2;
    animation: spinning 90s linear infinite;
}

.spinning-two {
    width: 900px;
    position: absolute;
    bottom: -300px;
    left: -300px;
    opacity: .2;
    animation: spinning-two 120s linear infinite;
}

@keyframes spinning {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes spinning-two {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.character-card {
  border-radius: 4px;
  padding: 20px 5px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.character-card:hover .char-art {
  transform: translateY(-8px);
}

.character-card:hover::before {
  opacity: 1;
}

.character-card.selected {
  border-color: var(--gold);
  background: var(--bg-card-hover);
  box-shadow: 0 0 20px rgba(201,168,76,0.12), inset 0 0 20px rgba(201,168,76,0.04);
}

.char-art {
  width: auto;
  height: 480px;
  border-radius: 0;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: linear .1s;
  overflow: hidden;
}

@media(max-width: 1440px) {
  .char-art {
    height: 400px;
  }
}

.character-card.selected .char-art {
  border-color: var(--gold);
}

.char-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--gold-light);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.char-type {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 10px;
  font-weight: 600;
}

.char-mini-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 16px;
  color: var(--text-muted);
}

.char-mini-stats span {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 18px;
}

.char-mini-stats span img {
    color: #fff;
}

.char-mini-stats i {
    font-size: 18px;
}

.char-mini-stats span {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 22px;
    font-family: var(--font-display);
    font-weight: 800;
}

/* ============================================
   CHARACTER SELECT MODAL
   ============================================ */

.char-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 50;
}

.char-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 51;
  width: 500px;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 0;
  padding: 36px 32px 32px;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
}

.char-modal.active,
.char-modal-backdrop.active {
  display: block;
}

.char-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
}

.char-modal-close:hover {
  color: var(--text-primary);
}

.char-modal-name {
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--gold-light);
    text-transform: uppercase;
    margin-bottom: 14px;
    font-weight: 700;
    letter-spacing: .5px;
}

.char-modal-desc {
  font-family: var(--font-body);
  color: var(--text-secondary);
  font-size: 22px;
  line-height: 1.3;
  margin-bottom: 20px;
}

.char-modal-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
}

.stat-item {
  text-align: center;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-display);
}

.stat-value {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-family: var(--font-display);
}

.char-modal .btn-primary {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bg-deep);
  background: var(--gold);
  border: none;
  padding: 12px 28px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 2px;
  white-space: nowrap;
}

.btn-primary:hover:not(:disabled) {
  background: var(--gold-light);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-secondary {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  background: transparent;
  border: 1px solid var(--border-gold);
  padding: 11px 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 2px;
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(201,168,76,0.08);
  border-color: var(--gold);
}

.btn-secondary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-skip {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  margin-top: 16px;
  transition: color 0.2s;
}

.btn-skip:hover {
  color: var(--text-secondary);
}

.passive-indicator {
  display: none;
  flex-direction: column;
  gap: 3px;
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 4px;
  background: rgba(201,168,76,0.04);
}

.passive-name {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-transform: uppercase;
}

.passive-status {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
}

.passive-ready { color: #7ec87e; }
.passive-used  { color: #666; }

.passive-desc {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ============================================
   MAP SCREEN
   ============================================ */

.map-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---- Artifact tray on map ---- */
.map-artifact-tray {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  justify-content: center;
  min-height: 20px;
}

.map-artifact-pip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--gold-dark);
  cursor: default;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.map-artifact-pip:hover {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(201, 168, 76, 0.35);
}

.map-artifact-pip img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 0 3px rgba(201, 168, 76, 0.3));
}

.map-artifact-tooltip {
  display: none;
  position: absolute;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--gold-dark);
  border-radius: 6px;
  padding: 8px 12px;
  width: 180px;
  text-align: center;
  z-index: 100;
  pointer-events: none;
}

.map-artifact-pip:hover .map-artifact-tooltip {
  display: block;
}

.map-artifact-tooltip-name {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--gold-light);
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.map-artifact-tooltip-desc {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.map-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--gold);
  letter-spacing: 0.1em;
}

.player-hud {
  display: flex;
  gap: 20px;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.8rem;
}

.hud-item {
  text-align: center;
}

.hud-label {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

.hud-value {
  color: var(--text-primary);
  font-size: 1rem;
}

.map-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: center;
}

.map-act {
  width: 100%;
  margin-bottom: 8px;
}

.act-label {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--gold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 8px;
  text-align: center;
  font-weight: 600;
}

.act-rooms {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.map-node {
  width: 200px;
  height: 125px;
  padding: 25px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.map-node.available {
  border-color: var(--border-gold);
  cursor: pointer;
}

.map-node.available:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(201,168,76,0.1);
}

.map-node.completed {
  opacity: 0.5;
  cursor: default;
  border-color: var(--border-subtle);
}

.map-node.locked {
  opacity: 0.45;
  cursor: not-allowed;
}

.map-node.rest-node {
  border-color: rgba(30, 120, 80, 0.3);
}

.map-node.rest-node.available {
  border-color: rgba(30, 120, 80, 0.6);
}

.map-node.boss-node {
  border-color: rgba(139, 32, 32, 0.4);
  width: 200px;
}

.map-node.boss-node.available {
  border-color: rgba(139, 32, 32, 0.8);
  box-shadow: 0 0 20px rgba(139,32,32,0.15);
}

.node-icon {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.node-icon-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.node-name {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
}

.node-type {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 600;
}

.map-connector {
  width: 1px;
  height: 24px;
  background: linear-gradient(to bottom, var(--gold-dark), transparent);
  margin: 0 auto;
  opacity: 0.4;
}

/* ============================================
   COMBAT SCREEN
   ============================================ */

#screen-combat {
  background-image: url(/crucible/assets/gameboard-2.jpg);
  background-size: cover;
  background-position: center;
}

#screen-combat .screen-overlay {
    background: radial-gradient(ellipse at center, transparent 0%, var(--bg-deep) 90%);
}

.combat-layout {
  justify-content: space-between;
  gap: 0;
  padding: 24px 32px;
  position: relative;
}

.enemy-zone {
  display: flex;
  justify-content: center;
  width: 100%;
  padding-top: 8px;
}

.enemy-zone .health-bar-wrap {
  margin: 0 auto 5px;
}

.enemy-card {
  background: var(--bg-card);
  border: 2px solid rgba(139,32,32,0.3);
  border-radius: 12px;
  padding: 10px;
  width: 280px;
  text-align: center;
  position: relative;
}

.enemy-name {
  font-family: var(--font-display);
  font-size: 1rem;
  color: #C97A7A;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.enemy-art {
  width: 100%;
  height: 225px;
  object-fit: cover;
  object-position: center top;
  border-radius: 4px;
  margin: 0 auto 12px;
  display: block;
  border: 1px solid rgba(139,32,32,0.2);
}

.enemy-intent {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-family: var(--font-body);
}

.intent-label {
  color: var(--text-muted);
  font-style: normal;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-right: 4px;
}

/* ============================================
   HEALTH BARS
   ============================================ */

.health-bar-wrap {
  background: rgba(0,0,0,0.4);
  border-radius: 2px;
  height: 6px;
  margin: 8px 0 4px;
  overflow: hidden;
  width: 100px;
  border: 1px solid rgba(255,255,255,0.05);
  display: none;
}

.health-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}

.player-health-bar {
  background: linear-gradient(to right, #1B5E20, #4CAF50);
}

.enemy-health-bar {
  background: linear-gradient(to right, #7B1F1F, #E53935);
}

.health-text {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--gold);
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* ============================================
   COMBAT STATUS BAR
   ============================================ */

.combat-status {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 10px 16px;
  margin: 12px 0;
}

.status-left,
.status-right {
  text-align: center;
  min-width: 48px;
}

.status-label {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-value {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold);
}

.status-center {
  flex: 1;
}

.combat-log {
  font-family: var(--font-body);
  font-size: 20px;
  color: var(--text-secondary);
  text-align: center;
  min-height: 20px;
}

/* ============================================
   PLAYER ZONE
   ============================================ */

.player-zone {
  display: flex;
  gap: 20px;
  width: 100%;
  align-items: flex-end;
  padding-bottom: 20px;
}

.player-info {
  border-radius: 100px;
  padding: 10px;
  width: auto;
  text-align: center;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.player-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-size: cover;
  background-position: center top;
  border: 2px solid rgba(46, 125, 50, 0.4);
  margin-bottom: 4px;
  display: none;
}

.player-name {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--gold-light);
  letter-spacing: 0.06em;
  display: none;
}

.hand-zone {
  flex: 1;
  padding-bottom: 35px;
  justify-content: center;
  display: flex;
  flex-wrap: wrap;
}

.hand-label {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  width: 100%;
  text-align: center;
  font-weight: 600;
}

.hand-cards {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  min-height: 140px;
  width: 780px;
  align-items: flex-start;
  justify-content: center;
}

#btn-end-turn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10;
  font-size: 14px;
  padding: 10px 18px 7px;
}

.hand-cards .game-card:nth-child(1) {
    transform: rotate(-5deg) translate(45px, 25px);
    z-index: 4;
}

.hand-cards .game-card:nth-child(1):hover {
    transform: rotate(-5deg) translate(45px, 0) scale(1.1);
    z-index: 6;
}

.hand-cards .game-card:nth-child(2) {
  z-index: 5;
}

.hand-cards .game-card:nth-child(3) {
    transform: rotate(5deg) translate(-45px, 25px);
    z-index: 4;
}

.hand-cards .game-card:nth-child(3):hover {
    transform: rotate(5deg) translate(-45px, 0) scale(1.1);
    z-index: 6;
}

/* ============================================
   CARDS (HAND & REWARD)
   ============================================ */

.game-card {
  width: 30%;
  height: 300px;
  background: var(--bg-card);
  border: 2px solid var(--gold-dark);
  border-radius: 12px;
  padding: 10px 8px;
  cursor: pointer;
  transition: linear .1s;
  text-align: center;
  position: relative;
  flex-shrink: 0;
  animation: none;
  overflow: hidden;
}

.game-card::before {
  position:absolute;
  bottom: -7px;
  left: -7px;
  content: "";
  width: 100px;
  height: 100px;
}

.game-card::after {
    position: absolute;
    top: -7px;
    right: -7px;
    content: "";
    width: 100px;
    height: 100px;
    transform: rotate(180deg);
}

.game-card:hover {
  border-color: var(--gold);
  background: var(--bg-card-hover);
  transform: translateY(-10px) scale(1.1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 10;
}

.game-card.played {
  opacity: 0.4;
  pointer-events: none;
  transform: translateY(4px);
}

.card-type-badge {
  font-family: var(--font-display);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 2px;
  margin-bottom: 6px;
  display: inline-block;
}

.badge-attack { background: rgba(139,32,32,0.3); color: #E57373; }
.badge-defend { background: rgba(30,92,42,0.3); color: #81C784; }
.badge-ability { background: rgba(74,20,140,0.3); color: #CE93D8; }
.badge-spell { background: rgba(13,71,161,0.3); color: #90CAF9; }
.badge-recruit { background: rgba(130,119,23,0.3); color: #FFF176; }

.card-icon {
  font-size: 1.6rem;
  margin: 4px 0;
}

.card-cost {
  position: absolute;
  top: -2px;
  left: -2px;
  width: 30px;
  height: 30px;
  background: var(--bg-mid);
  border: 2px solid var(--gold-dark);
  border-radius: 8px 0 8px 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  padding-top: 2px;
}

.card-name {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-primary);
  letter-spacing: 0.06em;
  margin-bottom: 15px;
  line-height: 1.3;
}

.card-desc {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.card-value {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold);
  margin-top: 6px;
}

/* ============================================
   REWARD SCREEN
   ============================================ */

.reward-header,
.rest-header {
  text-align: center;
  margin-bottom: 32px;
  margin-top: 5%;
}

.reward-title,
.rest-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.reward-subtitle,
.rest-subtitle {
  font-family: var(--font-body);
  color: var(--text-secondary);
  font-size: 18px;
}

.reward-cards {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.reward-card-wrap .game-card {
  width: 100%;
  padding: 16px 12px;
  height: 350px;
}

.reward-card-wrap {
    width: 30%;
}

.reward-card-wrap .card-name { font-size: 16px; }
.reward-card-wrap .card-desc { font-size: 15px; }
.reward-card-wrap .card-icon { font-size: 2.2rem; }

/* ============================================
   REST SCREEN
   ============================================ */

.rest-options {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.rest-option {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 28px 24px;
  width: 240px;
  text-align: center;
  transition: border-color 0.2s;
}

.rest-option:hover {
  border-color: var(--border-gold);
}

.rest-option-icon {
  font-size: 1.8rem;
  color: var(--gold);
  margin-bottom: 12px;
}

.rest-option-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--gold-light);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.rest-option-desc {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 16px;
}

/* ============================================
   SUMMARY SCREEN
   ============================================ */

.summary-container {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  padding: 32px;
  width: 420px;
  text-align: center;
  margin-bottom: 24px;
  margin-top: 15%;
}

.summary-result {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
  font-weight: 600;
}

.summary-result.victory { color: var(--gold); }
.summary-result.defeat { color: #E57373; }

.summary-mercenary {
  font-family: var(--font-body);
  color: var(--text-secondary);
  font-size: 18px;
  margin-bottom: 20px;
}

.summary-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.summary-stat {
  text-align: center;
}

.summary-stat-label {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.summary-stat-value {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-primary);
}

.summary-cards-acquired {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.summary-footer {
    font-family: var(--font-display);
    font-size: 16px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-dark);
    margin-top: 16px;
    font-weight: 800;
}

.summary-actions {
  display: flex;
  gap: 12px;
}

/* ============================================
   STATUS EFFECTS
   ============================================ */

.status-effects {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 6px 0;
  min-height: 20px;
}

.status-pip {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 2px;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
}

.status-poison { background: rgba(46,125,50,0.25); color: #81C784; }
.status-weak { background: rgba(139,32,32,0.25); color: #EF9A9A; }
.status-strong { background: rgba(245,127,23,0.25); color: #FFCC02; }
.status-shield { background: rgba(13,71,161,0.25); color: #90CAF9; }

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cardDeal {
  from { opacity: 0; transform: translateY(20px) rotate(-2deg); }
  to { opacity: 1; transform: translateY(0) rotate(0deg); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 rgba(201,168,76,0); }
  50% { box-shadow: 0 0 16px rgba(201,168,76,0.3); }
}

.screen.active .screen-content {
  animation: fadeIn 0.3s ease forwards;
}

/* .game-card {
  animation: cardDeal 0.2s ease forwards;
} */

.shake {
  animation: shake 0.3s ease;
}

.pulse-gold {
  animation: pulse-gold 2s linear infinite;
}

/* ============================================
   DAMAGE FLASH
   ============================================ */

.damage-flash-player {
  animation: flashRed 0.4s ease;
}

.damage-flash-enemy {
  animation: flashRed 0.4s ease;
}

@keyframes flashRed {
  0%, 100% { background: var(--bg-card); }
  50% { background: rgba(139,32,32,0.3); }
}

/* ============================================
   ENEMY STATUS ICONS
   ============================================ */

.enemy-status-icons {
  position: absolute;
  bottom: 8px;
  right: -14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  z-index: 10;
}

.enemy-status-icon {
  width: 53px;
  height: 30px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-sizing: border-box;
}

.enemy-status-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.enemy-status-icon--shield {
  background: rgba(0, 71, 171, .6);
  animation: pulse-shield 1.5s ease infinite;
  padding: 4px 7px;
  gap: 4px;
}

.status-icon-value {
  font-family: var(--font-display);
    font-size: 13px;
    color: var(--gold-light);
    letter-spacing: 0.04em;
    line-height: 1;
    font-weight: 600;
}

.enemy-status-icon--weak {
  background: rgba(238, 75, 43, .6);
  animation: pulse-weak 1.5s ease infinite;
  width: auto;
  padding: 4px 7px;
  gap: 4px;
}

.enemy-status-icon--poison {
  background: rgba(46,125,50,.6);
  padding: 4px 7px;
  gap: 4px;
}

/* ============================================
   PLAYER STATUS ICONS
   ============================================ */

.player-status-icons {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0;
  justify-content: center;
  margin: 4px 0 2px;
}

.player-status-icon {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 7px 3px 4px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  color: #e8d9a0;
}

.player-status-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.player-status-icon span {
  line-height: 1;
  font-size: 16px;
}

/*
.player-status-icon--shield {
  background: rgba(13, 71, 161, 0.35);
  border: 1px solid rgba(144, 202, 249, 0.5);
  animation: pulse-shield 1.5s ease infinite;
}

.player-status-icon--poison {
  background: rgba(30, 100, 30, 0.4);
  border: 1px solid rgba(100, 220, 100, 0.45);
  animation: pulse-poison 1.5s ease infinite;
}

.player-status-icon--weak {
  background: rgba(120, 0, 180, 0.3);
  border: 1px solid rgba(200, 130, 255, 0.5);
}

.player-status-icon--stunned {
  background: rgba(160, 130, 0, 0.35);
  border: 1px solid rgba(255, 220, 80, 0.55);
  animation: pulse-stunned 0.8s ease infinite;
  padding: 3px 8px;
}
*/

.status-icon-emoji {
  font-size: 0.9rem;
}

@keyframes pulse-poison {
  0%, 100% { border-color: rgba(100, 220, 100, 0.35); }
  50%       { border-color: rgba(100, 220, 100, 0.8); }
}

@keyframes pulse-stunned {
  0%, 100% { border-color: rgba(255, 220, 80, 0.4); }
  50%       { border-color: rgba(255, 220, 80, 0.9); }
}

/* ============================================
   SHIELD INDICATOR
   ============================================ */

   #player-shield {
    display: none !important;
}



@keyframes pulse-shield {
  0%, 100% { border-color: rgba(13,71,161,0.35); }
  50% { border-color: rgba(13,71,161,0.7); }
}

/* ============================================
   CARD ART THUMBNAIL
   ============================================ */

.card-art-thumb {
  width: 100%;
  height: 180px;
  background: var(--bg-mid);
  border-radius: 2px;
  margin: 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  overflow: hidden;
  border: 1px solid var(--gold-dark);
}

.reward-card-wrap .card-art-thumb {
  height: 225px;
}

/* ============================================
   MANA
   ============================================ */

.player-mana {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin: 4px 0;
}

.mana-orb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  transition: background 0.15s ease;
}

.mana-orb--full {
  background: var(--gold);
  box-shadow: 0 0 6px rgba(91, 164, 245, 0.6);
}

.mana-orb--empty {
  background: rgba(91, 164, 245, 0.1);
}

.mana-orb--bonus {
  border-color: #a0e080;
  background: #a0e080;
  box-shadow: 0 0 6px rgba(160, 224, 128, 0.7);
}

.card-unaffordable {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(60%);
}

/* ============================================
   ARTIFACT SCREEN
   ============================================ */

.artifact-options {
  display: flex;
  gap: 32px;
  justify-content: center;
  align-items: stretch;
  margin-top: 16px;
}

.artifact-card {
  background: var(--bg-card);
  border: 2px solid var(--gold-dark);
  border-radius: 12px;
  padding: 32px 28px;
  width: 280px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.artifact-card:hover {
  border-color: var(--gold);
  transform: translateY(-6px);
  box-shadow: 0 8px 32px rgba(201, 168, 76, 0.25);
}

.artifact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.artifact-icon img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(201, 168, 76, 0.4));
}

.artifact-name {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--gold-light);
  letter-spacing: 0.06em;
}

.artifact-desc {
  font-family: var(--font-body);
  font-size: 016px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================
   ARTIFACT HUD (combat status bar)
   ============================================ */

.artifact-hud {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 4px;
}

.artifact-hud-pip {
  display: inline-flex;
  align-items: center;
  cursor: default;
  filter: drop-shadow(0 0 4px rgba(201, 168, 76, 0.5));
  transition: filter 0.2s;
}

.artifact-hud-pip img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.artifact-hud-pip:hover {
  filter: drop-shadow(0 0 8px rgba(201, 168, 76, 0.9));
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 2px; }

/* ============================================
   MOBILE
   ============================================ */

@media(max-width: 800px) {
    .hand-zone {
      width: 100%;
    }
    .game-card {
      width: 28%;
      height: 225px;
    }
    .combat-layout {
      padding: 15px;
    }
    .card-art-thumb {
      height: 90px;
    }
    .card-name, .card-desc {
      font-size: 12px;
    }
    .char-art {
        height: 300px;
    }
}
