/* === Global Styles === */
body {
  font-family: Arial, sans-serif;
  margin: 2rem;
  background-color: #f8f8f8;
  color: #222;
  overflow-x: hidden;
}

h1 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #000000; 
}

p label {
  font-weight: bold;
}

hr {
    border: 0;
    height: 1px;
    background-color: #eee;
    margin: 1.5rem 0;
}

/* === Utility & Buttons === */
.top-left-actions {
  position: static;
  top: 1rem;
  left: 1rem;
  z-index: 10;
}

.top-right-actions {
  position: static;
  top: 1rem;
  right: 1rem;
  z-index: 10;
}

.nav-button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-align: center;
  background-color: #007bff;
  color: rgb(255, 255, 255);
  font-size: 1rem;
}

.nav-button:hover {
  background-color: #0056b3;
}

.nav-button:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

.nav-button.logout-button,
.nav-button.delete-button {
  background-color: #d9534f;
  color: white;
}
.nav-button.logout-button:hover,
.nav-button.delete-button:hover {
  background-color: #c9302c;
}

#back-to-hub-btn, 
#creator-back-to-hub-btn {
  background-color: #007bff;
  color: white;
}

#back-to-hub-btn:hover, 
#creator-back-to-hub-btn:hover {
  background-color: #5a6268;
}

/* === Input Resets === */
input[type="text"],
input[type="number"] {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

p label input[type="text"] {
  width: 250px;
}

/* === Save/Load Message Section === */
.save-load-section {
  text-align: center;
  margin-bottom: 2rem;
}

#save-load-message {
  color: #666;
  font-style: italic;
  transition: color 0.5s ease;
  min-height: 1.2em;
  margin-bottom: 1rem;
}

/* === Authentication (Login/Signup) === */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
}

.auth-section {
  margin: 1rem auto;
  max-width: 400px;
  width: 100%;
  perspective: 1000px;
}

.auth-flipper {
  position: relative;
  width: 100%;
  min-height: 280px;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.auth-section.show-signup .auth-flipper {
  transform: rotateY(180deg);
}

.login-form-container,
.signup-form-container {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

.signup-form-container {
  transform: rotateY(180deg);
}

.login-form-container h3,
.signup-form-container h3 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: #333;
}

.form-inputs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.login-form-container input,
.signup-form-container input {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

.login-form-container button,
.signup-form-container button {
  padding: 0.8rem;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background-color 0.2s ease;
  width: 100%;
}

.login-form-container button:hover,
.signup-form-container button:hover {
  background-color: #0056b3;
}

.auth-toggle-link {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.auth-toggle-link a {
  color: #007bff;
  text-decoration: none;
  font-weight: bold;
}
.auth-toggle-link a:hover {
  text-decoration: underline;
}

#auth-message {
  margin-top: 15px;
  font-weight: bold;
  min-height: 1.2em;
  text-align: center;
  color: red;
}

/* === Character Hub Page === */
.character-select-container {
  max-width: 900px;
  margin: 2rem auto;
  text-align: center;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.character-grid.empty {
  display: block;
}

.character-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.character-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.character-card.selected {
  border-color: #007bff;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.25);
}

.character-card-checkbox {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.character-card h2 {
  margin-top: 0;
  font-size: 1.4rem;
  color: #000000;
}

.character-card p {
  color: #000000;
  font-size: 0.9rem;
  margin-bottom: 0;
}

.character-hub-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.character-hub-actions button {
  padding: 0.8rem 2rem;
  font-size: 1.2rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#create-new-character-btn {
  background-color: #007bff;
  color: white;
}

#create-new-character-btn:hover {
  background-color: #0056b3;
}

/* === Character Sheet Page === */

.top-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.character-details-inputs {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Creates a 2x2 grid for the inputs */
  gap: 15px;
  flex-grow: 1; /* Allows this section to take up available space */
}

.top-stats-header {
  display: flex;
  gap: 15px;
  background-color: #ffffff;
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid #444;
  flex-shrink: 0;
  width: fit-content;
  margin: 0 auto 20px;
}

.stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-label {
  font-size: 0.8em;
  color: #000000;
  text-transform: uppercase;
  margin-bottom: 4px;
  white-space: nowrap;
}

.stat-value {
  font-size: 1.2em;
  font-weight: bold;
  color: #000000;
}

.top-info label {
  display: block;
  margin-bottom: 1rem;
}

.top-info input[type="text"],
.top-info input[type="number"] {
  width: calc(100% - 1rem);
}

.encumbrance {
  display: flex;
  background-color: #ffffff;
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid #444;

  width: fit-content;
  margin: 0 auto 20px;
}

.stat-value-split {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-value-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-sublabel {
  font-size: 0.7em;
  color: #aaa;
  text-transform: uppercase;
  margin-top: 2px;
}

.stat-divider {
  font-size: 1.5em;
  color: #666;
  padding-bottom: 15px;
}

.characteristics {
  margin-bottom: 2rem;
}

.characteristics h2 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.char-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.1rem;
}

.char-grid div {
  text-align: center;
  font-weight: bold;
  font-size: 1.2rem;
}

.char-grid label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.char-grid input[type="number"] {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid #333;
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  -moz-appearance: textfield;
  appearance: textfield;
}

.char-grid input[type="number"]::-webkit-inner-spin-button,
.char-grid input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#brawn-char,
#agility-char,
#intellect-char,
#cunning-char,
#willpower-char,
#presence-char {
  border-color: blue;
  box-shadow: 0 0 10px rgba(0,0,255,0.3);
}

/* --- Health, Soak, Defense --- */
.health-line {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 1rem auto;
  max-width: 800px;
  flex-wrap: nowrap;
}

.health-line:first-of-type {
  margin-bottom: 1.5rem;
}

.health-item,
.defense-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.label {
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 0.3rem;
  text-align: center;
}

.soak-box input,
.defense-box input {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid #333;
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.split-box {
  width: 120px;
  height: 45px;
  border: 2px solid #333;
  border-radius: 4px;
  display: flex;
  flex-direction: row;
  align-items: center;
  overflow: hidden;
  background: #fff;
}

.split-box input {
  flex: 1;
  border: none;
  text-align: center;
  font-size: 1.1rem;
  padding: 0.3rem;
  width: 50%;
  height: 100%;
  background: transparent;
}

.split-box .divider {
  font-size: 1.5em;
  color: #333;
  padding: 0 5px;
}

/* --- Skills Layout --- */
.skills-layout {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  align-items: stretch;
  margin: 2rem auto;
  max-width: 1100px;
  flex-wrap: wrap;
}

.skills-left {
  flex: 1.2;
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  min-width: 300px;
}

.skills-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  min-width: 300px;
}

.skills-box {
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  flex: 1;
}

.skills-left h3,
.skills-box h3 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.skills-grid,
.skills-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.skill-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  align-items: center;
  gap: 0.5rem;
}

.skill-name-clickable {
  font-weight: bold;
  cursor: pointer;
  text-decoration: underline;
}

.skill-row input[type="text"] {
  width: 100%;
  font-weight: normal;
}

.rank-circles {
  display: flex;
  gap: 0.25rem;
  cursor: pointer;
}

.rank-circles span {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid #666;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2em;
  font-weight: bold;
  transition: background-color 0.2s, color 0.2s;
  user-select: none;
}

.rank-circles span.empty-rank {
  background-color: #f0f0f0;
  color: #888;
}

.rank-circles span.ability-rank {
  background-color: #28a745;
  color: #fff;
  border-color: #218838;
}

.rank-circles span.proficiency-rank {
  background-color: #ffc107;
  color: #333;
  border-color: #e0a800;
}

/* --- Weapons & Inventory --- */
.weapons-section, 
.inventory-section {
  margin: 2rem auto;
  max-width: 1000px;
  background: #fff;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.weapons-section h2, 
.inventory-section h2 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.weapons-table {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.weapon-header,
.weapon-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 1fr 1.5fr 3fr;
  gap: 0.5rem;
  align-items: center;
}

.weapon-header span {
  font-weight: bold;
  text-align: center;
}

.weapon-row input {
  padding: 0.4rem;
  font-size: 0.95rem;
  width: 100%;
  box-sizing: border-box;
}

.inventory-item {
  border-bottom: 1px solid #444;
  padding: 8px 0;
}

.item-header {
  display: flex;
  align-items: center;
}

.toggle-arrow {
  cursor: pointer;
  padding: 0 10px;
  font-size: 12px;
  transition: transform 0.2s ease-in-out;
}

.toggle-arrow.open {
  transform: rotate(90deg);
}

.item-name {
  font-weight: bold;
}

.item-description {
  display: none;
  padding: 10px 10px 10px 32px;
  font-style: italic;
  color: #ccc;
}

.item-description.visible {
  display: block;
}

.panel {
  position: fixed;
  top: 0;
  width: 384px;
  height: 100%;
  background: #ffffff;
  border-left: 2px solid #ccc;
  box-shadow: -2px 0 5px rgba(0,0,0,0.2);
  right: -384px; 
  transition: right 0.3s ease-in-out;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 1rem;
  box-sizing: border-box;
}

.panel.open {
  right: 0;
}

.panel-toggle {
  position: fixed;
  transform: translateY(-50%);
  background: #333;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  line-height: 1.5;
  padding: 1rem 0.5rem;
  border: 2px solid #111;
  cursor: pointer;
  border-radius: 8px 0 0 8px;
  box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.4);
  z-index: 1001;
  transition: right 0.3s ease-in-out;
  text-align: center;
}

.pool-toggle { 
  top: 40%; 
  right: 0; 
}

.gear-toggle { 
  top: 60%; 
  right: 0; 
}

body.pool-open .pool-toggle,
body.gear-open .gear-toggle {
  right: 547px;
}

/* --- Dice Roller & History --- */
.panel {
  position: fixed;
  top: 0;
  right: -550px;
  width: 550px;
  height: 100vh;
  background-color: #ffffff;
  box-shadow: -4px 0 15px rgba(0,0,0,0.5);
  transition: right 0.3s ease-in-out;
  padding: 20px;
  overflow-y: auto;
  z-index: 1000;
}

.panel.open {
  right: 0;
}

.panel-toggle {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: bottom right;
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: bold;
  z-index: 1001;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.panel-toggle.gear-toggle {
  top: 60%;
}

body.pool-open #main-content-wrapper,
body.gear-open #main-content-wrapper {
  margin-right: 350px;
  transition: margin-right 0.3s ease-in-out;
}

.dice-inputs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.dice-input-group {
  display: flex;
  flex-direction: column;
}

.dice-input-group label {
  font-weight: bold;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dice-symbol {
  font-size: 1.5em;
  line-height: 1;
}

.dice-symbol.ability { color: #55a633; }
.dice-symbol.proficiency { color: #fcc203; }
.dice-symbol.boost { color: #73c5f5; }
.dice-symbol.difficulty { color: #7d2480; }
.dice-symbol.challenge { color: #d62828; }
.dice-symbol.setback { color: #000; text-shadow: 0 0 2px #fff; }

/* History list styling */
.history-section ul {
  list-style: none;
  padding: 0;
  max-height: 300px;
  overflow-y: auto;
}
.history-section li {
  background-color: #ffffff;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 8px;
}

/* --- Gear Panel --- */
#gear-list .gear-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  border-bottom: 1px solid #eee;
}

#gear-list .gear-item button {
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
}

/* === Character Creator Wizard === */

/* --- Wizard Structure & Navigation --- */
.creator-container {
  max-width: 100%;
  margin: 2rem auto;
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.wizard-progress-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  border-bottom: 2px solid #eee;
}

.progress-step {
  flex: 1;
  text-align: center;
  padding-bottom: 1rem;
  color: #ffffff;
  font-weight: bold;
  position: relative;
}

.progress-step.active {
  color: #ffffff;
  border-bottom: 2px solid #007bff;
}

.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
}

.wizard-step h2 {
  text-align: center;
  color: #ffffff;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.wizard-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  border-top: 1px solid #eee;
  padding-top: 1.5rem;
}

.obligation-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.obligation-column h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.obligation-control-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.obligation-control-group label {
    font-weight: bold;
}

.obligation-control-group select,
.obligation-control-group button {
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.obligation-control-group button {
    background-color: #6c757d;
    color: white;
    cursor: pointer;
}

.obligation-control-group p {
    margin: 0.5rem 0 0 0;
    font-size: 1.1rem;
}

.description-box {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 1rem;
    min-height: 150px;
    font-style: italic;
    color: #6c757d;
}

.additional-obligation-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.additional-obligation-options label {
    display: flex;
    align-items: center;
    background: #f9f9f9;
    padding: 0.75rem;
    border-radius: 5px;
    border: 1px solid #eee;
    cursor: pointer;
}

.additional-obligation-options input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
}

.obligation-note {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 1rem;
}

.obligation-summary p {
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

.obligation-summary strong {
    color: #007bff;
}

@media (max-width: 768px) {
    .obligation-layout {
        grid-template-columns: 1fr;
        
    }
}

@media (max-width: 768px) {
  body {
      margin: 1rem;
  }
}

@media (max-width: 768px) {
  body.character-hub-background {
      padding-left: 0;
  }

  .hub-nav {
      display: none;
  }

  .hub-content-container {
      padding: 1rem;
  }
}

@media (max-width: 768px) {
  .master-detail-layout {
      flex-direction: column;
      height: auto;
      max-height: 80vh;
  }

  .master-list-panel {
      flex: 0 0 auto;
      border-right: none;
      border-bottom: 1px solid #ddd;
      max-height: 200px;
  }
}

@media (max-width: 768px) {
  .skills-layout {
      flex-direction: column;
  }

  .panel {
      width: 100%; 
      right: -100%;
      box-sizing: border-box;
  }

  .panel.open {
      right: 0;
  }

  body.pool-open #main-content-wrapper,
  body.gear-open #main-content-wrapper {
      margin-right: 0; 
  }
  
  .tabs {
      flex-wrap: wrap;
  }
}

/* --- Carousel Styles --- */
.search-and-filter-container {
  display: flex;
  flex-direction: column; /* This stacks the items vertically */
  gap: 0.75rem; /* This adds space between the search and filter */
  margin-bottom: 1rem;
}

.search-and-filter-container input,
.search-and-filter-container select {
  width: 22.8%;
  padding: 0.75rem;
  border-radius: 6px;
  border: 1px solid #000000;
  background-color: #ffffff;
  color: #000000;
  font-size: 1rem;
}

#species-search-input {
  width: 50%;
  max-width: 400px;
  padding: 0.75rem;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid #ccc;
}

.carousel-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  height: 1100px;
  cursor: grab;
}

#specialization-carousel-container {
  height: 1300px; 
}

#specialization-carousel-container .carousel-card {
  width: 800px;
}

.carousel-container.grabbing {
  cursor: grabbing;
}

.carousel-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.carousel-track {
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
}

.carousel-card {
  height: 95%;
  flex-shrink: 0;
  width: 450px;
  margin: 0 25px;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform: scale(0.9);
  opacity: 0.7;
  display: flex;
  flex-direction: column;
  user-select: none;
}

.carousel-card.active {
  transform: scale(1);
  opacity: 1;
  border-color: #007bff;
}

.carousel-card h3 {
  margin-top: 0;
  text-align: center;
}

.carousel-card .card-details {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: #666;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.carousel-card-image {
  width: 100%;
  height: 400px;
  object-fit: contain;
  border-radius: 6px;
  margin-bottom: 1rem;
  border: 1px solid #eee;
}

.characteristics-display {
  display: flex;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.char-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.char-value {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #333;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: bold;
  color: #333;
}

.char-label {
  background-color: #9c2b2b;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
}

/* --- Talent Tree & Previews --- */
#talent-tree-container {
  margin-top: 2rem;
  padding: 1.5rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #fdfdfd;
}

#talent-tree-container h3 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.talent-tree-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(5, auto);
  gap: 20px 15px;
  position: relative;
}

.talent-cell {
  border: 2px solid #ccc;
  border-radius: 5px;
  padding: 0.5rem;
  background-color: #f5f5f5;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.talent-cell.passive {
  border-color: #007bff;
}

.talent-cell.active {
  border-color: #800000;
}

.talent-cell.purchased {
  background-color: #d4edda;
  border-color: #28a745;   
}

.talent-cell.available:not(.purchased) {
  background-color: #e7f3ff; 
}

.talent-cell.unavailable {
  opacity: 0.5;
  cursor: not-allowed;
}

.talent-name {
  font-weight: bold;
  font-size: 0.9rem;
}

.talent-description {
  font-size: 0.8rem;
  color: #555;
  margin: 0.5rem 0;
  flex-grow: 1;
}

.talent-cost {
  font-size: 0.8rem;
  font-weight: bold;
  color: #333;
}

.talent-cell[data-connects-down="true"]::after {
  content: '';
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 20px;
  background-color: #d9534f;
}

.talent-cell[data-connects-right="true"]::before {
  content: '';
  position: absolute;
  right: -18px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 3px;
  background-color: #d9534f;
}

.talent-cell[data-connects-up="true"]::before {
  content: '';
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 20px;
  background-color: #d9534f;
}

.talent-cell[data-connects-left="true"]::after {
  content: '';
  position: absolute;
  left: -18px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 3px;
  background-color: #d9534f;
}

.talent-tree-card-preview {
    margin-top: 1rem;
    border-top: 1px solid #ccc;
    padding-top: 0.5rem;
    flex-grow: 1;
    overflow-y: auto;
    min-height: 0;
}

.talent-tree-card-preview h5 {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
  color: #333;
  text-align: center;
}

.talent-tree-card-preview .talent-tree-grid {
    padding-right: 10px;
}

.talent-tree-card-preview .talent-cell {
    padding: 8px;
    min-height: 100px;
}

.talent-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: bold;
  color: #555;
}

.legend-box {
  width: 16px;
  height: 16px;
  border: 2px solid;
  border-radius: 2px;
}

.legend-box.active {
  border-color: #800000; 
}

.legend-box.passive {
  border-color: #007bff; 
}

/* --- XP, Stats, & Skills Allocation --- */
.xp-tracker {
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 2rem;
  color: #007bff;
}

.spend-xp-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr 2fr;
  gap: 2rem;
  max-width: 1600px;
  margin: 0 auto;
}

#stats-allocation-grid, 
#skills-allocation-container, 
#talent-tree-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.skills-subheading {
  text-align: center;
  font-style: italic;
  color: #666;
  margin-bottom: 1rem;
}

.blue-text {
  color: #007bff;
  font-weight: bold;
}

.free-skills-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.free-skills-section {
  border: 1px solid #eee;
  padding: 1rem;
  border-radius: 8px;
}

.free-skills-section h3 {
  margin-top: 0;
  text-align: center;
}

.free-skills-section p {
  text-align: center;
  font-style: italic;
  color: #666;
  margin-bottom: 1.5rem;
}

.free-skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.free-skill-label {
  display: flex;
  align-items: center;
  background: #f9f9f9;
  padding: 0.75rem;
  border-radius: 5px;
  border: 1px solid #eee;
  cursor: pointer;
}

.free-skill-label input {
  margin-right: 10px;
}

.stat-row, .skill-alloc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background-color: #f9f9f9;
  border-radius: 5px;
  border: 1px solid #eee;
}

.stat-name, .skill-alloc-name {
  font-weight: bold;
  font-size: 1.1rem;
}

.stat-controls, .skill-alloc-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-value, .skill-alloc-value {
  font-size: 1.2rem;
  font-weight: bold;
  min-width: 30px;
  text-align: center;
}

.stat-btn, .skill-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background-color: #e9e9e9;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.stat-btn:hover, .skill-btn:hover {
  background-color: #ddd;
}

.stat-btn:disabled, .skill-btn:disabled {
  background-color: #f5f5f5;
  color: #ccc;
  cursor: not-allowed;
}

.skill-alloc-name.career-skill {
  color: #007bff;
}

.legend-symbol {
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
  line-height: 1;
}

.force-talent-symbol {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 1.1rem;
  font-weight: bold;
  color: #333;
  opacity: 0.7;
}

.talent-name {
  font-weight: bold;
  font-size: 0.9rem;
  padding-right: 16px; /* Add this line */
}
.spend-xp-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr; /* Talent tree is wider */
  gap: 2rem;
  align-items: flex-start;
  max-width: 1600px;
  margin: 0 auto;
}

.spend-xp-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

#stats-allocation-container,
#skills-allocation-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    background-color: #fdfdfd;
}

#stats-allocation-container h3,
#skills-allocation-container h3 {
    text-align: center;
    margin-top: 0;
}

.xp-cost-info {
    background-color: #e7f3ff;
    border: 1px solid #b3d7ff;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.xp-cost-info h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    text-align: center;
    color: #004085;
}

.xp-cost-info ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.xp-cost-info li {
    margin-bottom: 0.5rem;
    color: #333;
}

.xp-cost-info li:last-child {
    margin-bottom: 0;
}

@media (max-width: 1200px) {
    .spend-xp-layout {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
    }
}
.spend-xp-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr; /* Talent tree is wider */
  gap: 2rem;
  align-items: flex-start;
  max-width: 1600px;
  margin: 0 auto;
}

.spend-xp-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.spend-xp-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

#stats-allocation-container,
#skills-allocation-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    background-color: #fdfdfd;
}

#stats-allocation-container h3,
#skills-allocation-container h3 {
    text-align: center;
    margin-top: 0;
}

.xp-cost-info {
    background-color: #e7f3ff;
    border: 1px solid #b3d7ff;
    border-radius: 8px;
    padding: 1rem 1.5rem;
}

.xp-cost-info h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    text-align: center;
    color: #004085;
}

.xp-cost-info ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.xp-cost-info li {
    margin-bottom: 0.5rem;
    color: #333;
}

.xp-cost-info li:last-child {
    margin-bottom: 0;
}

/* --- XP Spent Summary Box --- */
.xp-summary-box {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem 1.5rem;
}

.xp-summary-box h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    text-align: center;
    color: #343a40;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
}

.summary-category {
    margin-bottom: 1rem;
}
.summary-category:last-child {
    margin-bottom: 0;
}

.summary-category strong {
    color: #495057;
}

.summary-category ul {
    list-style-type: none;
    padding-left: 1rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.summary-category li {
    color: #6c757d;
    margin-bottom: 0.25rem;
}


/* Responsive adjustments for smaller screens */
@media (max-width: 1200px) {
    .spend-xp-layout {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
    }
}
/* === Character Creator - Starting Gear Step === */

#gear-search-input {
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.75rem;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

/* === Character Creator - Starting Gear Step === */
.gear-purchase-layout {
display: grid;
grid-template-columns: 1fr 1.5fr;
gap: 1.5rem;
}

.gear-summary-section {
border: 1px solid #ddd;
border-radius: 8px;
padding: 1rem;
background-color: #f9f9f9;
}

.credits-tracker {
position: sticky;
top: 0;
background: #f9f9f9;
padding: 0.5rem 0;
z-index: 1;
text-align: center;
font-size: 1.5rem;
font-weight: bold;
margin-bottom: 1rem;
color: #28a745;
}

.gear-browser-section {
border: 1px solid #ddd;
border-radius: 8px;
padding: 1rem;
}

.gear-category h4 {
background-color: #f0f0f0;
padding: 0.75rem;
margin: 0 0 1rem 0;
border-radius: 5px;
cursor: pointer;
user-select: none;
position: relative;
}

.gear-category h4::after {
content: '▼';
position: absolute;
right: 15px;
transition: transform 0.2s ease;
}

.gear-category h4.collapsed::after {
transform: rotate(-90deg);
}

.gear-purchase-layout {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
}

.gear-summary-section {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  background-color: #f9f9f9;
  flex-basis: 40%;
  overflow-y: auto;
}

.credits-tracker {
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: #28a745; 
}

#purchased-gear-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.purchased-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background-color: #fff;
  border: 1px solid #eee;
  border-radius: 4px;
}

.purchased-item-name {
  font-weight: bold;
}

.purchased-item-price {
  color: #6c757d;
}

.remove-gear-btn {
  background-color: #d9534f;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
}

.gear-browser-section {
  flex-basis: 60%;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
}

.gear-category h4 {
  background-color: #f0f0f0;
  padding: 0.75rem;
  margin: 0 0 1rem 0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.gear-category h4::after {
  content: '▼';
  position: absolute;
  right: 15px;
  transition: transform 0.2s ease;
}

.gear-category h4.collapsed::after {
  transform: rotate(-90deg);
}

.gear-item-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-left: 1rem;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out, margin 0.3s ease-out;
}

.gear-item-list.collapsed {
    max-height: 0;
    overflow: hidden;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border: none;
}

@media (max-width: 900px) {
    .gear-purchase-layout {
        grid-template-columns: 1fr; 
    }
}

.gear-item-card {
  border: 1px solid #eee;
  border-radius: 5px;
  padding: 1rem;
}

.gear-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.gear-item-header h5 {
  margin: 0;
  font-size: 1.1rem;
}

.purchase-gear-btn {
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}

.purchase-gear-btn:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

.gear-item-details {
  font-size: 0.9rem;
  color: #333;
}

.gear-item-details span {
  margin-right: 1rem;
  font-weight: 500;
}
.restricted-tag {
  color: #d9534f;
  font-weight: bold;
  margin-left: 0.5rem;
  display: inline-block;
}

.gear-primary-stats, .gear-secondary-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
}

.gear-primary-stats span, .gear-secondary-stats span {
font-weight: 500;
}

.gear-special {
  margin: 0.75rem 0 0 0;
  padding-top: 0.5rem;
  border-top: 1px dashed #eee;
  font-style: italic;
  color: #555;
}

.gear-description {
  margin: 0.5rem 0 0 0;
  font-style: italic;
  color: #555;
}

/* Override previous general span rule for more specific containers */
.gear-item-details span {
margin-right: 0;
font-weight: normal;
display: inline-block;
margin-bottom: 0;
}

.gear-primary-stats span strong, 
.gear-secondary-stats span strong,
.gear-special strong {
  font-weight: bold;
  color: #333;
}
.subcategory-container {
  padding-left: 1rem;
  border-left: 2px solid #e0e0e0;
  margin-left: 0.5rem;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.subcategory-container.collapsed {
  max-height: 0;
}

.gear-subcategory > h5 {
  background-color: #f8f8f8;
  padding: 0.6rem;
  margin: 1rem 0 0.5rem 0;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  position: relative;
  font-size: 1rem;
  font-weight: 600;
}

.gear-subcategory > h5::after {
  content: '▼';
  position: absolute;
  right: 15px;
  transition: transform 0.2s ease;
}

.gear-subcategory > h5.collapsed::after {
  transform: rotate(-90deg);
}

.obligation-info-box {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin: 0 auto 2rem auto;
  max-width: 1100px;
}

.obligation-info-box h4 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  text-align: center;
  color: #495057;
  font-size: 1.2rem;
}

.obligation-info-box p,
.obligation-info-box ul {
  color: #6c757d;
  font-size: 0.95rem;
  line-height: 1.6;
}

.obligation-info-box ul {
  padding-left: 20px;
  margin-top: 0.5rem;
}
/* === Character Summary Page Styles === */
.summary-section {
  margin-bottom: 2rem;
}
.summary-section.text-center {
  text-align: center;
}
.summary-section h2 {
  font-size: 1.5rem;
  color: #333;
  margin-bottom: 1rem;
  border-bottom: 2px solid #007bff;
  padding-bottom: 0.5rem;
  display: inline-block;
}
#summary-char-name {
  font-size: 1.5rem;
  padding: 0.5rem;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 50%;
  max-width: 400px;
}

.summary-grid-top {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: start;
  text-align: center;
}

.summary-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.summary-card.text-only {
  justify-content: center;
  height: 100%;
}

.summary-card img {
  width: 100%;
  max-width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 1rem;
  background-color: #f8f9fa;
  border: 1px solid #eee;
}

.summary-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  color: #6c757d;
}

.summary-card p {
  margin: 0;
  font-size: 1.5rem;
  font-weight: bold;
}

.summary-char-value {
width: 60px;
height: 60px;
border-radius: 50%;
border: 2px solid #333;
text-align: center;
font-size: 1.5rem;
font-weight: bold;
background-color: #fff;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
-moz-appearance: textfield;
appearance: textfield;
}

.summary-list {
  list-style: none;
  padding: 0;
  font-size: 1.1rem;
}
.summary-list.two-column {
  columns: 2;
  -webkit-columns: 2;
  -moz-columns: 2;
}

.summary-list li {
  margin-bottom: 0.5rem;
  background-color: #f8f9fa;
  padding: 0.5rem;
  border-radius: 4px;
}

.summary-grid-bottom {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.resource-display {
  font-size: 1.5rem;
}

@media (max-width: 768px) {
  .summary-grid-top, .summary-grid-bottom, .summary-list.two-column {
      grid-template-columns: 1fr;
      columns: 1;
      -webkit-columns: 1;
      -moz-columns: 1;
  }
}

.summary-list li {
  padding: 0.75rem; /* Increased padding for better spacing */
}

.talent-summary-description {
  display: block; /* Ensures it appears on its own line */
  font-size: 0.9rem;
  font-style: italic;
  color: #555;
  margin-top: 0.25rem;
}
.skill-alloc-name-wrapper {
  display: flex;
  flex-direction: column;
}

.skill-dice-pool {
  font-size: 1.2rem;
  margin-top: 4px;
}

.dice-pool-die.ability {
  color: #28a745; /* Green */
}

.dice-pool-die.proficiency {
  color: #ffc107; /* Yellow */
}

/* Adjust layout of skill row to accommodate dice pool */
.skill-alloc-row {
  grid-template-columns: 2fr auto; /* Change from 1fr 1fr */
  display: flex;
  justify-content: space-between;
}

.skill-row {
  grid-template-columns: 2fr auto 1fr; /* Adjust grid to make space for the rank number */
  align-items: center;
}

.skill-row label {
  display: flex;
  align-items: center;
  white-space: nowrap; /* Prevent wrapping */
}

.skill-rank-number {
  font-weight: bold;
  font-size: 1.1em;
  margin-left: 8px; /* Space between checkbox and rank */
}
.inventory-box {
  margin-top: 1rem; /* Add some space above the inventory */
  max-height: 250px; /* Give it a max height and scroll for large inventories */
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

#inventory-list {
  flex-grow: 1;
  overflow-y: auto;
}

/* --- Styles for New Talents Section --- */
.talents-section {
  margin: 2rem auto;
  max-width: 1000px;
  background: #fff;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.talents-section h2 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

#talents-list {
  columns: 2;
  -webkit-columns: 2;
  -moz-columns: 2;
  gap: 1.5rem;
}

.talent-item {
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: 5px;
  border: 1px solid #eee;
  margin-bottom: 1rem;
  -webkit-column-break-inside: avoid; /* Prevent items from breaking across columns */
  page-break-inside: avoid;
  break-inside: avoid;
}

.talent-item h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: #333;
}

.talent-item p {
  margin: 0;
  font-size: 0.95rem;
  color: #555;
  line-height: 1.5;
}


@media (max-width: 768px) {
  #talents-list {
      columns: 1;
      -webkit-columns: 1;
      -moz-columns: 1;
  }
}

.weapons-table {
  display: grid;
  grid-template-columns: 2.5fr 1.5fr 1fr 1fr 1fr 2fr 1fr;
  gap: 5px 10px;
  align-items: center;
  border-top: 2px solid #333;
  padding-top: 8px;
}

.weapon-header {
  display: contents;
}

.weapon-row {
  display: contents;
}

.weapon-header > span {
  font-weight: bold;
  color: #555;
  background-color: #fff;
  padding: 8px 5px;
  text-align: center;
}

.weapon-row > span {
  padding: 8px 5px;
  text-align: center;
}

.weapon-row > span:first-child,
.weapon-header > span:first-child,
.weapon-row > span:nth-child(6),
.weapon-header > span:nth-child(6) {
  text-align: left;
}

.weapon-action-button {
  padding: 6px 12px;
  background-color: #fff;
  border: 2px solid #007bff;
  color: #007bff;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  white-space: nowrap;
}

.weapon-action-button:hover {
  background-color: #007bff;
  color: #fff;
}

.clear-button {
  background-color: #6c757d;
  color: white;
  margin-top: 10px;
}

.clear-button:hover {
  background-color: #5a6268;
}

.dice-result-icon {
  height: 1em;
  width: 1em;
  vertical-align: -0.12em;
  margin: 0 0.15em;
}

.summary-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

#equipped-armor-display {
  background-color: #ffffff;
  border-radius: 5px;
  padding: 15px;
  min-height: 50px;
}

.equipped-armor-card h3 {
  margin-top: 0;
  color: #000000;
  border-bottom: 1px solid #555;
  padding-bottom: 5px;
}

.equipped-armor-stats {
  display: flex;
  justify-content: space-around;
  background-color: #ffffff;
  padding: 10px;
  border-radius: 4px;
  margin: 10px 0;
  text-align: center;
}

.equipped-armor-stats span {
  font-weight: bold;
}

.equipped-armor-description {
  font-style: italic;
  color: #000000;
}

.item-actions {
  margin-left: 20px;
}

.ability-tooltip {
  display: none;
  position: absolute;
  background-color: #ffffff; 
  color: #000000; 
  border: 1px solid #4a5568;
  border-radius: 8px;
  padding: 1rem;
  width: 300px;
  max-width: 90vw;
  z-index: 1010;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
  font-size: 0.9rem;
  line-height: 1.5;
  pointer-events: none;
}

.ability-tooltip h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #63b3ed;
  font-size: 1.1rem;
}

.ability-tooltip p {
  margin-bottom: 0;
}

.interactive-ability {
  color: #007bff;
  text-decoration: underline;
  cursor: pointer;
  font-weight: bold;
}

.active-ability-options {
  margin-top: 1rem;
  border-top: 1px solid #ccc;
  padding-top: 1rem;
}

.ability-btn {
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 0.8rem;
  margin: 0.25rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.ability-btn:hover {
  background-color: #218838;
}

.ability-btn:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

/* === Spend Symbols Section === */
.spend-symbols-section {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 2px solid #007bff;
}

.remaining-symbols {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#ability-activation-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.custom-spend-container {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed #ccc;
}

.custom-spend-container input {
  width: 50px;
  text-align: center;
}

.custom-spend-container button {
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* === Modal Styles === */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-content {
  background-color: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 5px 25px rgba(0,0,0,0.4);
  max-width: 500px;
  width: 90%;
  text-align: center;
}

#crit-modal-title {
  margin-top: 0;
  color: #d9534f; /* Red for emphasis */
}

#crit-modal-body p {
  margin: 0.5rem 0;
  line-height: 1.6;
}

#crit-modal-body strong {
  font-size: 1.1em;
}

#crit-modal-close {
  margin-top: 1.5rem;
}
/* === Tab Navigation === */
.tabs {
  display: flex;
  border-bottom: 2px solid #ccc;
  margin-bottom: 1.5rem;
}

.tab-link {
  padding: 1rem 1.5rem;
  cursor: pointer;
  background-color: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 1.1rem;
  font-weight: bold;
  color: #666;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.tab-link:hover {
  color: #333;
}

.tab-link.active {
  color: #007bff;
  border-bottom-color: #007bff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* === Character Details Text Areas === */
.details-section {
  margin-bottom: 2rem;
}

.details-section h2 {
  margin-bottom: 1rem;
}

.details-textarea {
  width: 100%;
  min-height: 200px;
  padding: 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid #ccc;
  border-radius: 5px;
  resize: vertical;
  box-sizing: border-box;
}

/* === Campaign Hub Page === */
.campaign-container {
  max-width: 960px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.hub-subtitle {
  text-align: center;
  color: #6c757d;
  margin-bottom: 2rem;
}

.hub-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.hub-action-card {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
}

.hub-action-card h2 {
  margin-top: 0;
  text-align: center;
  font-size: 1.3rem;
}

#campaign-message {
  text-align: center;
  min-height: 1.2em;
  font-weight: bold;
  margin-top: 1rem;
}

.campaign-list-section h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.campaign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.campaign-card {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.campaign-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.campaign-card h3 {
  margin-top: 0;
  color: #007bff;
}

.campaign-card p {
  margin: 0.25rem 0 0 0;
  color: #495057;
}

.campaign-card .role-badge {
  display: inline-block;
  padding: 0.25em 0.6em;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.25rem;
  color: #fff;
  background-color: #6c757d;
  margin-top: 1rem;
}

.campaign-card .role-badge.gm {
  background-color: #28a745;
}

@media (max-width: 768px) {
  .hub-actions-grid {
      grid-template-columns: 1fr;
  }
}

/* === Campaign Info Header on Character Sheet === */
.campaign-header {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-style: italic;
  background-color: #e7f3ff;
  padding: 0.5rem;
  border-radius: 5px;
}

.campaign-header a {
  font-weight: bold;
  color: #0056b3;
}

/* === Read-Only Styles for Disabled Inputs === */
input:disabled, textarea:disabled {
  background-color: #e9ecef;
  color: #495057;
  cursor: not-allowed;
  border-color: #ced4da;
}

.char-grid input[type="number"]:disabled {
  box-shadow: none;
  background-color: #e9ecef;
}

/* === Character Hub Background & Layout === */
body.character-hub-background {
  background-image: url('https://firebasestorage.googleapis.com/v0/b/star-wars-character-app.firebasestorage.app/o/Bespin.jpeg?alt=media&token=5ed7d55e-1d4b-4d5b-bb75-a34fa1855848');
  background-size: cover;
  background-position: center right; /* Aligns the image to the right */
  background-repeat: no-repeat;
  background-attachment: fixed;
  padding-left: 280px; /* Make space for the new nav bar */
}

.hub-nav {
  position: fixed;
  left: 0;
  top: 0;
  width: 250px; /* Width of the nav bar */
  height: 100vh; /* Full viewport height */
  background: rgba(255, 255, 255, 0.8); /* Semi-transparent white */
  backdrop-filter: blur(5px); /* Frosted glass effect */
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.hub-nav button {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  text-align: left;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.hub-nav button:hover {
  background-color: #0056b3;
}

.hub-nav hr {
  width: 80%;
  margin: 1rem auto;
  border-color: rgba(0,0,0,0.1);
}

.nav-button-secondary {
  background-color: #6c757d !important; /* Important to override the base style */
}
.nav-button-secondary:hover {
  background-color: #5a6268 !important;
}


.hub-content-container {
  padding: 2rem;
}

.hub-content-container h1 {
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}
/* === Account Page === */
.account-container {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.account-card {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.account-card h2 {
  margin-top: 0;
  text-align: center;
  font-size: 1.3rem;
}

#account-message {
  text-align: center;
  min-height: 1.2em;
  font-weight: bold;
  margin-top: 1rem;
}

/* === Master-Detail Layout for Character Creator === */

.master-detail-layout {
  display: flex;
  gap: 1.5rem;
  height: calc(80vh - 2rem);
  max-height: calc(80vh - 2rem);
  border: 1px solid #000000; 
  border-radius: 8px;
  overflow: hidden;
  background-color: #ffffff; 
  color: #000000; 
  padding: 1rem;
}

.master-list-panel {
  flex: 0 0 300px;
  border-right: 1px solid #ffffff;
  overflow-y: auto;
  background-color: #ffffff; 
}

.master-list-item {
  padding: 1rem;
  cursor: pointer;
  border-bottom: 1px solid #ffffff00;
  font-weight: bold;
  transition: background-color 0.2s ease;
  color: #000000;
}

.master-list-item:hover {
  background-color: #ffffff;
}

.master-list-item.active {
  background-color: #007bff;
  color: white;
}

.detail-panel {
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 1rem;
}

.detail-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.detail-top-section {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.detail-card-image {
  flex-shrink: 0;
  width: 300px; 
  height: 450;
  max-height: 450px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #4a556800;
}

.detail-header-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.detail-header-content h3 {
  margin: 0 0 0.5rem 0;
  font-size: 2.2rem;
  color: #000000;
  text-align: center;
}

.detail-header-content p {
  margin: 0 0 1.5rem 0;
  color: #000000;
  font-style: italic;
  font-size: 1rem;
  text-align: center
}

.characteristics-display {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

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

.char-value {
  background-color: #ffffff;
  color: #000000;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2em;
  margin: 0 auto 0.25rem;
}

.char-label {
  font-size: 0.8em;
  text-transform: uppercase;
  color: #ffffff;
}

.card-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.card-detail-item {
    font-size: 0.95rem;
    text-align: center
}

.skills-list {
    margin-bottom: 1rem;
}

.abilities-section h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #000000;
}

.ability-item {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #000000;
    padding-left: 1rem;
    border-left: 2px solid #2a43cf;
    margin-bottom: 0.75rem;
}

.detail-bottom-section {
  border-top: 1px solid #000000;
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.bottom-info-item h4 {
  margin: 0 0 0.5rem 0;
  color: #000000;
  font-size: 1.1rem;
}

.bottom-info-item p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #000000;
}

/* XP Step Header */
.xp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.xp-header .xp-tracker {
  flex-basis: 30%;
  text-align: center;
  font-size: 1.8rem;
  font-weight: bold;
  color: #007bff;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1rem;
}

.xp-header .xp-summary-box {
  flex-grow: 1;
}

/* Gear Step Header */
.gear-header {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.gear-header .credits-tracker,
.gear-header .encumbrance-tracker {
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1rem;
}

.gear-header .credits-tracker {
  color: #28a745;
}

.purchased-gear-summary {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1rem;
  max-height: 150px; /* Give it a max height for scrolling */
  overflow-y: auto;
}

.purchased-gear-summary h4 {
  margin-top: 0;
  text-align: center;
}

/* General detail panel content styling */
.detail-panel .detail-content {
  display: block; /* Default state */
}

body.creator-background {
  background-image: url('https://firebasestorage.googleapis.com/v0/b/star-wars-character-app.firebasestorage.app/o/Jabbas%20Palace.jpeg?alt=media&token=ec70cb31-f1b7-48cf-b2e2-b50b61f17157');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; /* This keeps the background still when you scroll */
}

/* This adds a semi-transparent overlay to the main container for readability */
.creator-container {
  background-color: rgba(31, 41, 55, 0);
  border-radius: 8px;
  padding: 2rem;
  border: 1px solid #4a556800;
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0);
}
.obligation-start-value-heading {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
  color: #001aff;
  font-size: 1.1rem;
}

#add-obligation-content .obligation-summary {
  margin-bottom: 1.5rem; 
}

.custom-obligation-title,
.custom-obligation-desc {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid #4a5568;
  background-color: #ffffff;
  color: #000000;
  box-sizing: border-box;
}

.custom-obligation-title {
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.custom-obligation-desc {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
}

.talent-cell.available:not(.purchased) {
  background-color: #e7f3ff; 
  border-color: #007bff;
}

.talent-cell.unavailable {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #f5f5f5;
  border-color: #ccc;
}

/* === Character Creator - Starting Gear Step === */
.gear-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.gear-header .credits-tracker,
.gear-header .encumbrance-tracker {
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1rem;
}

.gear-header .credits-tracker {
  color: #28a745;
}

.gear-purchase-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
  height: 65vh; /* Set a fixed height for the layout */
}

.gear-summary-section, .gear-browser-section {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Hide overflow */
}

.gear-summary-section h4, .gear-browser-section h4 {
    text-align: center;
    margin-top: 0;
    flex-shrink: 0;
}

#purchased-gear-list, #gear-browser-list {
    overflow-y: auto; /* Allow these specific areas to scroll */
    flex-grow: 1;
}

#gear-search-input {
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.75rem;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  box-sizing: border-box;
  flex-shrink: 0;
}

#purchased-gear-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.purchased-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background-color: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 4px;
}

.purchased-item-name {
  font-weight: bold;
}

.purchased-item-price {
  color: #6c757d;
  margin-left: 0.5rem;
}

.remove-gear-btn {
  background-color: #d9534f;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
}

.gear-category h4, .gear-subcategory > h5 {
  background-color: #f0f0f0;
  padding: 0.75rem;
  margin: 0 0 1rem 0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.gear-category h4::after, .gear-subcategory > h5::after {
  content: '▼';
  position: absolute;
  right: 15px;
  transition: transform 0.2s ease;
}

.gear-category h4.collapsed::after, .gear-subcategory > h5.collapsed::after {
  transform: rotate(-90deg);
}

.subcategory-container, .gear-item-list {
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.subcategory-container.collapsed, .gear-item-list.collapsed {
    max-height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border: none;
}

.gear-item-card {
  border: 1px solid #eee;
  border-radius: 5px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.gear-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.gear-item-header h5 {
  margin: 0;
  font-size: 1.1rem;
}

.purchase-gear-btn {
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  white-space: nowrap;
}

.purchase-gear-btn:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

.gear-primary-stats, .gear-secondary-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.gear-special {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #eee;
  font-style: italic;
  color: #555;
  font-size: 0.9rem;
}

.gear-step-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  height: 100%;
}

/* === Character Creator - Summary Step === */
.summary-section {
  margin-bottom: 2rem;
}
.summary-section.text-center {
  text-align: center;
}
.summary-section h2 {
  font-size: 1.5rem;
  color: #000000;
  margin-bottom: 1rem;
  border-bottom: 2px solid #007bff;
  padding-bottom: 0.5rem;
  display: inline-block;
}
#summary-char-name {
  font-size: 1.5rem;
  padding: 0.5rem;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 50%;
  max-width: 400px;
}

.summary-grid-top {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: start;
  text-align: center;
}

.summary-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.summary-card.text-only {
  justify-content: center;
  height: 100%;
}

.summary-card img {
  width: 100%;
  max-width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 1rem;
  background-color: #f8f9fa;
  border: 1px solid #eee;
}

.summary-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  color: #000000;
}

.summary-card p {
  margin: 0;
  font-size: 1.5rem;
  font-weight: bold;
}

.summary-char-value {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.summary-list {
  list-style: none;
  padding: 0;
  font-size: 1.1rem;
}
.summary-list.two-column {
  columns: 2;
  -webkit-columns: 2;
  -moz-columns: 2;
}

.summary-list li {
  margin-bottom: 0.75rem;
  background-color: #f8f9fa;
  padding: 0.75rem;
  border-radius: 4px;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  break-inside: avoid;
}

.summary-grid-bottom {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.resource-display {
  font-size: 1.5rem;
}

.talent-summary-description {
  display: block;
  font-size: 0.9rem;
  font-style: italic;
  color: #000000;
  margin-top: 0.25rem;
}

.skill-alloc-name-wrapper {
  display: flex;
  flex-direction: column;
}

.skill-dice-pool {
  font-size: 1.2rem;
  margin-top: 4px;
}

.dice-pool-die.ability {
  color: #28a745; /* Green */
}

.dice-pool-die.proficiency {
  color: #ffc107; /* Yellow */
}

.skill-alloc-row, .summary-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inventory-box {
  margin-top: 1rem;
  max-height: 250px;
  overflow-y: auto;
}

@media (max-width: 900px) {
  .summary-grid-top, .summary-grid-bottom {
      grid-template-columns: 1fr;
  }
  .summary-list.two-column {
    columns: 1;
    -webkit-columns: 1;
    -moz-columns: 1;
  }
}

#character-summary {
  background-color: #ffffff;
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.character-card .campaign-note {
  font-size: 0.8rem;
  font-style: italic;
  color: #6c757d;
  margin-top: 0.75rem;
  border-top: 1px solid #eee;
  padding-top: 0.5rem;
}

#delete-selected-btn {
  display: none; /* Hidden by default */
  background-color: #d9534f;
  margin-top: 1rem;
}

#delete-selected-btn:hover {
  background-color: #c9302c;
}

/* === Campaign Hub Background === */
body.campaign-hub-background {
  background-image: url('https://firebasestorage.googleapis.com/v0/b/star-wars-character-app.firebasestorage.app/o/star-wars-backgrounds-15_9c6a524a.jpeg?alt=media&token=dc84d852-7ecb-4084-9d1b-7e38c6af76e5');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* === Character Sheet - Spend XP Tab === */
#tab-xp .xp-header {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

#tab-xp .xp-tracker {
  font-size: 1.5rem;
  font-weight: bold;
  color: #007bff;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

#xp-spend-layout {
  height: 60vh;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background-color: #fff;
  padding: 1rem;
}

#xp-spend-options-list {
  flex: 0 0 250px;
  border-right: 1px solid #ddd;
  overflow-y: auto;
}

#xp-spend-detail-panel .skills-allocation-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.xp-save-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

#unsaved-xp-changes-warning {
  color: #d9534f; /* Red color */
  font-weight: bold;
  font-style: italic;
  margin: 0;
}

.xp-cost-info {
  background-color: #e7f3ff;
  border: 1px solid #b3d7ff;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}

.xp-cost-info h4 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  text-align: center;
  color: #004085;
}

.xp-cost-info ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.xp-cost-info li {
  margin-bottom: 0.5rem;
  color: #333;
}

.xp-cost-info li:last-child {
  margin-bottom: 0;
}