/* ==========================================================================
   EKRAN WYBORU POSTACI (Character Select) — nowoczesny karuzela/slider.
   Duży centralny panel podglądu + pionowa lista klas + sloty zapisów.
   ========================================================================== */

#character-select-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Żywe tło w stylu Nexusa: głęboki fiolet + złota poświata u góry
     + subtelna krata rombów (klimat ciepłego marmuru ze Złotego Tronu). */
  background:
    repeating-linear-gradient(45deg, rgba(216, 194, 122, 0.05) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(-45deg, rgba(216, 194, 122, 0.05) 0 1px, transparent 1px 26px),
    radial-gradient(ellipse 70% 48% at 50% -6%, rgba(240, 200, 110, 0.20), transparent 70%),
    linear-gradient(180deg, #2a1e3c 0%, #241a2e 46%, #2c1e22 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 300;
  pointer-events: auto;
  overflow: hidden;
}

#character-select-content {
  width: 100%;
  max-width: 1080px;
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cs-header {
  text-align: center;
}

.cs-title-main {
  font-weight: 900;
  font-size: 44px;
  letter-spacing: 6px;
  margin: 0;
  /* Złoty gradientowy tytuł — żywy akcent brandbooka (Złoty Tron). */
  background: linear-gradient(180deg, #fdf3cf 0%, #eccb74 48%, #c99a3c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 2px 14px rgba(240, 200, 110, 0.35));
}

.cs-subtitle {
  font-size: 13px;
  font-weight: 500;
  color: #e8d5a8;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-top: 4px;
}

.cs-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  align-items: stretch;
}

.cs-section-label {
  font-size: 11px;
  color: #d8b27a;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 700;
}

.cs-class-panel {
  min-height: 0;
}

.cs-class-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cs-class-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(32, 25, 42, 0.92);
  border: 1px solid #4a3d5c;
  border-left: 3px solid #4a3d5c;
  color: #f0e6d2;
  padding: 7px 12px;
  cursor: pointer;
  border-radius: 0;
  text-align: left;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.cs-class-btn:hover {
  background: #352a4a;
  border-color: #7a6699;
  border-left-color: var(--cs-accent, #eccb74);
}

.cs-class-btn.active {
  border-color: var(--cs-accent, #eccb74);
  border-left-color: var(--cs-accent, #eccb74);
  background: #3a2d4e;
  box-shadow:
    0 0 12px color-mix(in srgb, var(--cs-accent, #eccb74) 45%, transparent),
    inset 0 0 18px color-mix(in srgb, var(--cs-accent, #eccb74) 18%, transparent);
}

.cs-class-thumb {
  width: 36px;
  height: 36px;
  image-rendering: pixelated;
}

.cs-class-name {
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 14px;
  text-transform: uppercase;
}

.cs-preview {
  display: flex;
  flex-direction: column;
  background: rgba(32, 25, 42, 0.92);
  border: 1px solid #4a3d5c;
  min-height: 0;
}

.cs-preview-body {
  display: flex;
  gap: 26px;
  padding: 24px 26px;
  align-items: center;
  flex: 1;
  min-height: 300px;
}

.cs-sprite-box {
  flex: 0 0 auto;
  width: 168px;
  height: 168px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Żywa poświata w kolorze akcentu klasy (otoczka z aureolą). */
  background: radial-gradient(circle at center,
    color-mix(in srgb, var(--cs-accent, #eccb74) 22%, transparent),
    transparent 72%);
  border: 1px solid color-mix(in srgb, var(--cs-accent, #eccb74) 55%, #4a3d5c);
  box-shadow: inset 0 0 26px color-mix(in srgb, var(--cs-accent, #eccb74) 15%, transparent);
}

.cs-sprite {
  image-rendering: pixelated;
  width: 128px;
  height: 128px;
}

.cs-info {
  flex: 1;
  min-width: 0;
}

.cs-class-title {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 3px;
  margin: 0 0 6px;
  text-shadow: 0 0 16px currentColor, 2px 2px 0 rgba(0, 0, 0, 0.55);
}

.cs-desc {
  font-size: 14px;
  color: #cfc3b0;
  line-height: 1.5;
  margin: 0 0 16px;
}

.cs-gear-label,
.cs-attrs-label {
  font-size: 10px;
  color: #d8b27a;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 7px;
  font-weight: 700;
}

.cs-gear {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
}

.cs-gear-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 84px;
  text-align: center;
  padding: 8px 4px 6px;
  background: rgba(24, 18, 32, 0.75);
  border: 1px solid #4a3d5c;
}

.cs-gear-item img {
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 6px rgba(240, 200, 110, 0.35));
}

.cs-gear-name {
  font-size: 9px;
  color: #cfc3b0;
  line-height: 1.2;
}

.cs-gear-slot {
  font-size: 8px;
  color: #8a7a9c;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cs-attributes {
  margin-bottom: 8px;
}

.cs-attr-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
  font-size: 11px;
}

.cs-attr-name {
  width: 30px;
  text-transform: uppercase;
  color: #d8b27a;
  font-weight: 700;
}

.cs-attr-track {
  flex: 1;
  height: 8px;
  background: #161020;
  border: 1px solid #4a3d5c;
  overflow: hidden;
}

.cs-attr-fill {
  display: block;
  height: 100%;
  box-shadow: 0 0 8px color-mix(in srgb, var(--cs-accent, #eccb74) 65%, transparent);
}

.cs-attr-val {
  width: 34px;
  text-align: right;
  color: #f0e6d2;
}

.cs-focus {
  font-size: 11px;
  color: #b3c2d8;
  font-style: italic;
}

.cs-create-btn {
  margin: 0 26px 24px;
  /* Żywy złoty przycisk CTA — akcent Złotego Tronu z Nexusa. */
  background: linear-gradient(180deg, #eccb74 0%, #d8a94e 50%, #b8862f 100%);
  border: 1px solid #8a6a24;
  color: #241a08;
  font-family: inherit;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 2px;
  padding: 14px;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.cs-create-btn:hover {
  background: linear-gradient(180deg, #f7e3a4 0%, #e8bc62 50%, #c99a3c 100%);
  box-shadow: 0 0 18px rgba(240, 200, 110, 0.55);
}

.cs-slots {
  display: flex;
  flex-direction: column;
}

.cs-slot-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.cs-slot-card {
  background: rgba(32, 25, 42, 0.92);
  border: 1px solid #4a3d5c;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 96px;
}

.cs-slot-card.occupied {
  border-color: #8a6a24;
  box-shadow: inset 0 0 22px rgba(240, 200, 110, 0.08);
}

.cs-slot-card.empty {
  opacity: 0.7;
  justify-content: center;
}

.cs-slot-name {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #eccb74;
}

.cs-slot-level {
  font-size: 11px;
  color: #8fc2e8;
}

.cs-slot-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.cs-play-btn {
  background: linear-gradient(180deg, #4f9a6d 0%, #2e6a44 100%);
  border: 1px solid #6fbf8f;
  color: #f0fff4;
  padding: 6px 12px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 11px;
  border-radius: 0;
  transition: box-shadow 0.15s ease;
}

.cs-play-btn:hover {
  box-shadow: 0 0 12px rgba(111, 191, 143, 0.55);
}

.cs-delete-btn {
  background: transparent;
  border: 1px solid #6a4038;
  color: #d99a72;
  padding: 6px 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  border-radius: 0;
}

.cs-delete-btn:hover {
  background: #3d2b22;
  color: #f0e6d2;
}

/* ==========================================================================
   BLOKADY KLAS (metaprogresja — progi Sławy u Mistrza Pradawnych)
   ========================================================================== */

.cs-class-btn.locked {
  opacity: 0.6;
}

.cs-class-btn.locked .cs-class-name {
  color: #9a8fa8;
}

.cs-class-lock {
  margin-left: auto;
  font-size: 8px;
  letter-spacing: 1px;
  color: #d99a72;
  border: 1px solid #6a4038;
  padding: 2px 5px;
  white-space: nowrap;
}

.cs-lock-info {
  margin: 0 0 12px;
  padding: 8px 10px;
  background: rgba(106, 64, 56, 0.25);
  border: 1px solid #6a4038;
}

.cs-lock-text {
  font-size: 11px;
  color: #d99a72;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.cs-lock-track {
  height: 8px;
  background: #161020;
  border: 1px solid #4a3d5c;
  overflow: hidden;
}

.cs-lock-fill {
  display: block;
  height: 100%;
  background: #eccb74;
  box-shadow: 0 0 8px rgba(236, 203, 116, 0.5);
}

.cs-lock-progress {
  font-size: 10px;
  color: #b3a8c2;
  margin-top: 4px;
}

/* ==========================================================================
   TOPBAR (imię bohatera + cmentarz) — ciepła paleta spójna z resztą menu
   ========================================================================== */

#player-name-input {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#player-name-input:focus {
  border-color: #eccb74 !important;
  box-shadow: 0 0 10px rgba(236, 203, 116, 0.35);
}

.cs-graveyard-btn:hover {
  border-color: #8a6a24 !important;
  color: #eccb74 !important;
}
