/* ==========================================================================
   CMENTARZ POLEGŁYCH (Graveyard UI) — kamienne okno „kroniki królestwa".
   ========================================================================== */

#graveyard-screen.gy-screen {
  position: fixed;
  inset: 0;
  display: none;              /* pokazywane przez GraveyardUi.open() */
  align-items: center;
  justify-content: center;
  z-index: 500;
  pointer-events: auto;
}

.gy-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 16, 0.82);
  backdrop-filter: blur(4px);
}

.gy-panel {
  width: min(960px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #23262e 0%, #1a1d24 45%, #14161c 100%);
  border: 1px solid #4a4f5a;
  outline: 2px solid #2c2f36;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: gyAppear 0.3s ease-out;
}

@keyframes gyAppear {
  0% { transform: translateY(14px) scale(0.98); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.gy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #3a3e47;
  background: rgba(255, 255, 255, 0.02);
}

.gy-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gy-title {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #d8dbe2;
  text-transform: uppercase;
}

.gy-subtitle {
  font-size: 11px;
  color: #9aa1ad;
  letter-spacing: 1px;
}

.gy-close {
  background: transparent;
  border: 1px solid #4a4f5a;
  color: #c7ccd6;
  width: 30px;
  height: 30px;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
}

.gy-close:hover {
  background: #3a3e47;
  color: #ffffff;
}

.gy-table-scroll {
  overflow-y: auto;
  max-height: calc(100vh - 220px);
  scrollbar-width: thin;
  scrollbar-color: #4a4f5a #1a1d24;
}

.gy-table-scroll::-webkit-scrollbar {
  width: 8px;
}

.gy-table-scroll::-webkit-scrollbar-track {
  background: #1a1d24;
}

.gy-table-scroll::-webkit-scrollbar-thumb {
  background: #4a4f5a;
  border-radius: 0;
}

.gy-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.gy-table thead th {
  position: sticky;
  top: 0;
  background: #1e2128;
  color: #b6bcc7;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #3a3e47;
  white-space: nowrap;
}

.gy-col-hero  { width: 24%; }
.gy-col-lvl   { width: 9%; }
.gy-col-fame  { width: 10%; }
.gy-col-gear  { width: 22%; }
.gy-col-cause { width: 23%; }
.gy-col-date  { width: 12%; }

.gy-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #2c2f36;
  vertical-align: middle;
  color: #d8dbe2;
  font-size: 12px;
}

.gy-row:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.gy-row:last-child td {
  border-bottom: none;
}

.gy-empty-row td {
  color: #8b919c;
  text-align: center;
  padding: 28px 12px;
  font-style: italic;
}

.gy-hero {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gy-hero-thumb {
  width: 30px;
  height: 30px;
  image-rendering: pixelated;
  flex: 0 0 auto;
  background: var(--ui-slot);
  border: 1px solid #2c2f36;
}

.gy-hero-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.gy-hero-name {
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.gy-hero-class {
  font-size: 10px;
  color: #a8c4d8;
  letter-spacing: 0.5px;
}

.gy-lvl {
  color: #8fb8d8;
  font-weight: 700;
}

.gy-fame {
  color: #d8c27a;
  font-weight: 700;
}

.gy-gear {
  display: flex;
  gap: 5px;
}

.gy-gear-slot {
  position: relative;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ui-slot);
  border: 1px solid #2c2f36;
}

.gy-gear-slot.empty {
  background: var(--ui-slot-empty);
  border-color: #23262e;
}

.gy-gear-slot img {
  width: 22px;
  height: 22px;
  image-rendering: pixelated;
  object-fit: contain;
}

.gy-tier {
  position: absolute;
  right: -3px;
  bottom: -3px;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
  color: #0c0d11;
  background: #d8dbe2;
  padding: 0 2px;
  line-height: 1.2;
}

.gy-cause-label {
  display: block;
  font-size: 9px;
  color: #8b919c;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gy-cause-name {
  display: block;
  font-weight: 700;
  color: #e29a97;
}

.gy-col-date {
  color: #aeb4bd !important;
  white-space: nowrap;
}

.gy-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-top: 1px solid #3a3e47;
  font-size: 10px;
  color: #8b919c;
}

.gy-footer-kbd {
  color: #b6bcc7;
}

/* Przyciski na ekranie śmierci (ZOBACZ CMENTARZ / NOWY BOHATER). */
.death-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

#death-screen-content .death-actions button {
  padding: 10px 14px;
  font-size: 13px;
  letter-spacing: 1px;
  white-space: nowrap;
}

#death-screen-content #graveyard-btn {
  background: #332c2a;
  border-color: #7a5f46;
  color: #e8dcc0;
}

#death-screen-content #graveyard-btn:hover {
  background: #433a33;
}

