/* ===================================================================
   MORDHEIM CAMPAIGN MANAGER - ADMIN STYLES
   Dark Theme für Admin-Interface
   =================================================================== */

/* ===================================================================
   KAMPAGNEN-SWITCHER
   =================================================================== */

.campaign-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border, #333);
  border-radius: 8px;
  margin-top: 15px;
}

.campaign-switcher-label {
  font-size: 11px;
  color: var(--text-muted, #888);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.campaign-btn {
  padding: 8px 16px;
  border: 2px solid var(--border, #444);
  border-radius: 6px;
  background: var(--bg-input, #0d0d0d);
  color: var(--text-muted, #888);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.campaign-btn:hover {
  border-color: var(--gold, #c9a959);
  color: var(--text, #e0e0e0);
}

.campaign-btn.active {
  border-color: var(--gold, #c9a959);
  background: rgba(201, 169, 89, 0.15);
  color: var(--gold, #c9a959);
}

/* Production Button */
.campaign-btn[data-campaign="production"].active {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

/* Sandbox Button */
.campaign-btn[data-campaign="sandbox"].active {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

/* ===================================================================
   SANDBOX MODE INDICATOR (Global Warning Banner)
   =================================================================== */

.sandbox-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  text-align: center;
  padding: 8px 15px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
}

.sandbox-banner .banner-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sandbox-banner .reset-btn {
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  color: #000;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.sandbox-banner .reset-btn:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* Body padding wenn Banner aktiv */
body.sandbox-mode {
  padding-top: 40px;
}

/* Container Border im Sandbox-Modus */
body.sandbox-mode .container {
  border: 3px solid #f59e0b;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.2);
}

/* ===================================================================
   PRODUCTION MODE INDICATOR (Subtle)
   =================================================================== */

.production-indicator {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 9998;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid #22c55e;
  color: #4ade80;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===================================================================
   EDIT MODAL - BREIT (überschreibt mordheim.css)
   =================================================================== */

#edit-modal .modal {
  max-width: 1000px !important;
  width: 95% !important;
}

/* ===================================================================
   EDIT FORM - BREITES LAYOUT
   =================================================================== */

.edit-form-wide {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Row Layouts */
.edit-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.edit-row-3 {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 15px;
}

/* Section */
.edit-section {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border, #333);
  border-radius: 8px;
  padding: 15px;
}

.edit-section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold, #c9a959);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.edit-section-label .hint {
  font-weight: normal;
  color: var(--text-muted, #888);
  font-size: 10px;
  text-transform: none;
}

/* Fields */
.edit-field {
  display: flex;
  flex-direction: column;
}

.edit-field label {
  font-size: 11px;
  color: var(--text-muted, #888);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.edit-field input,
.edit-field textarea {
  padding: 10px 12px;
  background: var(--bg-input, #0d0d0d);
  border: 1px solid var(--border, #444);
  border-radius: 6px;
  color: var(--text, #e0e0e0);
  font-size: 14px;
  font-family: inherit;
}

.edit-field input:focus,
.edit-field textarea:focus {
  outline: none;
  border-color: var(--gold, #c9a959);
}

.edit-field textarea {
  resize: vertical;
  min-height: 70px;
}

.edit-field input.readonly {
  opacity: 0.6;
  cursor: not-allowed;
}

.edit-field input.total-xp {
  font-weight: bold;
  color: var(--gold, #c9a959);
  background: rgba(201, 169, 89, 0.1);
  border-color: var(--gold, #c9a959);
}

/* Stats Row - alle 10 Stats in einer Reihe */
.edit-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.edit-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
  padding: 8px;
  background: var(--bg-input, #0d0d0d);
  border: 2px solid var(--border, #444);
  border-radius: 8px;
  transition: all 0.2s;
}

.edit-stat label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted, #888);
  margin-bottom: 4px;
}

.edit-stat input {
  width: 50px;
  padding: 6px;
  background: transparent;
  border: none;
  color: var(--text, #e0e0e0);
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}

.edit-stat input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.05);
}

/* Stat Colors */
.edit-stat.stat-buffed {
  background: rgba(34, 197, 94, 0.15);
  border-color: #22c55e;
}

.edit-stat.stat-buffed label {
  color: #4ade80;
}

.edit-stat.stat-nerfed {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
}

.edit-stat.stat-nerfed label {
  color: #f87171;
}

.edit-stat.stat-armor {
  background: rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
}

.edit-stat.stat-armor label {
  color: #60a5fa;
}

/* Weapon Conditional Bonuses - orange/gold styling */
.edit-stat.has-weapon-bonus {
  position: relative;
}

.weapon-bonus-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1a1a1a;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  white-space: nowrap;
  z-index: 10;
  cursor: help;
  animation: weaponBonusPulse 2s ease-in-out infinite;
}

.weapon-bonus-badge::before {
  content: '⚔';
  margin-right: 2px;
  font-size: 8px;
}

@keyframes weaponBonusPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Weapon bonus tooltip */
.weapon-bonus-tooltip {
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  background: #2a2a2a;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 11px;
  color: #e0e0e0;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 100;
  pointer-events: none;
}

.weapon-bonus-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #f59e0b;
}

.edit-stat.has-weapon-bonus:hover .weapon-bonus-tooltip {
  opacity: 1;
  visibility: visible;
}

.weapon-bonus-tooltip .tooltip-title {
  color: #f59e0b;
  font-weight: 600;
  margin-bottom: 4px;
}

.weapon-bonus-tooltip .tooltip-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.weapon-bonus-tooltip .tooltip-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.weapon-bonus-tooltip .tooltip-item .bonus-value {
  color: #4ade80;
  font-weight: 600;
}

.weapon-bonus-tooltip .tooltip-item .condition {
  color: #a8a8a8;
  font-style: italic;
  font-size: 10px;
}

/* Combined stat colors when both buffed/nerfed and has weapon bonus */
.edit-stat.stat-buffed.has-weapon-bonus {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(245, 158, 11, 0.1));
  border-color: #22c55e;
}

.edit-stat.stat-nerfed.has-weapon-bonus {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(245, 158, 11, 0.1));
  border-color: #ef4444;
}

/* Danger Zone */
.edit-danger-zone {
  background: rgba(139, 0, 0, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: 8px;
  padding: 15px;
}

.danger-label {
  font-size: 12px;
  font-weight: 600;
  color: #fca5a5;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.danger-buttons {
  display: flex;
  gap: 10px;
}

.btn-graveyard,
.btn-delete {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-graveyard {
  background: rgba(34, 197, 94, 0.1);
  border-color: #22c55e;
  color: #4ade80;
}

.btn-graveyard:hover {
  background: rgba(34, 197, 94, 0.2);
}

.btn-delete {
  background: rgba(220, 38, 38, 0.1);
  border-color: #dc2626;
  color: #fca5a5;
}

.btn-delete:hover {
  background: rgba(220, 38, 38, 0.2);
}

/* ===================================================================
   WARBAND TABS (statt Dropdown)
   =================================================================== */

.editor-toolbar {
  margin-bottom: 20px;
}

/* Warband Tabs - überschrieben durch neue Styles unten */
/* Alte Styles auskommentiert - siehe Ende der Datei */

/* ===================================================================
   WARBAND HEADER
   =================================================================== */

.wb-header {
  background: var(--bg-card, #1a1a1a);
  border: 1px solid var(--border, #333);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.wb-header-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 100px 100px auto auto;
  gap: 15px;
  align-items: end;
}

.wb-field label {
  display: block;
  font-size: 11px;
  color: var(--text-muted, #888);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.wb-field input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input, #0d0d0d);
  border: 1px solid var(--border, #333);
  border-radius: 6px;
  color: var(--text, #e0e0e0);
  font-size: 14px;
}

.wb-rating {
  background: var(--gold, #c9a959);
  color: #000;
  font-weight: bold;
  font-size: 18px;
  padding: 10px 15px;
  border-radius: 6px;
  text-align: center;
}

.wb-action-btn {
  padding: 10px 15px;
  border: 1px solid var(--border, #333);
  border-radius: 6px;
  background: var(--bg-input, #0d0d0d);
  color: var(--text, #e0e0e0);
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
  transition: all 0.2s;
}

.wb-action-btn:hover {
  border-color: var(--gold, #c9a959);
}

.wb-action-btn.primary {
  background: linear-gradient(135deg, #8b0000, #660000);
  border-color: #a00;
  color: #fff;
}

.wb-action-btn .count {
  background: var(--blood, #8b0000);
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 11px;
  margin-left: 5px;
}

/* ===================================================================
   COLLAPSE SECTIONS
   =================================================================== */

.collapse-section {
  background: var(--bg-card, #1a1a1a);
  border: 1px solid var(--border, #333);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.collapse-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: var(--bg-header, #252525);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: var(--gold, #c9a959);
}

.collapse-header:hover {
  background: #2a2a2a;
}

.collapse-icon {
  font-size: 12px;
  color: var(--text-muted, #888);
}

.collapse-content {
  display: none;
  padding: 15px 20px;
}

.collapse-content.open {
  display: block;
}

/* ===================================================================
   CARDS GRID
   =================================================================== */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}

/* Max 3 Karten nebeneinander */
@media (min-width: 1400px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) and (max-width: 1399px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 899px) {
  .cards-grid { grid-template-columns: 1fr; }
}

/* ===================================================================
   UNIT CARD
   =================================================================== */

.unit-card {
  background: var(--bg-input, #0d0d0d);
  border: 2px solid var(--border, #333);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s;
  position: relative;
}

.unit-card:hover {
  border-color: var(--gold, #c9a959);
}

.unit-card.hero {
  border-color: rgba(201, 169, 89, 0.4);
}

.unit-card.henchman {
  border-color: rgba(100, 100, 100, 0.4);
}

.unit-card.dead {
  opacity: 0.5;
  border-color: #8b0000;
}

/* Edit Button */
.card-edit-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  background: var(--bg-card, #1a1a1a);
  border: 1px solid var(--border, #333);
  border-radius: 6px;
  color: var(--text-muted, #888);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s;
}

.card-edit-btn:hover {
  border-color: var(--gold, #c9a959);
  color: var(--gold, #c9a959);
}

/* Status Banners */
.status-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 12px;
}

.upgrade-banner {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.2), transparent);
  color: #4ade80;
}

.skill-banner {
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.2), transparent);
  color: #c084fc;
}

.vet-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #f59e0b;
  color: #000;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Card Header */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  padding-right: 50px;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.card-name {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--gold, #c9a959);
}

.card-type {
  font-size: 11px;
  color: var(--text-muted, #888);
  margin-top: 2px;
}

.card-badges {
  display: flex;
  gap: 8px;
  align-items: center;
}

.xp-badge {
  background: var(--bg-card, #1a1a1a);
  border: 1px solid var(--border, #333);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold, #c9a959);
}

.xp-badge.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

.cost-badge {
  background: rgba(201, 169, 89, 0.15);
  border: 1px solid var(--gold, #c9a959);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold, #c9a959);
}

.count-ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card, #1a1a1a);
  padding: 5px 10px;
  border-radius: 6px;
}

.count-val {
  font-size: 18px;
  font-weight: bold;
  min-width: 25px;
  text-align: center;
  color: var(--gold, #c9a959);
}

/* Stats Row */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 15px;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.stats-row .stat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  padding: 6px 10px;
  background: var(--bg-input, #0d0d0d);
  border: 2px solid var(--border, #444);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #e0e0e0);
}

.stats-row .stat.buffed {
  background: rgba(34, 197, 94, 0.15);
  border-color: #22c55e;
  color: #4ade80;
}

.stats-row .stat.nerfed {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #f87171;
}

.stats-row .stat.armor {
  background: rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
  color: #60a5fa;
}

/* Card Body */
.card-body {
  padding: 12px 15px;
}

.card-body .field {
  margin-bottom: 10px;
}

.card-body .field label {
  display: block;
  font-size: 10px;
  color: var(--text-muted, #666);
  text-transform: uppercase;
  margin-bottom: 3px;
}

.card-body .field-val {
  font-size: 13px;
  color: var(--text, #e0e0e0);
}

.card-body .field-val.empty {
  color: var(--text-muted, #555);
  font-style: italic;
}

/* Members */
.members {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
}

.members input {
  padding: 6px 10px;
  background: var(--bg-card, #1a1a1a);
  border: 1px solid var(--border, #333);
  border-radius: 4px;
  color: var(--text, #e0e0e0);
  font-size: 12px;
}

.promote-btn {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  border-radius: 6px;
  color: #000;
  font-weight: bold;
  font-size: 12px;
  cursor: pointer;
}

/* XP Track */
.xp-track-section {
  background: rgba(139, 0, 0, 0.1);
  border: 1px solid rgba(139, 0, 0, 0.3);
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 10px;
}

.xp-track-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.xp-track-label {
  font-size: 10px;
  color: var(--text-muted, #888);
  text-transform: uppercase;
}

.xp-track-value {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold, #c9a959);
}

.xp-track-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.xp-box {
  width: 12px;
  height: 12px;
  border: 1px solid #555;
  border-radius: 2px;
  background: var(--bg-input, #0d0d0d);
}

.xp-box.levelup {
  width: 14px;
  height: 14px;
  border: 2px solid var(--gold, #c9a959);
}

.xp-box.filled {
  background: var(--blood, #8b0000);
  border-color: #a00;
}

.xp-box.start.filled {
  background: #5a3d00;
  border-color: var(--gold, #c9a959);
}

/* Buttons */
.sm-btn {
  padding: 4px 10px;
  background: var(--bg-card, #1a1a1a);
  border: 1px solid var(--border, #333);
  border-radius: 4px;
  color: var(--text, #e0e0e0);
  font-size: 12px;
  cursor: pointer;
}

.sm-btn:hover {
  border-color: var(--gold, #c9a959);
}

.sm-btn.success {
  background: #166534;
  border-color: #22c55e;
  color: #4ade80;
}

.sm-btn.danger {
  background: #7f1d1d;
  border-color: #dc2626;
  color: #fca5a5;
}

.add-btn {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 2px dashed var(--border, #333);
  border-radius: 8px;
  color: var(--text-muted, #666);
  font-size: 14px;
  cursor: pointer;
}

.add-btn:hover {
  border-color: var(--gold, #c9a959);
  color: var(--gold, #c9a959);
}

/* Stash */
.stash-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
}

.stash-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-input, #0d0d0d);
  border: 1px solid var(--border, #333);
  border-radius: 6px;
}

.stash-add {
  display: flex;
  gap: 10px;
}

.stash-add input {
  flex: 1;
  padding: 10px 12px;
  background: var(--bg-input, #0d0d0d);
  border: 1px solid var(--border, #333);
  border-radius: 6px;
  color: var(--text, #e0e0e0);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted, #666);
}

/* Hero Option */
.hero-option {
  padding: 12px 15px;
  margin-bottom: 8px;
  background: var(--bg-input, #0d0d0d);
  border: 1px solid var(--border, #333);
  border-radius: 8px;
  cursor: pointer;
}

.hero-option:hover {
  border-color: var(--gold, #c9a959);
}

.hero-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hero-option.required {
  border-color: #22c55e;
}

.hero-option-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.hero-option-header .badge {
  background: #22c55e;
  color: #000;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 8px;
}

.hero-option-header .cost {
  color: var(--gold, #c9a959);
  font-weight: bold;
}

.hero-option-stats {
  font-size: 11px;
  color: var(--text-muted, #888);
  font-family: monospace;
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */

@media (max-width: 1200px) {
  .wb-header-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}

@media (max-width: 900px) {
  .edit-row-2,
  .edit-row-3 {
    grid-template-columns: 1fr;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .danger-buttons {
    flex-direction: column;
  }

  .campaign-switcher {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .campaign-switcher-label {
    text-align: center;
  }

  .campaign-btn {
    text-align: center;
  }
}

@media (max-width: 600px) {
  .wb-header-grid {
    grid-template-columns: 1fr;
  }

  .warband-tabs {
    flex-direction: column;
  }

  .edit-stats-row {
    justify-content: center;
  }

  .sandbox-banner {
    flex-direction: column;
    gap: 8px;
    padding: 10px;
  }
}

/* ===================================================================
   RECRUITMENT DIALOG - GRID LAYOUT
   =================================================================== */

/* Grid Layout für Recruitment Cards */
.recruit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  max-height: 65vh;
  overflow-y: auto;
  padding: 4px;
}

/* Einzelne Recruitment Card */
.recruit-card {
  background: var(--bg-input, #0d0d0d);
  border: 2px solid var(--border, #333);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.recruit-card:hover:not(.disabled) {
  border-color: var(--gold, #c9a959);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.recruit-card:active:not(.disabled) {
  transform: translateY(0);
}

/* Disabled State - Maximum erreicht oder zu teuer */
.recruit-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--bg-secondary, #1a1a1a);
}

/* Nur bei Limit-Reached den Banner zeigen (NICHT bei too-expensive) */
.recruit-card.disabled:not(.too-expensive)::after {
  content: '\26D4 Maximum erreicht';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  background: rgba(198, 40, 40, 0.9);
  color: white;
  padding: 6px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 4px;
  white-space: nowrap;
}

/* Required Highlight */
.recruit-card.required {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.recruit-card.required::before {
  content: '\2B50 ERFORDERLICH';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  text-align: center;
  padding: 3px;
  letter-spacing: 0.5px;
}

.recruit-card.required {
  padding-top: 28px;
}

/* Card Header */
.recruit-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.recruit-name {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold, #c9a959);
  margin: 0;
}

.recruit-cost {
  background: var(--bg-card, #1a1a1a);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--text, #e0e0e0);
  font-weight: 600;
}

/* Limit Indicator */
.recruit-limit {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted, #888);
  margin-bottom: 8px;
}

.recruit-limit-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-card, #1a1a1a);
  border-radius: 2px;
  overflow: hidden;
}

.recruit-limit-fill {
  height: 100%;
  background: var(--gold, #c9a959);
  transition: width 0.3s;
}

.recruit-limit-fill.full {
  background: #ef4444;
}

.recruit-limit-text {
  white-space: nowrap;
}

/* Stats Display */
.recruit-stats {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 4px;
  background: var(--bg-card, #1a1a1a);
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 10px;
}

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

.recruit-stat-label {
  font-size: 0.6rem;
  color: var(--text-muted, #888);
  text-transform: uppercase;
  display: block;
}

.recruit-stat-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text, #e0e0e0);
}

/* Description */
.recruit-desc {
  font-size: 0.75rem;
  color: var(--text-muted, #888);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Special Rules Tags */
.recruit-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.recruit-tag {
  background: rgba(139, 0, 0, 0.3);
  color: #ef9a9a;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 500;
}

/* ===================================================================
   LEVEL-UP ANIMATION
   =================================================================== */

/* Glow Effect für Level-Up */
.unit-card.has-upgrade,
.unit-card.level-up-glow {
  animation: levelUpPulse 2s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5),
  0 0 40px rgba(245, 158, 11, 0.3),
  inset 0 0 10px rgba(245, 158, 11, 0.1);
  border-color: #f59e0b !important;
}

@keyframes levelUpPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.5),
    0 0 40px rgba(245, 158, 11, 0.3),
    inset 0 0 10px rgba(245, 158, 11, 0.1);
  }
  50% {
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.7),
    0 0 60px rgba(245, 158, 11, 0.4),
    inset 0 0 20px rgba(245, 158, 11, 0.2);
  }
}

/* Level-Up Badge */
.level-up-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  animation: levelBadgeBounce 0.6s ease-out;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

@keyframes levelBadgeBounce {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.level-up-badge .level-icon {
  animation: starSpin 1s ease-out;
}

@keyframes starSpin {
  0% { transform: rotate(0deg) scale(0); }
  50% { transform: rotate(180deg) scale(1.3); }
  100% { transform: rotate(360deg) scale(1); }
}

/* Post-Battle Warrior Card with Level-Up */
.pbw-warrior-card.has-levelup {
  border-color: #f59e0b !important;
  background: linear-gradient(135deg,
  rgba(245, 158, 11, 0.1) 0%,
  var(--bg-card, #2a2a2a) 50%,
  rgba(245, 158, 11, 0.1) 100%);
  animation: levelUpCardPulse 3s ease-in-out infinite;
}

@keyframes levelUpCardPulse {
  0%, 100% {
    border-color: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
  }
  50% {
    border-color: #fbbf24;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
  }
}

/* XP Progress Bar Animation */
.xp-progress-animated {
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.xp-progress-fill.leveling-up {
  background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
  background-size: 200% 100%;
  animation: xpShimmer 1.5s ease-in-out infinite;
}

@keyframes xpShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===================================================================
   ADDITIONAL UI IMPROVEMENTS
   =================================================================== */

/* Unit Card Hover Enhancement */
.unit-card {
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.unit-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Modal Entrance Animation */
.modal-overlay.active .modal,
.modal-overlay.active .modal-container,
.modal-overlay.active .modal-content {
  animation: modalZoomIn 0.25s ease-out;
}

@keyframes modalZoomIn {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Injury Result Animations */
.injury-result-dead {
  animation: injuryDeadShake 0.5s ease-out;
  background: rgba(198, 40, 40, 0.2) !important;
  border-color: #c62828 !important;
}

@keyframes injuryDeadShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.injury-result-survives {
  animation: injurySurvivesPulse 0.5s ease-out;
  background: rgba(46, 125, 50, 0.2) !important;
  border-color: #2e7d32 !important;
}

@keyframes injurySurvivesPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Stat Change Indicators */
.stat-increased {
  color: #4ade80 !important;
  animation: statIncrease 0.5s ease-out;
}

@keyframes statIncrease {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); color: #86efac; }
  100% { transform: scale(1); }
}

.stat-decreased {
  color: #f87171 !important;
  animation: statDecrease 0.5s ease-out;
}

@keyframes statDecrease {
  0% { transform: scale(1); }
  50% { transform: scale(0.9); color: #fca5a5; }
  100% { transform: scale(1); }
}

/* Scrollbar Styling für Recruit Grid */
.recruit-grid::-webkit-scrollbar {
  width: 8px;
}

.recruit-grid::-webkit-scrollbar-track {
  background: var(--bg-secondary, #1a1a1a);
  border-radius: 4px;
}

.recruit-grid::-webkit-scrollbar-thumb {
  background: var(--border, #333);
  border-radius: 4px;
}

.recruit-grid::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted, #888);
}

/* Recruitment Dialog Responsive */
@media (max-width: 600px) {
  .recruit-grid {
    grid-template-columns: 1fr;
  }

  .recruit-stats {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ===================================================================
   ADVANCEMENT SYSTEM STYLES
   =================================================================== */

.advancement-modal {
  text-align: center;
  padding: 20px;
}

/* Warrior Info */
.adv-warrior-info {
  margin-bottom: 25px;
  padding: 15px;
  background: var(--bg-card, #1a1a1a);
  border-radius: 10px;
  border: 2px solid var(--gold, #c9a959);
}

.adv-warrior-name {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold, #c9a959);
  margin-bottom: 5px;
}

.adv-warrior-type {
  font-size: 0.9rem;
  color: var(--text-muted, #888);
}

/* Dice Container */
.adv-dice-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 30px 0;
}

.adv-dice {
  width: 80px;
  height: 80px;
  background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
  border: 3px solid var(--border, #333);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text, #e0e0e0);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.1s;
}

.adv-dice.rolling {
  animation: diceShake 0.1s ease-in-out infinite;
  border-color: var(--gold, #c9a959);
  box-shadow: 0 0 20px rgba(201, 169, 89, 0.5);
}

.adv-dice.final {
  border-color: var(--gold, #c9a959);
  color: var(--gold, #c9a959);
  animation: diceFinal 0.5s ease-out;
  box-shadow: 0 0 30px rgba(201, 169, 89, 0.6);
}

@keyframes diceShake {
  0%, 100% { transform: rotate(-5deg) scale(1.05); }
  50% { transform: rotate(5deg) scale(1.05); }
}

@keyframes diceFinal {
  0% { transform: scale(1.3); }
  50% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* Result Display */
.adv-result-display {
  margin: 25px 0;
  min-height: 100px;
}

.adv-total {
  font-size: 1.1rem;
  color: var(--text-muted, #888);
}

.adv-total-final {
  margin-bottom: 15px;
}

.adv-total-number {
  display: inline-block;
  font-size: 3rem;
  font-weight: 700;
  padding: 10px 25px;
  border-radius: 10px;
  animation: resultPop 0.5s ease-out;
}

.adv-result-normal .adv-total-number {
  background: var(--bg-card, #1a1a1a);
  color: var(--text, #e0e0e0);
  border: 2px solid var(--border, #333);
}

.adv-result-skill .adv-total-number {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(139, 0, 139, 0.3));
  color: #c084fc;
  border: 2px solid #a855f7;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

.adv-result-legendary .adv-total-number {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.4), rgba(234, 179, 8, 0.4));
  color: #fbbf24;
  border: 2px solid #f59e0b;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.6);
  animation: legendaryPulse 1s ease-in-out infinite;
}

@keyframes resultPop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes legendaryPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(245, 158, 11, 0.6); }
  50% { box-shadow: 0 0 50px rgba(245, 158, 11, 0.9); }
}

.adv-result-text {
  font-size: 1.3rem;
  font-weight: 600;
  animation: textFadeIn 0.5s ease-out 0.3s both;
}

.adv-result-text.adv-result-skill {
  color: #c084fc;
}

.adv-result-text.adv-result-legendary {
  color: #fbbf24;
  font-size: 1.5rem;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

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

/* Action Area */
.adv-action-area {
  margin-top: 20px;
}

.btn-advancement-roll {
  background: linear-gradient(135deg, #8b0000, #660000);
  border: 2px solid #a00;
  color: white;
  padding: 15px 40px;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-advancement-roll:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(139, 0, 0, 0.5);
}

.adv-rolling {
  font-size: 1.2rem;
  color: var(--gold, #c9a959);
  animation: pulse 0.5s ease-in-out infinite;
}

/* Stat Increase Display */
.adv-stat-increase {
  background: rgba(74, 222, 128, 0.1);
  border: 2px solid #4ade80;
  border-radius: 10px;
  padding: 15px 25px;
  margin-bottom: 15px;
  display: inline-block;
}

.adv-stat-increase .stat-name {
  font-size: 1rem;
  color: var(--text-muted, #888);
  display: block;
  margin-bottom: 5px;
}

.adv-stat-increase .stat-change {
  font-size: 1.5rem;
  font-weight: 700;
  color: #4ade80;
}

/* Choice Buttons */
.adv-choice-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 350px;
  margin: 0 auto;
}

.btn-choice {
  background: var(--bg-card, #1a1a1a);
  border: 2px solid var(--border, #333);
  color: var(--text, #e0e0e0);
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
}

.btn-choice:hover:not(:disabled) {
  border-color: var(--gold, #c9a959);
  background: rgba(201, 169, 89, 0.1);
}

.btn-choice.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Max Reached Warning */
.adv-max-reached {
  background: rgba(245, 158, 11, 0.1);
  border: 2px solid #f59e0b;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  color: #fbbf24;
}

/* Secondary Roll */
.adv-secondary-roll {
  margin-bottom: 15px;
}

.adv-roll-info {
  font-size: 0.9rem;
  color: var(--text-muted, #888);
}

.adv-mini-dice {
  display: inline-block;
  width: 50px;
  height: 50px;
  background: var(--bg-card, #1a1a1a);
  border: 2px solid var(--gold, #c9a959);
  border-radius: 10px;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold, #c9a959);
  line-height: 46px;
  margin-bottom: 10px;
}

/* Skill Selection */
.skill-selection-container {
  text-align: left;
}

.skill-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 10px 5px;
}

.skill-category {
  background: var(--bg-card, #1a1a1a);
  border: 1px solid var(--border, #333);
  border-radius: 10px;
  overflow: hidden;
}

.skill-category-header {
  background: var(--bg-header, #252525);
  color: var(--gold, #c9a959);
  padding: 10px 15px;
  margin: 0;
  font-size: 1rem;
  font-family: 'Cinzel', serif;
}

.skill-list {
  padding: 10px;
}

.skill-option {
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--bg-input, #0d0d0d);
  border: 1px solid var(--border, #333);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.skill-option:hover {
  border-color: #a855f7;
  background: rgba(168, 85, 247, 0.1);
}

.skill-option:last-child {
  margin-bottom: 0;
}

.skill-name {
  font-weight: 600;
  color: var(--text, #e0e0e0);
  margin-bottom: 4px;
}

.skill-desc {
  font-size: 0.8rem;
  color: var(--text-muted, #888);
  line-height: 1.3;
}

.no-skills {
  text-align: center;
  color: var(--text-muted, #888);
  padding: 30px;
  font-style: italic;
}

/* LGT Celebration */
.adv-lgt-celebration {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(234, 179, 8, 0.1));
  border: 3px solid #f59e0b;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 20px;
  animation: lgtGlow 2s ease-in-out infinite;
}

@keyframes lgtGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 40px rgba(245, 158, 11, 0.7); }
}

.lgt-stars {
  font-size: 2rem;
  margin-bottom: 10px;
  animation: starBounce 1s ease-in-out infinite;
}

@keyframes starBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.adv-lgt-celebration h3 {
  color: #fbbf24;
  font-size: 1.5rem;
  margin: 10px 0;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.lgt-info {
  color: var(--text-muted, #888);
  font-size: 0.9rem;
}

.btn-legendary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  color: white;
  padding: 15px 30px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
}

.btn-legendary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.5);
}

/* LGT Skill List Selection */
.lgt-skill-list-selection {
  text-align: center;
}

.lgt-list-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.lgt-list-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  background: var(--bg-card, #1a1a1a);
  border: 2px solid var(--border, #333);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.lgt-list-option:hover {
  border-color: var(--gold, #c9a959);
}

.lgt-list-option:has(input:checked) {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
}

.lgt-list-checkbox {
  width: 20px;
  height: 20px;
  accent-color: #f59e0b;
}

.lgt-list-name {
  font-weight: 600;
  color: var(--text, #e0e0e0);
}

.lgt-selected-count {
  margin: 15px 0;
  font-size: 1.1rem;
  color: var(--text-muted, #888);
}

.lgt-selected-count span {
  color: #f59e0b;
  font-weight: 700;
}

/* ===================================================================
   DICE INPUT UI (Manual Entry)
   =================================================================== */

.adv-instruction {
  text-align: center;
  margin: 15px 0;
  color: var(--text-muted, #888);
}

.adv-instruction strong {
  color: var(--gold, #c9a959);
}

.adv-dice-input-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
}

.adv-dice-input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.adv-dice-input-group label {
  font-size: 0.8rem;
  color: var(--text-muted, #888);
}

.adv-dice-input {
  width: 70px;
  height: 70px;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  background: var(--bg-card, #1a1a1a);
  border: 3px solid var(--border, #333);
  border-radius: 12px;
  color: var(--text, #e0e0e0);
  outline: none;
  transition: all 0.2s;
}

.adv-dice-input:focus {
  border-color: var(--gold, #c9a959);
  box-shadow: 0 0 15px rgba(201, 169, 89, 0.4);
}

.adv-dice-input::placeholder {
  color: var(--text-muted, #555);
}

/* Hide number spinners */
.adv-dice-input::-webkit-outer-spin-button,
.adv-dice-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.adv-dice-input[type=number] {
  -moz-appearance: textfield;
}

.adv-dice-plus,
.adv-dice-equals {
  font-size: 1.5rem;
  color: var(--text-muted, #888);
  font-weight: 700;
}

.adv-dice-total {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  background: var(--bg-input, #0d0d0d);
  border: 3px solid var(--border, #333);
  border-radius: 12px;
  color: var(--text-muted, #555);
  transition: all 0.3s;
}

.adv-dice-total.valid {
  border-color: var(--gold, #c9a959);
  color: var(--gold, #c9a959);
  background: rgba(201, 169, 89, 0.1);
  box-shadow: 0 0 15px rgba(201, 169, 89, 0.3);
}

/* Table Preview */
.adv-table-preview {
  margin: 20px 0;
  padding: 15px;
  background: var(--bg-input, #0d0d0d);
  border-radius: 10px;
}

.adv-table-preview h4 {
  text-align: center;
  color: var(--text-muted, #888);
  font-size: 0.85rem;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.adv-table-grid {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 3px;
}

.adv-table-cell {
  padding: 6px 4px;
  text-align: center;
  background: var(--bg-card, #1a1a1a);
  border-radius: 4px;
  transition: all 0.2s;
}

.adv-table-cell .adv-table-roll {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text, #e0e0e0);
}

.adv-table-cell .adv-table-result {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted, #888);
  margin-top: 2px;
}

.adv-table-cell.skill-result {
  background: rgba(168, 85, 247, 0.15);
}

.adv-table-cell.skill-result .adv-table-result {
  color: #c084fc;
}

.adv-table-cell.lgt-result {
  background: rgba(245, 158, 11, 0.15);
}

.adv-table-cell.lgt-result .adv-table-result {
  color: #fbbf24;
}

.adv-table-cell.highlighted {
  background: var(--gold, #c9a959) !important;
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(201, 169, 89, 0.5);
}

.adv-table-cell.highlighted .adv-table-roll,
.adv-table-cell.highlighted .adv-table-result {
  color: #000 !important;
}

/* Animation Phase */
.adv-animation-phase {
  text-align: center;
  padding: 40px 20px;
}

.adv-rolling-text {
  margin-top: 20px;
  font-size: 1.2rem;
  color: var(--gold, #c9a959);
  animation: pulse 0.5s ease-in-out infinite;
}

/* Result Phase */
.adv-result-phase {
  text-align: center;
  padding: 20px;
}

/* Secondary Roll Input */
.adv-secondary-input {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.adv-secondary-input .adv-dice-input {
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
}

.adv-secondary-result {
  animation: fadeIn 0.5s ease-out;
}

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

/* Large Button */
.btn-large {
  padding: 15px 30px !important;
  font-size: 1.1rem !important;
}

/* ===================================================================
   EDIT MODAL ADVANCE SECTION
   =================================================================== */

.edit-advance-section {
  margin: 15px 0;
}

.advance-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 15px 20px;
  background: linear-gradient(135deg, rgba(201, 169, 89, 0.15), rgba(201, 169, 89, 0.05));
  border: 2px solid var(--gold, #c9a959);
  border-radius: 10px;
  animation: advancePulse 2s ease-in-out infinite;
}

@keyframes advancePulse {
  0%, 100% { box-shadow: 0 0 10px rgba(201, 169, 89, 0.3); }
  50% { box-shadow: 0 0 25px rgba(201, 169, 89, 0.6); }
}

.advance-icon {
  font-size: 1.5rem;
}

.advance-text {
  color: var(--gold, #c9a959);
  font-size: 1rem;
}

.btn-advance {
  background: linear-gradient(135deg, #8b0000, #660000);
  border: 2px solid #a00;
  color: white;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-advance:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(139, 0, 0, 0.4);
}

/* Confetti Particles */
.confetti-particle {
  position: fixed;
  top: -20px;
  z-index: 10000;
  pointer-events: none;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Spell Selection */
.spell-selection,
.mutation-selection {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  max-height: 50vh;
  overflow-y: auto;
  margin: 15px 0;
}

.spell-option,
.mutation-option {
  padding: 15px;
  background: var(--bg-card, #1a1a1a);
  border: 2px solid var(--border, #333);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.spell-option:hover {
  border-color: #60a5fa;
  background: rgba(96, 165, 250, 0.1);
}

.mutation-option:hover {
  border-color: #a855f7;
  background: rgba(168, 85, 247, 0.1);
}

.spell-name,
.mutation-name {
  font-weight: 600;
  color: var(--text, #e0e0e0);
  margin-bottom: 5px;
}

.spell-difficulty {
  font-size: 0.8rem;
  color: #60a5fa;
  margin-bottom: 5px;
}

.spell-desc,
.mutation-desc {
  font-size: 0.85rem;
  color: var(--text-muted, #888);
  line-height: 1.4;
}

/* Button Variants */
.btn-special {
  background: var(--bg-card, #1a1a1a);
  border: 2px solid #a855f7;
  color: #c084fc;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  margin: 5px;
  transition: all 0.2s;
}

.btn-special:hover {
  background: rgba(168, 85, 247, 0.2);
}

/* ===================================================================
   PILLS STYLES - Für Fähigkeiten, Zauber, Mutationen, Verletzungen
   =================================================================== */

/* ===================================================================
   ABILITIES PILLS CONTAINER (Kartenansicht)
   =================================================================== */

.abilities-pills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0;
  min-height: 32px;
}

.abilities-pills-container.empty {
  color: #666;
  font-style: italic;
}

/* ===================================================================
   ABILITY PILLS (Skills, Spells, Mutations)
   =================================================================== */

.ability-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

/* Skill Pills - Standard grau/gold */
.skill-pill {
  background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
  color: #d4af37;
  border-color: #4a4a4a;
}

.skill-pill:hover {
  background: linear-gradient(135deg, #4a4a4a 0%, #3a3a3a 100%);
  border-color: #d4af37;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

/* Spell Pills - Blau/Magisch */
.spell-pill {
  background: linear-gradient(135deg, #1a2a4a 0%, #0d1a33 100%);
  color: #60a5fa;
  border-color: #2a4a7a;
}

.spell-pill:hover {
  background: linear-gradient(135deg, #2a3a5a 0%, #1a2a4a 100%);
  border-color: #60a5fa;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(96, 165, 250, 0.3);
}

/* Mutation Pills - Lila/Chaos */
.mutation-pill {
  background: linear-gradient(135deg, #3a1a4a 0%, #2a0d33 100%);
  color: #c084fc;
  border-color: #5a2a7a;
}

.mutation-pill:hover {
  background: linear-gradient(135deg, #4a2a5a 0%, #3a1a4a 100%);
  border-color: #c084fc;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(192, 132, 252, 0.3);
}

/* Sacred Marking Pills - Grün/Jade für Lizardmen */
.sacred-marking-pill {
  background: linear-gradient(135deg, #1a4a3a 0%, #0d332a 100%);
  color: #4ade80;
  border-color: #2a7a5a;
}

.sacred-marking-pill:hover {
  background: linear-gradient(135deg, #2a5a4a 0%, #1a4a3a 100%);
  border-color: #4ade80;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(74, 222, 128, 0.3);
}

.sacred-marking-pill .pill-icon {
  color: #4ade80;
}

.ability-pill .pill-icon {
  font-size: 0.85em;
  opacity: 0.9;
}

.ability-pill .pill-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.no-skills {
  color: #666;
  font-style: italic;
  padding: 4px 0;
}

/* ===================================================================
   INJURY PILLS
   =================================================================== */

.injuries-pills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0;
}

.injury-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, #4a1a1a 0%, #3a0d0d 100%);
  color: #f87171;
  border: 1px solid #6a2a2a;
}

.injury-pill:hover {
  background: linear-gradient(135deg, #5a2a2a 0%, #4a1a1a 100%);
  border-color: #f87171;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(248, 113, 113, 0.3);
}

.injury-pill .pill-icon {
  font-size: 0.85em;
}

.injury-pill .pill-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

/* ===================================================================
   EDIT MODAL EQUIPMENT PILLS
   =================================================================== */

.edit-equipment-pills-container {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
}

.equipment-pills {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px solid #3a3a3a;
}

.edit-equipment-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  color: #e5e5e5;
  border: 1px solid #4a4a4a;
  position: relative;
}

.edit-equipment-pill:hover {
  background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
  border-color: #d4af37;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

.edit-equipment-pill .pill-icon {
  font-size: 1em;
  opacity: 0.8;
}

.edit-equipment-pill .pill-name {
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.edit-equipment-pill .pill-price {
  font-size: 0.75rem;
  color: #d4af37;
  opacity: 0.8;
  padding-left: 4px;
  border-left: 1px solid #4a4a4a;
  margin-left: 4px;
}

.edit-equipment-pill .pill-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(139, 0, 0, 0.6);
  color: #fff;
  border: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  margin-left: 4px;
  padding: 0;
  transition: all 0.2s;
}

.edit-equipment-pill .pill-remove:hover {
  background: #8b0000;
  transform: scale(1.1);
}

.no-equipment-pills {
  color: #666;
  font-style: italic;
  padding: 8px;
  width: 100%;
  text-align: center;
}

/* ===================================================================
   FLOATING TOOLTIP
   =================================================================== */

.floating-ability-tooltip {
  position: fixed;
  z-index: 10001;
  max-width: 320px;
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  border: 1px solid #4a4a4a;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.2s ease;
  pointer-events: auto;
}

.floating-ability-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.ability-tooltip-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(212, 175, 55, 0.1);
  border-bottom: 1px solid #3a3a3a;
  border-radius: 8px 8px 0 0;
}

.ability-tooltip-header .tooltip-icon {
  font-size: 1.2em;
}

.ability-tooltip-header .tooltip-title {
  flex: 1;
  font-weight: 600;
  color: #d4af37;
  font-size: 1rem;
}

.ability-tooltip-header .tooltip-type {
  font-size: 0.75rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ability-tooltip-body {
  padding: 12px 16px;
  color: #ccc;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Injury Tooltip Header - Rot */
.injury-tooltip-header {
  background: rgba(139, 0, 0, 0.2);
}

.injury-tooltip-header .tooltip-title {
  color: #f87171;
}

/* Equipment Pill Tooltip */
.equipment-pill-tooltip {
  padding: 8px;
}

.equipment-tooltip-header {
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #3a3a3a;
  color: #d4af37;
}

.equipment-tooltip-rules {
  padding: 8px 0;
  font-size: 0.85rem;
  color: #aaa;
  line-height: 1.4;
  border-bottom: 1px solid #3a3a3a;
  margin-bottom: 8px;
}

.equipment-tooltip-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tooltip-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
}

.tooltip-btn.sell {
  border-color: #d4af37;
  color: #d4af37;
}

.tooltip-btn.sell:hover {
  background: rgba(212, 175, 55, 0.2);
}

.tooltip-btn.stash {
  border-color: #60a5fa;
  color: #60a5fa;
}

.tooltip-btn.stash:hover {
  background: rgba(96, 165, 250, 0.2);
}

.tooltip-btn.remove {
  border-color: #8b0000;
  color: #f87171;
}

.tooltip-btn.remove:hover {
  background: rgba(139, 0, 0, 0.2);
}

/* ===================================================================
   PILLS RESPONSIVE
   =================================================================== */

@media (max-width: 768px) {
  .ability-pill .pill-name {
    max-width: 100px;
  }

  .injury-pill .pill-name {
    max-width: 120px;
  }

  .edit-equipment-pill .pill-name {
    max-width: 100px;
  }

  .floating-ability-tooltip {
    max-width: 280px;
    left: 10px !important;
    right: 10px !important;
  }
}

@media (max-width: 480px) {
  .abilities-pills-container,
  .injuries-pills-container {
    gap: 4px;
  }

  .ability-pill,
  .injury-pill {
    padding: 3px 8px;
    font-size: 0.75rem;
  }

  .edit-equipment-pills-container {
    flex-direction: column;
  }

  .equipment-pills {
    width: 100%;
  }
}

/* ===================================================================
   WARBAND HEADER - COMPACT 2-ROW LAYOUT (v2)
   =================================================================== */

.wb-header-compact {
  background: var(--bg-card, #1a1a1a);
  border: 1px solid var(--border, #333);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

/* Row 1: Name + Stats */
.wb-header-row-1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 12px;
}

.wb-identity {
  flex: 1;
  min-width: 0;
}

.wb-name {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gold, #c9a959);
  margin: 0 0 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wb-type {
  font-size: 0.8rem;
  color: var(--text-muted, #888);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Stats Row - 4 kompakte Boxen */
.wb-stats-row {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.wb-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 75px;
  padding: 8px 12px;
  background: var(--bg-input, #0d0d0d);
  border: 1px solid var(--border, #333);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wb-stat:hover {
  border-color: var(--gold, #c9a959);
  transform: translateY(-1px);
}

.wb-stat-icon {
  font-size: 0.75rem;
  margin-bottom: 2px;
}

.wb-stat-label {
  font-size: 0.6rem;
  color: var(--text-muted, #666);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wb-stat-val {
  font-size: 1.25rem;
  font-weight: bold;
  line-height: 1.2;
}

/* Farbakzente für Stats */
.wb-stat.gold { border-color: rgba(218, 165, 32, 0.4); }
.wb-stat.gold .wb-stat-val { color: #DAA520; }

.wb-stat.wyrdstone { border-color: rgba(138, 43, 226, 0.4); }
.wb-stat.wyrdstone .wb-stat-val { color: #9370DB; }

.wb-stat.stash { border-color: rgba(100, 149, 237, 0.4); }
.wb-stat.stash .wb-stat-val { color: #6495ED; }

.wb-stat.rating { border-color: rgba(139, 0, 0, 0.5); }
.wb-stat.rating .wb-stat-val { color: #dc3545; }

/* Gold-Stat: Admin hat Stift-Icon, alle haben Pointer */
.wb-stat.gold.admin-editable {
  position: relative;
}
.wb-stat.gold.admin-editable::after {
  content: '✎';
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 0.6rem;
  color: rgba(218, 165, 32, 0.5);
  pointer-events: none;
}

/* --- Gold-Modal: Historie + Admin-Bereich --- */

.gold-history-section {
  margin-top: 12px;
}

.gold-history-header {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: var(--gold, #c9a959);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(201, 169, 89, 0.15);
  margin-bottom: 6px;
}

.gold-log-list {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 169, 89, 0.3) transparent;
}

.gold-log-empty {
  text-align: center;
  color: var(--text-muted, #666);
  font-style: italic;
  padding: 20px 10px;
  font-size: 0.85rem;
}

.gold-log-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.15s;
}

.gold-log-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.gold-log-row.income {
  border-left: 2px solid rgba(74, 222, 128, 0.4);
}

.gold-log-row.expense {
  border-left: 2px solid rgba(248, 113, 113, 0.4);
}

.gold-log-date {
  color: var(--text-muted, #666);
  font-size: 0.72rem;
  white-space: nowrap;
  min-width: 85px;
  font-variant-numeric: tabular-nums;
}

.gold-log-desc {
  flex: 1;
  color: var(--text-secondary, #aaa);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gold-log-amount {
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.gold-log-amount.income {
  color: #4ade80;
}

.gold-log-amount.expense {
  color: #f87171;
}

.gold-log-truncated {
  text-align: center;
  color: var(--text-muted, #666);
  font-size: 0.75rem;
  font-style: italic;
  padding: 6px;
}

/* Highlight-Animation für neue Einträge */
.gold-log-new {
  background: rgba(201, 169, 89, 0.12) !important;
}

.gold-log-highlight {
  animation: goldLogFlash 0.6s ease;
}

@keyframes goldLogFlash {
  0% { background: rgba(201, 169, 89, 0.25); }
  100% { background: rgba(255, 255, 255, 0.02); }
}

/* Admin-Bereich: Abgetrennt mit Divider */
.gold-admin-section {
  margin-top: 10px;
  padding-top: 0;
}

.gold-admin-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.75rem;
  color: var(--text-muted, #666);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gold-admin-divider::before,
.gold-admin-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(201, 169, 89, 0.2);
}

/* Row 2: Checkbox links, Buttons rechts */
.wb-header-row-2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border, #333);
}

.wb-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted, #aaa);
  user-select: none;
}

.wb-checkbox:hover {
  color: var(--text, #e0e0e0);
}

.wb-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold, #c9a959);
  cursor: pointer;
}

.wb-actions {
  display: flex;
  gap: 8px;
}

.wb-btn {
  padding: 6px 12px;
  border: 1px solid var(--border, #444);
  border-radius: 5px;
  background: var(--bg-input, #0d0d0d);
  color: var(--text, #e0e0e0);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.wb-btn:hover {
  border-color: var(--gold, #c9a959);
  background: rgba(201, 169, 89, 0.1);
}

.wb-btn.primary {
  background: linear-gradient(135deg, #8b0000, #660000);
  border-color: #a00;
  color: #fff;
}

.wb-btn.primary:hover {
  background: linear-gradient(135deg, #a00000, #770000);
}

.wb-btn-count {
  display: inline-block;
  background: #8b0000;
  color: white;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: bold;
  margin-left: 4px;
}

/* ===================================================================
   TRADING BANNER SLIM
   =================================================================== */

.trading-banner-slim {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.12), rgba(75, 0, 130, 0.08));
  border: 1px solid rgba(138, 43, 226, 0.25);
  border-radius: 6px;
  margin-bottom: 16px;
}

.trading-banner-slim .trading-banner-icon {
  font-size: 1.2rem;
}

.trading-banner-slim .trading-banner-msg {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text, #e0e0e0);
}

.trading-banner-slim .trading-banner-btns {
  display: flex;
  gap: 8px;
}

.btn-slim {
  padding: 5px 10px;
  border: 1px solid var(--border, #444);
  border-radius: 4px;
  background: transparent;
  color: var(--text, #e0e0e0);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-slim:hover {
  border-color: var(--gold, #c9a959);
}

.btn-slim.primary {
  background: linear-gradient(135deg, #6a0dad, #4b0082);
  border-color: #8a2be2;
  color: white;
}

/* ===================================================================
   STASH MODAL
   =================================================================== */

.stash-modal { padding: 10px 0; }

.stash-modal-empty {
  text-align: center;
  padding: 30px;
  color: var(--text-muted, #888);
}

.stash-modal-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.stash-modal-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-input, #0d0d0d);
  border: 1px solid var(--border, #333);
  border-radius: 6px;
  margin-bottom: 8px;
}

.stash-modal-item:hover {
  border-color: var(--gold, #c9a959);
}

.stash-modal-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stash-modal-item-name {
  font-weight: 500;
}

.stash-modal-item-price {
  font-size: 0.8rem;
  color: var(--gold, #c9a959);
}

.stash-modal-item-actions {
  display: flex;
  gap: 6px;
}

.stash-modal-add {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.stash-modal-add input {
  flex: 1;
  padding: 10px 12px;
  background: var(--bg-input, #0d0d0d);
  border: 1px solid var(--border, #333);
  border-radius: 6px;
  color: var(--text, #e0e0e0);
}

.stash-modal-add input:focus {
  border-color: var(--gold, #c9a959);
  outline: none;
}

.stash-modal-footer {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border, #333);
}

/* ===================================================================
   WARBAND TABS - Redesign basierend auf Original
   =================================================================== */

.warband-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px;
  margin-bottom: 16px;
  /* Kein doppelter Rahmen - nur die Tabs haben Rahmen */
  background: transparent;
  border: none;
}

.warband-tab {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  min-width: 180px;
  max-width: 280px;
  flex: 1 1 auto;
  background: var(--bg-card, #1a1a1a);
  border: 1px solid var(--border, #444);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.warband-tab:hover {
  border-color: var(--gold, #c9a959);
  background: rgba(201, 169, 89, 0.08);
}

.warband-tab.active {
  border-color: var(--gold, #c9a959);
  border-width: 2px;
  background: rgba(201, 169, 89, 0.12);
}

/* Name - groß und prominent */
.warband-tab-name {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold, #c9a959);
  margin-bottom: 4px;
  line-height: 1.2;
  /* Kein Abschneiden - volle Breite nutzen */
  word-wrap: break-word;
  hyphens: auto;
}

/* Typ - deutlich sichtbar */
.warband-tab-type {
  font-size: 0.8rem;
  color: var(--text-muted, #aaa);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

/* Spieler */
.warband-tab-player {
  font-size: 0.8rem;
  color: var(--text, #ccc);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Badges Container */
.warband-tab-badges {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.warband-tab-badge {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(139, 0, 0, 0.4);
  border: 1px solid rgba(139, 0, 0, 0.6);
  color: #f0f0f0;
}

.warband-tab-badge.advance {
  background: rgba(34, 139, 34, 0.4);
  border-color: rgba(34, 139, 34, 0.6);
}

.warband-tab-badge.trading {
  background: rgba(138, 43, 226, 0.4);
  border-color: rgba(138, 43, 226, 0.6);
}

/* ===================================================================
   GLOBAL OVERFLOW FIX
   Hinweis: overflow-x: hidden auf html/body bricht position:sticky!
   Stattdessen overflow nur auf den Content-Containern setzen.
   =================================================================== */

.container,
.battle-setup.enhanced,
#battle-container,
#editor-container,
#admin-content {
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.page-header,
.roster-header,
.main-header {
  max-width: 100%;
  overflow: hidden;
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */

@media (max-width: 900px) {
  .wb-header-row-1 {
    flex-direction: column;
    align-items: stretch;
  }

  .wb-stats-row {
    justify-content: center;
  }

  .wb-header-row-2 {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .wb-actions {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .wb-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .wb-stat {
    min-width: unset;
  }

  .wb-actions {
    flex-wrap: wrap;
  }

  .warband-tab {
    min-width: 140px;
    flex: 1;
  }
}

/* ===================================================================
   WYRDSTONE MANAGER MODAL
   =================================================================== */

.wyrdstone-manager-modal {
  padding: 10px 0;
}

/* Aktuelle Stats oben */
.wyrdstone-current-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg-input, #0d0d0d);
  border-radius: 8px;
}

.wyrdstone-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.wyrdstone-stat.small {
  opacity: 0.8;
}

.wyrdstone-stat-icon {
  font-size: 1.2rem;
}

.wyrdstone-stat-value {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--gold, #c9a959);
}

.wyrdstone-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Wyrdstone anpassen Sektion */
.wyrdstone-adjust-section {
  margin-bottom: 24px;
}

.wyrdstone-adjust-section h4 {
  font-size: 1rem;
  color: var(--text, #e0e0e0);
  margin-bottom: 12px;
}

.wyrdstone-adjust-row {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 250px;
}

.wyrdstone-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border, #444);
  border-radius: 6px;
  background: var(--bg-input, #0d0d0d);
  color: var(--text, #e0e0e0);
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.wyrdstone-btn:hover {
  border-color: var(--gold, #c9a959);
  background: rgba(201, 169, 89, 0.1);
}

.wyrdstone-btn.minus:hover {
  border-color: #dc3545;
  background: rgba(220, 53, 69, 0.1);
}

.wyrdstone-btn.plus:hover {
  border-color: #28a745;
  background: rgba(40, 167, 69, 0.1);
}

.wyrdstone-input {
  flex: 1;
  padding: 10px 12px;
  background: var(--bg-input, #0d0d0d);
  border: 1px solid var(--border, #444);
  border-radius: 6px;
  color: var(--text, #e0e0e0);
  font-size: 1.2rem;
  text-align: center;
  max-width: 100px;
}

.wyrdstone-input:focus {
  border-color: var(--gold, #c9a959);
  outline: none;
}

/* Verkaufs-Sektion */
.wyrdstone-sell-section {
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(40, 167, 69, 0.05);
  border: 1px solid rgba(40, 167, 69, 0.2);
  border-radius: 8px;
}

.wyrdstone-sell-section h4 {
  font-size: 1rem;
  color: #28a745;
  margin-bottom: 8px;
}

.sell-description {
  font-size: 0.85rem;
  color: var(--text-muted, #aaa);
  margin-bottom: 16px;
}

.sell-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sell-amount-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sell-amount-row label {
  font-size: 0.85rem;
  color: var(--text-muted, #aaa);
}

.sell-amount-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sell-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border, #444);
  border-radius: 4px;
  background: var(--bg-input, #0d0d0d);
  color: var(--text, #e0e0e0);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.sell-btn:hover {
  border-color: var(--gold, #c9a959);
}

.sell-amount {
  font-size: 1.2rem;
  font-weight: bold;
  min-width: 30px;
  text-align: center;
}

.sell-preview {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sell-preview-label {
  font-size: 0.85rem;
  color: var(--text-muted, #aaa);
}

.sell-preview-value {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--gold, #c9a959);
}

.sell-execute-btn {
  align-self: flex-start;
  padding: 10px 20px;
  font-size: 0.9rem;
}

.sell-execute-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Verkaufstabelle */
.wyrdstone-price-table {
  margin-top: 20px;
}

.wyrdstone-price-table h4 {
  font-size: 0.95rem;
  color: var(--text, #e0e0e0);
  margin-bottom: 12px;
}

.selling-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.selling-table th,
.selling-table td {
  padding: 8px 10px;
  text-align: center;
  border: 1px solid var(--border, #333);
}

.selling-table th {
  background: rgba(201, 169, 89, 0.2);
  color: var(--gold, #c9a959);
  font-weight: 600;
}

.selling-table td {
  background: var(--bg-input, #0d0d0d);
}

.selling-table td.active-column,
.selling-table th.active-column {
  background: rgba(201, 169, 89, 0.3);
  color: var(--gold, #c9a959);
  font-weight: bold;
}

.table-note {
  font-size: 0.8rem;
  color: var(--text-muted, #888);
  margin-top: 10px;
  font-style: italic;
}

/* ===================================================================
   RATING BREAKDOWN MODAL
   =================================================================== */

.rating-breakdown {
  padding: 10px 0;
}

/* Rating Summary */
.rating-summary {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.rating-total {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 32px;
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.2), rgba(139, 0, 0, 0.1));
  border: 2px solid rgba(139, 0, 0, 0.5);
  border-radius: 12px;
}

.rating-total-value {
  font-size: 2.5rem;
  font-weight: bold;
  color: #dc3545;
  line-height: 1;
}

.rating-total-label {
  font-size: 0.85rem;
  color: var(--text-muted, #aaa);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* Rating Sections (Heroes/Henchmen) */
.rating-section {
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--bg-input, #0d0d0d);
  border: 1px solid var(--border, #333);
  border-radius: 8px;
}

.rating-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border, #333);
}

.rating-section-icon {
  font-size: 1.1rem;
}

.rating-section-title {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold, #c9a959);
}

.rating-section-value {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--text, #e0e0e0);
}

/* Rating Details */
.rating-section-details {
  margin-bottom: 12px;
}

.rating-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.85rem;
}

.rating-row-label {
  color: var(--text-muted, #aaa);
}

.rating-row-value {
  color: var(--text, #e0e0e0);
  font-weight: 500;
}

/* Unit List */
.rating-unit-list {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border, #444);
}

.rating-unit-item {
  display: flex;
  align-items: center;
  padding: 6px 0;
  font-size: 0.8rem;
  color: var(--text-muted, #aaa);
}

.rating-unit-name {
  flex: 1;
  color: var(--text, #ccc);
}

.rating-unit-calc {
  margin-right: 12px;
  color: var(--text-muted, #888);
}

.rating-unit-value {
  font-weight: 600;
  color: var(--text, #e0e0e0);
  min-width: 40px;
  text-align: right;
}

/* Formel Box */
.rating-formula {
  margin-top: 20px;
  padding: 12px 16px;
  background: rgba(201, 169, 89, 0.05);
  border: 1px solid rgba(201, 169, 89, 0.2);
  border-radius: 8px;
}

.formula-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold, #c9a959);
  margin-bottom: 8px;
}

.formula-text {
  font-size: 0.85rem;
  color: var(--text-muted, #aaa);
  line-height: 1.6;
}

.formula-text strong {
  color: var(--text, #ccc);
}

/* ===================================================================
   BACKUP SECTION STYLES
   =================================================================== */

.backup-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  background: var(--bg-input, #0d0d0d);
  border-radius: 8px;
}

.backup-mode {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.backup-mode-icon {
  font-size: 1.3rem;
}

.backup-mode-label {
  color: var(--text-muted, #888);
}

.backup-mode-name {
  font-weight: 600;
  color: var(--text, #e0e0e0);
}

.backup-mode.sandbox .backup-mode-name {
  color: #9370DB;
}

.backup-mode.production .backup-mode-name {
  color: var(--gold, #c9a959);
}

.backup-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.backup-stat {
  font-size: 0.85rem;
  color: var(--text-muted, #aaa);
}

.backup-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Backup Info Modal */
.backup-info-modal {
  padding: 10px 0;
}

.backup-info-modal h4 {
  font-size: 1.1rem;
  color: var(--gold, #c9a959);
  margin-bottom: 16px;
}

.backup-info-modal .info-section {
  margin-bottom: 16px;
  padding: 12px;
  background: var(--bg-input, #0d0d0d);
  border-radius: 6px;
}

.backup-info-modal .info-section h5 {
  font-size: 0.9rem;
  color: var(--text, #e0e0e0);
  margin-bottom: 8px;
}

.backup-info-modal .info-section p {
  font-size: 0.85rem;
  color: var(--text-muted, #aaa);
  margin: 0;
  line-height: 1.5;
}

.backup-info-modal .info-section ul {
  margin: 0;
  padding-left: 20px;
  font-size: 0.85rem;
  color: var(--text-muted, #aaa);
}

.backup-info-modal .info-section ul li {
  margin-bottom: 4px;
}

.backup-info-modal .info-section.hint {
  background: rgba(201, 169, 89, 0.1);
  border: 1px solid rgba(201, 169, 89, 0.3);
}

.backup-info-modal .info-section.hint p {
  color: var(--gold, #c9a959);
}
