@font-face {
  font-family: "Libre Caslon Display";
  font-style: normal;
  font-weight: 400;
  src: local("Libre Caslon Display"), url("../fonts/LibreCaslonDisplay-Regular.woff") format("woff");
}

:root {
  --modal-bg: #ffffff;
  --modal-text: #333333;
  --modal-header-border: #eeeeee;
  --modal-hover-bg: #f5f5f5;
  --modal-code-color: #666666;
  --modal-input-border: #cccccc;
  --modal-shadow: rgba(0, 0, 0, 0.1);
}

body.dark-mode {
  --modal-bg: #2d333b;
  --modal-text: #eeeeee;
  --modal-header-border: #444444;
  --modal-hover-bg: #3d444d;
  --modal-code-color: #aaaaaa;
  --modal-input-border: #555555;
  --modal-shadow: rgba(0, 0, 0, 0.3);
}

.npc-form {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, sans-serif;
  font-size: 12px;
}

.wfrp-statblock {
  background: linear-gradient(#aaaaaa 100%);
  border: 1px solid #3d2817;
  box-shadow: 0 0 0 1px #8b7355, 0 4px 8px rgba(0, 0, 0, 0.4);
  padding: 15px;
  font-family: 'Garamond', 'Georgia', serif;
  font-size: 14px;
  max-width: 500px;
  min-width: 350px;
  position: relative;
}

.wfrp-statblock::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(139, 115, 85, 0.03) 2px, rgba(139, 115, 85, 0.03) 4px);
  pointer-events: none;
}

.wfrp-statblock-h2 {
  font-family: 'Libre Caslon Display', serif;
  font-size: 20px;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  min-width: 520px;
  margin: 0 0 2px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #3d2817;
  position: relative;
  z-index: 1;
}

.wfrp-statblock .subtitle {
  font-family: 'Libre Caslon Display', serif;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  position: relative;
  z-index: 1;
}

.wfrp-section-description {
  font-size: 12px;
  text-align: justify;
  max-width: 500px;
  min-width: 350px;
  line-height: 1.5;
}

.wfrp-section-content {
  font-size: 12px;
  line-height: 1.5;
  margin-top: 0px;
  margin-left: 5px;
}

.wfrp-statblock::after {
  content: '✠';
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 16px;
  opacity: 0.5;
  z-index: 1;
}

/* Settings Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  visibility: visible;
  opacity: 1;
}

.modal-content {
  background-color: var(--modal-bg);
  color: var(--modal-text);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px var(--modal-shadow);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--modal-header-border);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  color: var(--modal-text);
}

.addon-list {
  display: flex;
  flex-direction: column;
}

.addon-item {
  display: flex;
  align-items: center;
  gap: 5px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.addon-item:hover {
  background-color: var(--modal-hover-bg);
}

.addon-label {
  flex-grow: 1;
  cursor: pointer;
}

.addon-code {
  color: var(--modal-code-color);
  font-size: 0.85em;
  margin-left: 5px;
}

.setting-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.setting-item:hover {
  background-color: var(--modal-hover-bg);
}

.setting-label {
  flex-grow: 1;
  cursor: pointer;
}

.addon-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.addon-item.disabled input,
.addon-item.disabled label {
  cursor: not-allowed;
}

/* Release Notes Styles */
.release-notes-body {
  margin-top: 10px;
}

.release-note-section {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px dotted var(--modal-header-border);
}

.release-note-section:last-child {
  border-bottom: none;
}

.release-note-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.release-note-header h4 {
  margin: 0;
  color: var(--modal-text);
  font-size: 1.0rem;
}

.release-note-date {
  font-size: 0.75rem;
  color: var(--modal-code-color);
}

.release-note-list {
  margin: 0;
  padding-left: 20px;
  font-size: 0.8rem;
  line-height: 1.4;
}

.release-note-list li {
  margin-bottom: 5px;
}