body {
  background: radial-gradient(circle at top, #2a2a2a, #0b0b0b);
  color: #e6e0d4;
  font-family: "Crimson Text", serif;
  padding: 20px;
}

h1, h2 {
  font-family: "Cinzel", serif;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.stats {
  background: #1b1b1b;
  border: 1px solid #444;
  padding: 8px 12px;
  margin-bottom: 14px;
  font-family: "Cinzel", serif;
}

/* =========================
   BOARD LAYOUT
========================= */

.game-board {
  display: grid;
  grid-template-columns: 220px 1fr 320px;
  gap: 32px;
  align-items: start;
  margin: 20px auto;
  max-width: 1400px;
}

.side-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.center-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* =========================
   CARD LAYOUT
========================= */

.room-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 20px;
}

.equip-row {
  display: flex;
  justify-content: center;
  min-height: 230px;
}

.card {
  width: 160px;
  height: 230px;
  display: flex;
  flex-direction: column;

  /* NEW: physical card frame */
  background: linear-gradient(#2e2a25, #1a1713);
  border: 3px solid #6b5b3e;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.6);

  overflow: hidden; /* IMPORTANT: clips art + divider cleanly */
}

/* =========================
   BOSS CARD VARIANT
========================= */

.card.boss {
  border-color: #b8860b; /* dark gold */
  box-shadow:
    0 0 12px rgba(184,134,11,0.6),
    0 8px 16px rgba(0,0,0,0.8);
}

/* Stronger divider for boss */
.card.boss .card-art {
  border-bottom: 3px solid #b8860b;
}

/* Boss number emphasis */
.card.boss .card-number {
  color: #ff1e00; /* gold */
  text-shadow: 0 0 6px rgba(117, 20, 2, 0.6);
}


.card-art {
  flex: 1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 2px solid #6b5b3e;
}

.card-number {
  height: 65px;
  background: #0f0f0f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cinzel", serif;
  font-size: 42px;

  letter-spacing: 1px;
}

/* Type coloring */
.monster .card-number { color: #c94b4b; }
.weapon  .card-number { color: #6fa8dc; }
.potion  .card-number { color: #7bd88f; }

.equipped {
  border-color: gold;
  box-shadow: 0 0 14px rgba(255,215,0,0.5);
}

/* =========================
   DECK / DISCARD
========================= */

.pile {
  width: 160px;
  height: 230px;
  border: 2px dashed #555;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cinzel", serif;
  color: #aaa;
}

#weaponSlot {
  border: 2px dashed #666;
  padding: 10px;
}

#weaponSlot.drag-over {
  border-color: gold;
  background: rgba(255,215,0,0.1);
}

#discardZone.drag-over {
  border-color: #c33;
  background: rgba(180,40,40,0.25);
}

button {
  background: linear-gradient(#3a3a3a, #1e1e1e);
  border: 1px solid #666;
  color: #eee;
  padding: 8px 14px;
  font-family: "Cinzel", serif;
  cursor: pointer;
}

.controls {
  text-align: center;
  margin-top: 20px;
}

.card[draggable="true"] {
  cursor: grab;
}

#weaponSlot.drag-over {
  border-color: gold;
  background: rgba(255,215,0,0.12);
}

/* =========================
   COMBAT LOG
========================= */

.combat-log {
  max-width: 1100px;
  margin: 20px auto;
  padding: 12px;
  background: rgba(0,0,0,0.35);
  border: 1px solid #444;
  font-family: "Crimson Text", serif;
  font-size: 14px;
  line-height: 1.4;
  max-height: 200px;
  overflow-y: auto;
}

.log-entry {
  margin-bottom: 6px;
}

.log-damage {
  color: #e57373;
}

.log-heal {
  color: #81c784;
}

.log-weapon {
  color: #64b5f6;
}

.log-system {
  color: #bbb;
}
/* =========================
   COMBAT LOG COLUMN
========================= */

.log-column {
  display: flex;
  flex-direction: column;
}

.combat-log {
  height: 520px;            /* FIXED HEIGHT */
  overflow-y: auto;
  padding: 12px;
  background: rgba(0,0,0,0.35);
  border: 1px solid #444;
  font-family: "Crimson Text", serif;
  font-size: 14px;
  line-height: 1.4;
}

/* =========================
   RULES MODAL
========================= */

.rules-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.rules-modal.hidden {
  display: none;
}

.rules-content {
  position: relative;
  background: radial-gradient(circle at top, #2a2a2a, #121212);
  border: 2px solid #6b5b3e;
  padding: 24px 28px;
  width: 520px;
  max-height: 80vh;
  overflow-y: auto;
  color: #e6e0d4;
  font-family: "Crimson Text", serif;
}

.rules-content h2,
.rules-content h3 {
  font-family: "Cinzel", serif;
  margin-top: 14px;
}

.rules-content ul {
  padding-left: 18px;
  margin-bottom: 12px;
}

.rules-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: #e6e0d4;
  font-size: 20px;
  cursor: pointer;
}

.rules-close:hover {
  color: #ffcc66;
}

/* =========================
   ENDGAME SCROLL OVERLAY
========================= */

.endgame-overlay {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.endgame-overlay.hidden {
  display: none;
}

.endgame-scroll {
  background: linear-gradient(#3b3429, #221e18);
  border: 3px solid #6b5b3e;
  padding: 32px 48px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.8);
  font-family: "Cinzel", serif;
  text-align: center;
  min-width: 300px;
}

.endgame-scroll h1 {
  margin: 0;
  font-size: 36px;
  letter-spacing: 2px;
}

/* Result coloring */
.endgame-win h1 {
  color: #7bd88f;
}

.endgame-lose h1 {
  color: #e57373;
}

.endgame-draw h1 {
  color: #e6e0d4;
}

/* =========================
   DECK STACK VISUAL
========================= */

.deck-stack {
  position: relative;
  width: 160px;
  height: 230px;
}

.deck-card {
  position: absolute;
  inset: 0;
  background-image: url("Art/card_back.png");
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  border: 2px solid #6b5b3e;
  box-shadow: 0 6px 12px rgba(0,0,0,0.6);
}

/* Slight offsets to imply a stack */
.deck-card:nth-child(2) {
  transform: translate(3px, -3px);
  opacity: 0.85;
}

.deck-card:nth-child(3) {
  transform: translate(6px, -6px);
  opacity: 0.7;
}

/* Empty deck */
.deck-empty {
  color: #777;
  font-family: "Cinzel", serif;
}

/* === WEAPON IMPRINT SLOT === */
.weapon-imprint-slot {
  width: 80px;
  height: 115px; /* 1/4 of card */
  margin-top: 8px;
  border: 2px dashed rgba(180, 160, 120, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.weapon-imprint {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.85;
  filter: grayscale(60%) contrast(1.1);
}




