@import './base.css';

#app {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  font-weight: normal;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

a,
.green {
  text-decoration: none;
  color: hsla(160, 100%, 37%, 1);
  transition: 0.4s;
  padding: 3px;
}

@media (hover: hover) {
  a:hover {
    background-color: hsla(160, 100%, 37%, 0.2);
  }
}

@media (min-width: 1024px) {
  body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
  }

  #app {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
  }
}

/* Top Navigation Bar */
.top-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: var(--vt-c-black-soft);
  /* Use your palette from base.css */
  color: var(--vt-c-white);
  height: 60px;
  width: 100%;
  /* Full width */
  position: fixed;
  /* Fix it to the top */
  top: 0;
  left: 0;
  z-index: 1000;
  padding: 0 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.top-nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  padding: 0;
  margin: 0;
}

.top-nav li a {
  text-decoration: none;
  color: var(--vt-c-white);
  font-size: 1rem;
  transition: color 0.3s;
}

.top-nav li a:hover {
  color: var(--vt-c-indigo);
  /* Highlight on hover */
}

/* Main Content Area */
.main-content {
  flex: 1;
  width: 100%;
  height: calc(100vh - 60px);
  margin-top: 10px; 
  padding: 0;
  padding-bottom: 60px; /* Platz für das fixierte Submenu */
  overflow-y: auto;
  background-color: var(--color-background);
}

/* Global fullwidth container class for all components */
.fullwidth-container {
  width: 100%;
  height: 100%;
  padding: 20px;
  padding-bottom: 80px; /* Extra Platz für das fixierte Submenu */
  box-sizing: border-box;
  overflow-y: auto;
}

/* Global fullwidth page class for view components */
.fullwidth-page {
  width: 100%;
  min-height: calc(100vh - 120px);
  padding: 20px;
  box-sizing: border-box;
}

/* Common Card Layouts */
.card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 15px;
}

.card:hover {
  border-color: #007bff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

/* Common Grid Layouts */
.grid-container {
  display: grid;
  gap: 20px;
  width: 100%;
}

.grid-2-columns {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.grid-3-columns {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.grid-4-columns {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

/* Common Header Styles */
.page-header {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #007bff;
}

.page-header h2,
.page-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.5rem;
}

.section-header {
  margin: 30px 0 15px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #dee2e6;
}

.section-header h3,
.section-header h4 {
  margin: 0;
  color: #333;
  font-size: 1.2rem;
}

/* Common Button Styles */
.btn {
  padding: 8px 16px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: #f8f9fa;
  color: #495057;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-primary {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.btn-primary:hover {
  background: #0056b3;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
  background: #f8f9fa;
  color: #495057;
  border-color: #dee2e6;
}

.btn-secondary:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.badge-secondary {
  background: #6c757d;
  color: white;
}

.btn-danger {
  background: #dc3545;
  color: white;
  border-color: #dc3545;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-success {
  background: #28a745;
  color: white;
  border-color: #28a745;
}

.btn-success:hover {
  background: #218838;
}

/* Common Form Elements */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #555;
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
}

.form-control:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-row {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.form-col {
  flex: 1;
  min-width: 0;
}

/* Common List Styles */
.list-container {
  background: white;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.2s ease;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item:hover {
  background: #f8f9fa;
  transform: translateX(2px);
}

.list-item-content {
  flex: 1;
}

.list-item-title {
  margin: 0 0 6px 0;
  color: #333;
  font-size: 1.1rem;
  font-weight: 600;
}

.list-item-details {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #666;
}

.list-item-separator {
  color: #ccc;
  font-weight: normal;
}

.list-item-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

/* Common Badge Styles */
.badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
}

.badge-primary {
  background: #007bff;
  color: white;
}

.badge-success {
  background: #28a745;
  color: white;
}

.badge-warning {
  background: #ffc107;
  color: #212529;
}

.badge-danger {
  background: #dc3545;
  color: white;
}

.badge-info {
  background: #17a2b8;
  color: white;
}

.badge-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

/* Common Resource Display */
.resource-display {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.resource-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  flex: 1;
  min-width: 160px;
}

.resource-icon {
  font-size: 20px;
}

.resource-info {
  flex: 1;
}

.resource-label {
  font-size: 12px;
  color: #6c757d;
  font-weight: 500;
}

.resource-amount {
  font-size: 16px;
  font-weight: bold;
  color: #495057;
}

.resource-remaining {
  margin-top: 4px;
  font-size: 12px;
  color: #6c757d;
}

/* Common Progress/Status Indicators */
.progress-badge {
  background: #007bff;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.status-active {
  background: #28a745;
}

.status-inactive {
  background: #6c757d;
}

.status-warning {
  background: #ffc107;
}

/* Common Empty States */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.empty-state h3 {
  color: #333;
  margin-bottom: 10px;
  font-size: 1.5rem;
}

.empty-state p {
  font-size: 1.1rem;
  margin: 0;
}

/* Common Loading States */
.loading-message {
  text-align: center;
  padding: 20px;
  color: #6c757d;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .top-nav {
    flex-direction: column;
    height: auto;
  }

  .top-nav ul {
    flex-direction: column;
    gap: 10px;
  }
}

.cd-table {
  width: 100%;
  border-collapse: collapse;
  position: relative;
  margin-top: 1rem;
}

.cd-table thead {
  position: sticky;
  top: 0;
  background: #fff;
  color: #000000;
  z-index: 1;
}

.cd-table th,
.cd-table td {
  padding: 0.5rem;
  text-align: left;
  border: 1px solid #ddd;
}

.cd-table th {
  background-color: #f5f5f5;
  font-weight: bold;
  color: #000000;
}

.cd-table tr:nth-child(even) {
  background-color: #f9f9f9;
  color: #000000;
}

.cd-list {
  max-height: calc(100vh - 207px);
  flex: 1 1 auto; /* Grow and shrink, take available space */
  overflow-y: auto; /* Enable scrolling if content overflows */
  min-height: 0; /* Required for Firefox */

  overflow-y: auto;
  overflow-x: hidden;
}

/* Custom scrollbar styling */
.cd-list::-webkit-scrollbar {
  width: 8px;
}

.cd-list::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.cd-list::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.cd-list::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.cd-view {
  color: #333;
  background: white;
}

.character-details {
  background-color: white;
  color: #333;
  padding: 12px;
  border-radius: 8px;
  width: 90%;
  margin: 0 auto;
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 90px);
  overflow-y: scroll;
  top: 45px;
  border: 1px solid #dee2e6;
}

.character-header h2 {
  font-size: 1.5rem;
  text-align: center;
  color: #333;
  margin-bottom: 20px;
  flex: 0 0 auto;
}

.character-overview {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.character-image img {
  width: 150px;
  height: auto;
  border-radius: 8px;
  border: 2px solid #dee2e6;
}

.character-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  width: 100%;
}

.stat {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  text-align: center;
  padding: 12px;
  border-radius: 5px;
  font-size: 0.9rem;
  font-weight: bold;
  line-height: 1.2;
  color: #495057;
}

.stat span {
  display: block;
  font-size: 0.8rem;
  color: #6c757d;
}

.character-info {
  background-color: #f8f9fa;
  padding: 12px;
  border-radius: 8px;
  line-height: 1.6;
  white-space: nowrap;
  border: 1px solid #dee2e6;
  color: #495057;
}

.character-info p {
  margin: 10px 0;
}

.character-info strong {
  color: #495057;
  font-weight: 600;
}

.character-info em {
  font-style: italic;
  color: #6c757d;
}

.character-details {
  position: relative;
  background-color: white;
  color: #333;
  padding: 12px;
  padding-bottom: 80px; /* Platz für das fixierte Submenu */
  border-radius: 8px;
  width: 90%;
  margin: 0 auto;
  font-family: Arial, sans-serif;
  min-height: calc(100vh - 60px - 64px);
  flex-direction: column;
  border: 1px solid #dee2e6;
}

.character-main {
  margin-bottom: 20px;
}

.character-aspect {
  padding: 12px;
  background-color: #f8f9fa;
  border-radius: 8px;
  min-height: 200px;
  border: 1px solid #dee2e6;
}

.submenu {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background-color: #f8f9fa;
  display: flex;
  justify-content: center;
  padding: 8px;
  border-top: 1px solid #dee2e6;
  flex: 0 0 auto;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.submenu button {
  background-color: #6c757d;
  color: white;
  border: none;
  padding: 10px 12px;
  margin: 0 10px;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

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

.submenu button.active {
  background-color: #007BFF;
  color: white;
  font-weight: bold;
}

/* Responsive Submenu für mobile Geräte */
@media (max-width: 768px) {
  .submenu {
    padding: 4px;
    flex-wrap: wrap;
    justify-content: center;
    max-height: 100px;
    overflow-y: auto;
  }
  
  .submenu button {
    padding: 6px 8px;
    margin: 2px;
    font-size: 0.8rem;
    min-width: 60px;
  }
  
  .fullwidth-container {
    padding-bottom: 120px; /* Mehr Platz für mehrreihiges Submenu auf mobilen Geräten */
  }
  
  .main-content {
    padding-bottom: 120px;
  }
  
  .character-details {
    padding-bottom: 120px;
  }
}

/* Dice Button and Overlay Styles */
.input-with-dice {
  display: flex;
  gap: 8px;
  align-items: center;
}

.input-with-dice select {
  flex: 1;
}

.dice-btn {
  background: #4CAF50;
  border: none;
  border-radius: 4px;
  width: 40px;
  height: 40px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.dice-btn:hover:not(:disabled) {
  background: #45a049;
}

.dice-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.roll-result {
  margin-top: 8px;
  padding: 8px;
  background-color: #e8f5e8;
  border-radius: 4px;
  font-size: 14px;
  color: #2e7d2e;
  border-left: 3px solid #4CAF50;
}

/* Roll Overlay Styles */
.roll-overlay {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  cursor: pointer;
  animation: slideInRight 0.3s ease-out;
}

.roll-overlay-content {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  min-width: 200px;
  position: relative;
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.overlay-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.overlay-close:hover {
  opacity: 1;
}

.overlay-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 12px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.overlay-roll {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 8px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.roll-breakdown {
  font-size: 14px;
  opacity: 0.9;
  margin-left: 5px;
}

.overlay-result {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #ffeb3b;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.overlay-hint {
  font-size: 12px;
  opacity: 0.8;
  font-style: italic;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
  .roll-overlay {
    top: 10px;
    right: 10px;
    left: 10px;
  }
  
  .roll-overlay-content {
    min-width: unset;
  }
}

/* ========================================
   CHARACTER CREATION FULLWIDTH LAYOUT SYSTEM
   ======================================== */

/* Base character creation container */
.character-creation-container {
  width: 100% !important;
  max-width: none !important;
  padding: 20px;
  box-sizing: border-box;
}

/* ========================================
   BASIC INFO COMPONENT STYLES
   ======================================== */

.basic-info-form {
  width: 100% !important;
  max-width: none !important;
  margin: 0;
  padding: 0;
}

.basic-info-form h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
}

.basic-info-form .form-group {
  margin-bottom: 20px;
}

.basic-info-form .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

@media (min-width: 768px) {
  .basic-info-form .form-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .basic-info-form .form-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================================
   ATTRIBUTES COMPONENT STYLES
   ======================================== */

.attributes-form {
  width: 100% !important;
  max-width: none !important;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-bottom: 20px;
}

.attributes-form h2 {
  text-align: center;
  margin-bottom: 10px;
  color: #333;
  flex-shrink: 0;
}

.attributes-form .instruction {
  text-align: center;
  margin-bottom: 20px;
  color: #666;
  font-style: italic;
  flex-shrink: 0;
}

.attributes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 20px;
  border: 1px solid #eee;
  border-radius: 8px;
  background-color: #fefefe;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .attributes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
}

@media (min-width: 1200px) {
  .attributes-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }
}

@media (min-width: 1600px) {
  .attributes-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
  }
}

/* ========================================
   DERIVED VALUES COMPONENT STYLES
   ======================================== */

.derived-values-form {
  width: 100% !important;
  max-width: none !important;
  margin: 0;
  padding: 0;
}

.derived-values-form h2 {
  text-align: center;
  margin-bottom: 10px;
  color: #333;
}

.derived-values-form .instruction {
  text-align: center;
  margin-bottom: 30px;
  color: #666;
  font-style: italic;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 20px;
  border: 1px solid #eee;
  border-radius: 8px;
  background-color: #fefefe;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
}

@media (min-width: 1024px) {
  .values-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }
}

@media (min-width: 1400px) {
  .values-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
  }
}

@media (min-width: 1600px) {
  .values-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    max-height: 65vh;
  }
}

@media (min-width: 1920px) {
  .values-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 35px;
    max-height: 60vh;
  }
}

/* ========================================
   SHARED CHARACTER CREATION STYLES
   ======================================== */

/* Form elements */
.character-creation-container label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #555;
}

.character-creation-container input, 
.character-creation-container select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  box-sizing: border-box;
}

.character-creation-container input:focus, 
.character-creation-container select:focus {
  outline: none;
  border-color: #2196f3;
  box-shadow: 0 0 5px rgba(33, 150, 243, 0.3);
}

/* Value groups and attribute groups */
.value-group, .attribute-group {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #fafafa;
  min-width: 0;
}

.value-group label, .attribute-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #333;
}

/* Input with dice styling */
.input-with-dice {
  display: flex;
  gap: 8px;
  align-items: center;
}

.input-with-dice input {
  flex: 1;
  margin-bottom: 8px;
}

/* Attribute specific styles */
.attribute-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.attribute-label {
  font-weight: bold;
  color: #333;
  font-size: 14px;
  margin-right: 10px;
  flex: 1;
}

.attribute-input {
  width: 80px !important;
  padding: 6px 8px !important;
  font-size: 14px;
  text-align: center;
}

.attribute-description {
  font-size: 12px;
  color: #666;
  font-style: italic;
  margin-top: 5px;
  display: block;
}

/* Value info */
.value-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calculated-value {
  font-size: 12px;
  color: #4caf50;
  font-weight: bold;
}

.value-description {
  font-size: 12px;
  color: #666;
  font-style: italic;
}

/* Race restrictions and roll results */
.race-restriction-warning {
  background-color: #fff3cd;
  color: #856404;
  padding: 8px;
  border-radius: 4px;
  font-size: 12px;
  margin-top: 5px;
  border: 1px solid #ffeeba;
}

.roll-result {
  background-color: #e8f5e8;
  color: #2e7d32;
  padding: 8px;
  border-radius: 4px;
  font-size: 12px;
  margin-top: 8px;
  border: 1px solid #c8e6c9;
}

.roll-breakdown {
  font-size: 11px;
  opacity: 0.8;
}

/* Calculation info */
.calculation-info {
  margin-bottom: 30px;
  padding: 20px;
  background-color: #e8f5e8;
  border-radius: 8px;
}

.calculation-info h3 {
  margin-bottom: 15px;
  color: #2e7d32;
}

.calculation-rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}

@media (min-width: 1200px) {
  .calculation-rules {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1600px) {
  .calculation-rules {
    grid-template-columns: repeat(3, 1fr);
  }
}

.rule {
  font-size: 14px;
  color: #555;
}

/* Form actions */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .form-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .prev-btn, .calc-btn, .next-btn {
    width: 100%;
    max-width: 300px;
  }
}

.prev-btn, .calc-btn, .next-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.prev-btn {
  background-color: #6c757d;
  color: white;
}

.prev-btn:hover {
  background-color: #5a6268;
}

.calc-btn {
  background-color: #ff9800;
  color: white;
}

.calc-btn:hover {
  background-color: #f57c00;
}

.next-btn {
  background-color: #2196f3;
  color: white;
}

.next-btn:hover:not(:disabled) {
  background-color: #1976d2;
}

.next-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* Belief search specific styles */
.belief-search {
  position: relative;
}

.belief-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.belief-option {
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.belief-option:hover {
  background-color: #f5f5f5;
}

.belief-option:last-child {
  border-bottom: none;
}

.selected-belief {
  background-color: #e3f2fd;
  padding: 10px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.clear-btn {
  background: #f44336;
  color: white;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clear-btn:hover {
  background: #d32f2f;
}

/* Total section for attributes */
.total-section {
  background-color: #f0f8ff;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
  border: 1px solid #b3d9ff;
}

.points-display {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}

.total-invalid {
  background-color: #ffeaea !important;
  border-color: #ffcdd2 !important;
}

.total-invalid .points-display {
  color: #d32f2f !important;
}

.error-message {
  background-color: #ffebee;
  color: #d32f2f;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 20px;
  border: 1px solid #ffcdd2;
  text-align: center;
  font-weight: bold;
}

/* ========================================
   SKILLS AND SPELLS COMPONENT STYLES
   ======================================== */

/* Skills component full-width optimizations */
.skills-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  width: 100%;
}

@media (max-width: 1024px) {
  .skills-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Spells grids for full-width usage */
.spells-grid, .available-spells .spells-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  width: 100%;
}

@media (min-width: 768px) {
  .spells-grid, .available-spells .spells-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .spells-grid, .available-spells .spells-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1400px) {
  .spells-grid, .available-spells .spells-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1600px) {
  .spells-grid, .available-spells .spells-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ========================================
   CONSOLIDATED MODAL STYLES
   ======================================== */

/* Modal overlay - covers entire viewport */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Modal content container */
.modal-content {
  background: white;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  animation: modalSlideIn 0.3s ease-out;
}

/* Modal header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #dee2e6;
  flex-shrink: 0;
}

.modal-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.25rem;
}

/* Modal body */
.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* Modal footer */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid #dee2e6;
  flex-shrink: 0;
}

/* Modal actions (alternative to footer) */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

/* Close button */
.close-button {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.close-button:hover {
  color: #333;
}

/* Modal slide in animation */
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ========================================
   CONSOLIDATED BUTTON STYLES
   ======================================== */

/* Cancel button */
.btn-cancel {
  padding: 10px 20px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: #f8f9fa;
  color: #495057;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-cancel:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

/* Confirm button (success/submit) */
.btn-confirm {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  background: #1da766;
  color: white;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-confirm:hover:not(:disabled) {
  background: #16a085;
}

.btn-confirm:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Export button */
.btn-export {
  padding: 10px 20px;
  border: 1px solid #007bff;
  border-radius: 6px;
  background: #007bff;
  color: white;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-export:hover:not(:disabled) {
  background: #0056b3;
  border-color: #0056b3;
}

.btn-export:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Small export button with icon */
.export-button-small {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #007bff;
  border-radius: 8px;
  background: #007bff;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.export-button-small:hover {
  background: #0056b3;
  border-color: #0056b3;
  transform: scale(1.05);
}

/* Delete button */
.btn-delete {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px 8px;
  transition: transform 0.2s ease;
  color: #dc3545;
}

.btn-delete:hover {
  transform: scale(1.2);
}

/* Edit button */
.btn-edit {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px 8px;
  transition: transform 0.2s ease;
  color: #007bff;
}

.btn-edit:hover {
  transform: scale(1.2);
}

/* Add button */
.btn-add,
.btn-add-equipment,
.btn-add-weapon,
.btn-add-inline,
.btn-add-spell {
  padding: 8px 16px;
  background: #1da766;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s ease;
}

.btn-add:hover,
.btn-add-equipment:hover,
.btn-add-weapon:hover,
.btn-add-inline:hover,
.btn-add-spell:hover {
  background: #16a085;
}

/* Action button small (for table actions) */
.btn-action {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.btn-action:hover {
  transform: scale(1.1);
}

.icon {
  font-size: 14px;
}

.btn-improve-small {
  font-size: 1.2rem;
}

/* ========================================
   CONSOLIDATED FORM STYLES
   ======================================== */

/* Form group container */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #495057;
  font-size: 0.95rem;
}

/* Form control (input, select, textarea) */
.form-control,
.template-select,
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: white;
  color: #495057;
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.template-select:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control:disabled,
.template-select:disabled,
.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #e9ecef;
}

/* Form row */
.form-row {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  margin-bottom: 15px;
}

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

/* Checkbox label */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-weight: normal;
  margin: 0;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin: 0;
}

/* Help text */
.help-text {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #6c757d;
  font-style: italic;
}

/* ========================================
   CONSOLIDATED LOADING INDICATORS
   ======================================== */

/* Loading overlay (absolute positioned within container) */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
  border-radius: 8px;
}

.loading-overlay p {
  color: #007bff;
  font-weight: 500;
  margin: 0;
}

/* Spinner animation */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

/* Loading message (text only) */
.loading-message {
  text-align: center;
  padding: 20px;
  color: #6c757d;
  font-style: italic;
}

/* ========================================
   CONSOLIDATED TABLE STYLES
   ======================================== */

/* Table header cell */
.cd-table-header {
  background-color: #1da766;
  color: white;
  font-weight: bold;
  padding: 8px;
  text-align: left;
}

/* Empty state for tables/lists */
.empty-state {
  text-align: center;
  color: #999;
  font-style: italic;
  padding: 2rem;
}

.empty-state h3 {
  color: #333;
  margin-bottom: 10px;
  font-size: 1.5rem;
}

/* Action cell */
.action-cell {
  text-align: center;
  vertical-align: middle;
}

/* ========================================
   CONSOLIDATED HEADER/LAYOUT STYLES
   ======================================== */

/* Header section */
.header-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 10px;
}

/* Header content */
.header-content {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
}

/* Character header */
.character-header {
  margin-bottom: 20px;
}

.character-header h2 {
  margin: 0;
  color: #333;
  font-size: 1.5rem;
  border-bottom: 2px solid #007bff;
  padding-bottom: 10px;
  flex: 1;
}

/* ========================================
   COMPONENT-SPECIFIC STYLES (EXTRACTED FROM COMPONENTS)
   ======================================== */

/* SkillView - Tables Container */
.tables-container {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.table-wrapper-left {
  flex: 6;
  min-width: 0;
}

.table-wrapper-right {
  flex: 4;
  min-width: 0;
}

/* Learning Mode Controls */
.learning-mode-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.resources-display {
  display: flex;
  gap: 15px;
  animation: slideIn 0.3s ease;
}

.resource-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-weight: bold;
  color: #495057;
}

.resource-value {
  font-size: 14px;
  white-space: nowrap;
}

/* Learning Mode Buttons */
.btn-learning-mode {
  padding: 8px 16px;
  border: 2px solid #1da766;
  background: white;
  color: #1da766;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
  position: relative;
}

.btn-learning-mode:hover {
  background: #1da766;
  color: white;
}

.btn-learning-mode.active {
  background: #1da766;
  color: white;
}

.learning-actions {
  display: flex;
  gap: 5px;
  animation: slideIn 0.3s ease;
}

.btn-learn-new {
  width: 40px;
  height: 40px;
  border: 2px solid #007bff;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
  position: relative;
}

.btn-learn-new:hover {
  background: #007bff;
  color: white;
}

.btn-improve {
  width: 40px;
  height: 40px;
  border: 2px solid #28a745;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
  position: relative;
}

.btn-improve:hover {
  background: #28a745;
  color: white;
}

/* Practice Points Controls */
.pp-cell {
  padding: 4px 8px;
}

.pp-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.pp-btn {
  width: 20px;
  height: 20px;
  border: 1px solid #007bff;
  background: white;
  color: #007bff;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
  padding: 0;
}

.pp-btn:hover:not(:disabled) {
  background: #007bff;
  color: white;
}

.pp-btn:disabled {
  border-color: #ccc;
  color: #ccc;
  cursor: not-allowed;
  opacity: 0.5;
}

.pp-btn-plus {
  border-color: #28a745;
  color: #28a745;
}

.pp-btn-plus:hover:not(:disabled) {
  background: #28a745;
  color: white;
}

.pp-btn-minus {
  border-color: #dc3545;
  color: #dc3545;
}

.pp-btn-minus:hover:not(:disabled) {
  background: #dc3545;
  color: white;
}

.pp-value {
  min-width: 20px;
  text-align: center;
  font-weight: bold;
  color: #495057;
  font-size: 13px;
}

/* Spell/Skill Dialog Styles */
.modal-wide {
  max-width: 700px;
}

.current-resources {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.resource-display-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  flex: 1;
  min-width: 160px;
}

.resource-display-card .resource-icon {
  font-size: 20px;
}

.resource-remaining {
  margin-top: 4px;
}

.resource-remaining small {
  color: #6c757d;
  font-weight: normal;
}

.text-warning {
  color: #f0ad4e !important;
}

.text-danger {
  color: #d9534f !important;
}

/* Selection Summary */
.selection-summary {
  background: #e7f3ff;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 10px;
  border-left: 4px solid #007bff;
}

.cost-summary {
  color: #28a745;
  font-weight: bold;
}

/* Learning Levels List */
.learning-levels {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  max-height: 300px;
  overflow-y: auto;
}

.level-option {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f1f1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.level-option:last-child {
  border-bottom: none;
}

.level-option:hover:not(.disabled) {
  background: #f8f9fa;
}

.level-option.selected {
  background: #e7f3ff;
  border-left: 4px solid #007bff;
}

.level-option.in-sequence:not(.selected) {
  background: #f0f8ff;
  border-left: 2px solid #87ceeb;
}

.level-option.disabled {
  background: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

.level-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
}

.level-target {
  color: #495057;
}

.level-cost {
  color: #28a745;
  font-weight: bold;
}

.level-option.disabled .level-cost {
  color: #dc3545;
}

.level-details {
  margin-top: 4px;
  color: #6c757d;
}

/* Form Column Layouts */
.form-col {
  flex: 1;
  min-width: 0;
}

.form-col-main {
  flex: 2;
  min-width: 200px;
}

.form-col-input {
  flex: 1;
  min-width: 140px;
}

/* School Buttons */
.school-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 5px;
}

.school-btn {
  padding: 6px 12px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: white;
  color: #495057;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.school-btn:hover {
  background: #f8f9fa;
  border-color: #007bff;
}

.school-btn.active {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

/* Spell/Skill Container and Sections */
.spells-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 15px;
}

@media (max-width: 1024px) {
  .spells-container {
    grid-template-columns: 1fr;
  }
}

.available-spells-section,
.learning-list-section {
  min-height: 300px;
}

.learning-item {
  background: #f0f8ff !important;
  border-left: 3px solid #007bff !important;
}

.learning-item .level-header {
  position: relative;
}

.remove-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-btn:hover {
  background: #c82333;
}

.already-selected {
  opacity: 0.5;
  pointer-events: none;
}

.spell-actions-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-add-inline {
  background: #28a745;
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-add-inline:hover:not(:disabled) {
  background: #218838;
  transform: scale(1.1);
}

.btn-add-inline:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
}

.already-selected .btn-add-inline {
  background: #17a2b8;
}

/* Total Costs Display */
.total-costs {
  margin-top: 10px;
  padding: 10px;
  background: #e7f3ff;
  border-radius: 4px;
  border-left: 4px solid #007bff;
}

/* Spell Details */
.spell-details-section {
  background: #e7f3ff;
  padding: 16px;
  border-radius: 6px;
  margin-bottom: 10px;
  border-left: 4px solid #007bff;
}

.loading-spell-details {
  text-align: center;
  padding: 20px;
  color: #6c757d;
  font-style: italic;
}

.spell-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.spell-detail-card {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 12px;
}

.spell-detail-card h4 {
  margin: 0 0 10px 0;
  color: #495057;
  font-size: 14px;
  font-weight: bold;
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 5px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
}

.detail-row:last-child {
  margin-bottom: 0;
}

.detail-label {
  color: #6c757d;
  font-weight: 500;
  flex: 0 0 auto;
  margin-right: 10px;
}

.detail-value {
  color: #495057;
  text-align: right;
  flex: 1 1 auto;
}

.spell-description {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 12px;
  margin-top: 15px;
}

.spell-description h4 {
  margin: 0 0 8px 0;
  color: #495057;
  font-size: 14px;
  font-weight: bold;
}

.spell-description p {
  margin: 0;
  color: #495057;
  font-size: 13px;
  line-height: 1.4;
}

/* Spell Actions */
.spell-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cost-info {
  color: #28a745;
  font-weight: bold;
}

.btn-add-spell {
  padding: 4px 12px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.2s ease;
}

.btn-add-spell:hover:not(:disabled) {
  background: #218838;
}

.btn-add-spell:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

/* No Spells Message */
.no-spells {
  text-align: center;
  padding: 20px;
  color: #6c757d;
  font-style: italic;
}

/* Modal Content Headers */
.modal-content h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
  border-bottom: 2px solid #1da766;
  padding-bottom: 10px;
}

/* ========================================
   SKILL LEARN DIALOG STYLES
   ======================================== */

/* Dialog Header */
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 2px solid #1da766;
  background: #f8f9fa;
  border-radius: 0;
  flex-shrink: 0;
  z-index: 10;
}

.dialog-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.5rem;
}

.btn-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-close:hover {
  background: #e9ecef;
  color: #333;
}

/* Resources Section */
.resources-section {
  padding: 20px 24px;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  flex-shrink: 0;
}

.resources-section h4 {
  margin: 0 0 15px 0;
  color: #495057;
  font-size: 1.1rem;
}

.text-info {
  color: #17a2b8 !important;
}

/* Reward Method Section */
.reward-method-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #dee2e6;
}

.reward-method-section label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #495057;
  font-size: 0.95rem;
}

.reward-method-section .form-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  background: white;
}

.reward-method-section .form-select:focus {
  outline: none;
  border-color: #1da766;
  box-shadow: 0 0 0 3px rgba(29, 167, 102, 0.1);
}

.reward-method-section .form-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
  color: #6c757d;
  font-style: italic;
}

/* Form Section */
.form-section {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #1da766;
  box-shadow: 0 0 0 3px rgba(29, 167, 102, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
  color: #6c757d;
  font-style: italic;
}

/* Costs Preview */
.costs-preview {
  padding: 20px 24px;
  background: #fff3cd;
  border-top: 1px solid #ffeaa7;
  border-bottom: 1px solid #ffeaa7;
  flex-shrink: 0;
}

.costs-preview h4 {
  margin: 0 0 12px 0;
  color: #856404;
  font-size: 1rem;
}

.cost-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cost-label {
  color: #856404;
  font-weight: 500;
}

.cost-value {
  font-weight: bold;
  color: #495057;
  background: white;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #ffeaa7;
}

/* Action Info */
.action-info {
  flex: 1;
}

.selection-count {
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 500;
}

.action-buttons {
  display: flex;
  gap: 12px;
}

/* Skills Selection Container */
.skills-selection-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 1024px) {
  .skills-selection-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.skills-available,
.skills-selected {
  border: 2px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
}

.skills-available h4,
.skills-selected h4 {
  margin: 0;
  padding: 12px 16px;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  font-size: 1rem;
  color: #495057;
}

/* Category Filters */
.category-filters {
  padding: 12px 16px;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: #f8f9fa;
}

.category-filter-btn {
  padding: 6px 12px;
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-weight: 500;
  color: #495057;
}

.category-filter-btn:hover {
  border-color: #1da766;
  color: #1da766;
}

.category-filter-btn.active {
  background: #1da766;
  border-color: #1da766;
  color: white;
  font-weight: 600;
}

.category-filter-btn:first-child {
  font-weight: 600;
  background: #e9ecef;
  border-color: #adb5bd;
}

.category-filter-btn:first-child.active {
  background: #495057;
  border-color: #495057;
  color: white;
}

/* Sort and Search Controls */
.search-input {
  margin: 0;
  font-size: 13px;
}

.sort-and-search-controls {
  padding: 12px 16px;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  align-items: center;
  gap: 20px;
  background: #f8f9fa;
  flex-wrap: wrap;
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.skills-search {
  flex: 1;
  min-width: 200px;
}

.sort-label {
  font-size: 0.9rem;
  color: #495057;
  font-weight: 500;
}

.sort-btn {
  padding: 6px 12px;
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-weight: 500;
  color: #495057;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sort-btn:hover {
  border-color: #1da766;
  color: #1da766;
}

.sort-btn.active {
  background: #1da766;
  border-color: #1da766;
  color: white;
  font-weight: 600;
}

.sort-icon {
  font-size: 0.8rem;
  font-weight: bold;
}

/* Skills List */
.skills-list {
  max-height: 60vh;
  overflow-y: auto;
  background: white;
}

.skill-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f8f9fa;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: grab;
  transition: all 0.2s ease;
}

.skill-item:hover {
  background: #f8f9fa;
}

.skill-item:active {
  cursor: grabbing;
}

.skill-item.skill-affordable {
  border-left: 4px solid #1da766;
}

.skill-item:not(.skill-affordable) {
  opacity: 0.6;
  cursor: not-allowed;
}

.skill-info {
  flex: 1;
}

.skill-main-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.skill-name {
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
  min-width: 120px;
}

.skill-category {
  font-size: 0.8rem;
  color: #6c757d;
  font-style: italic;
  min-width: 100px;
}

.skill-costs {
  display: flex;
  gap: 8px;
  font-size: 0.85rem;
  margin-left: auto;
}

.cost-ep {
  color: #1da766;
  font-weight: 600;
}

.cost-gold {
  color: #ffc107;
  font-weight: 600;
}

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

.btn-select {
  width: 32px;
  height: 32px;
  border: 2px solid #1da766;
  background: white;
  color: #1da766;
  border-radius: 50%;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-select:hover:not(:disabled) {
  background: #1da766;
  color: white;
  transform: scale(1.1);
}

.btn-select:disabled {
  border-color: #6c757d;
  color: #6c757d;
  cursor: not-allowed;
  transform: none;
}

/* Skills Drop Zone */
.skills-drop-zone {
  min-height: 60vh;
  padding: 16px;
  background: white;
  border: 2px dashed #dee2e6;
  margin: 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.skills-drop-zone.drag-over {
  border-color: #1da766;
  background: rgba(29, 167, 102, 0.05);
}

.drop-zone-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  color: #6c757d;
  text-align: center;
}

.placeholder-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.7;
}

.placeholder-text {
  font-size: 0.9rem;
  line-height: 1.4;
  max-width: 200px;
}

/* Selected Skills List */
.selected-skills-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.selected-skill-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.selected-skill-item:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.selected-skill-info {
  flex: 1;
}

.selected-skill-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.selected-skill-costs {
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
}

/* Total Costs */
.total-costs-header {
  font-weight: 600;
  color: #856404;
  margin-bottom: 8px;
}

.total-costs-breakdown {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}

.total-ep,
.total-gold {
  font-weight: 600;
  font-size: 0.9rem;
}

.total-ep {
  color: #1da766;
}

.total-gold {
  color: #ffc107;
}

.affordability-check {
  font-size: 0.85rem;
  font-weight: 600;
}

.text-success {
  color: #28a745;
}

.loading-skills {
  padding: 20px;
  text-align: center;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.simple-input-section {
  margin-bottom: 20px;
  padding: 16px;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
}

.simple-input-section .form-group {
  margin-bottom: 0;
}

/* ========================================
   AUDIT LOG VIEW STYLES
   ======================================== */
.audit-log-view {
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-top: 20px;
}

.audit-log-view h4 {
  color: #333;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #007bff;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-range-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 10px;
}

.filter-select, .date-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
}

.btn-refresh {
  padding: 8px 16px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-refresh:hover:not(:disabled) {
  background: #0056b3;
}

.stats-section {
  margin-bottom: 25px;
  padding: 15px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.stats-section h5 {
  margin-bottom: 15px;
  color: #555;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 4px;
}

.stat-label {
  font-weight: 500;
  color: #666;
}

.stat-value {
  font-weight: bold;
  font-size: 1.1em;
}

.stat-value.positive {
  color: #28a745;
}

.stat-value.negative {
  color: #dc3545;
}

.audit-entries {
  background: white;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.loading, .no-entries {
  padding: 40px;
  text-align: center;
  color: #666;
  font-style: italic;
}

.audit-entry {
  padding: 15px;
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s;
}

.audit-entry:last-child {
  border-bottom: none;
}

.audit-entry:hover {
  background-color: #f8f9fa;
}

.audit-entry.positive-change {
  border-left: 4px solid #28a745;
}

.audit-entry.negative-change {
  border-left: 4px solid #dc3545;
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.entry-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
}

.field-icon {
  font-size: 1.2em;
}

.entry-timestamp {
  color: #666;
  font-size: 0.9em;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timestamp-date {
  font-weight: 500;
  color: #555;
}

.timestamp-time {
  font-size: 0.85em;
  color: #888;
  font-family: monospace;
}

.timestamp-relative {
  font-size: 0.8em;
  color: #999;
  font-style: italic;
}

.entry-content {
  margin-left: 20px;
}

.value-change {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-family: monospace;
  font-size: 1.1em;
}

.old-value {
  color: #666;
}

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

.new-value {
  font-weight: bold;
}

.difference {
  font-weight: bold;
  font-size: 0.9em;
}

.difference.positive {
  color: #28a745;
}

.difference.negative {
  color: #dc3545;
}

.entry-reason, .entry-notes {
  display: flex;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 0.9em;
}

.reason-label, .notes-label {
  font-weight: 500;
  color: #666;
  min-width: 50px;
}

.reason-value {
  background: #e9ecef;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.85em;
  font-weight: 500;
}

.notes-value {
  color: #555;
  font-style: italic;
}

.date-group {
  margin-bottom: 25px;
}

.date-group-header {
  background: #007bff;
  color: white;
  padding: 8px 15px;
  margin: 0 0 10px 0;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.checkbox-input {
  margin-right: 8px;
}

/* ========================================
   EQUIPMENT VIEW STYLES
   ======================================== */
.btn-add-equipment {
  padding: 8px 16px;
  background: #1da766;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s ease;
}

.btn-add-equipment:hover {
  background: #16a085;
}

.empty-state {
  text-align: center;
  color: #999;
  font-style: italic;
  padding: 2rem !important;
}

.btn-delete {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px 8px;
  transition: transform 0.2s ease;
}

.btn-delete:hover {
  transform: scale(1.2);
}

.equipment-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 15px;
}

.equipment-item {
  padding: 12px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background 0.2s ease;
}

.equipment-item:hover {
  background: #f5f5f5;
}

.equipment-item.selected {
  background: #e8f5e9;
  border-left: 3px solid #1da766;
}

.equipment-name {
  font-weight: bold;
  color: #333;
  margin-bottom: 4px;
}

.equipment-details {
  font-size: 0.9em;
  color: #666;
}

.no-results {
  text-align: center;
  padding: 2rem;
  color: #999;
  font-style: italic;
}

.selected-equipment-details {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 4px;
  margin-top: 15px;
}

.selected-equipment-details h4 {
  margin-top: 0;
  color: #1da766;
}

.selected-equipment-details p {
  margin: 8px 0;
}

.btn-confirm {
  padding: 8px 20px;
  background: #1da766;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s ease;
}

.btn-confirm:hover:not(:disabled) {
  background: #16a085;
}

.btn-confirm:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.btn-cancel {
  padding: 8px 20px;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-cancel:hover {
  background: #5a6268;
}

/* ========================================
   CHARACTER CREATION STYLES
   ======================================== */
.character-creation {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 10px;
}

.creation-content {
  width: 100%;
  background: white;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.creation-header {
  margin-bottom: 30px;
}

.creation-header h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

.progress-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.step.active {
  background-color: #e3f2fd;
  border: 2px solid #2196f3;
}

.step.completed {
  background-color: #e8f5e8;
  border: 2px solid #4caf50;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #ddd;
  color: #666;
  font-weight: bold;
  margin-bottom: 5px;
}

.step.active .step-number {
  background-color: #2196f3;
  color: white;
}

.step.completed .step-number {
  background-color: #4caf50;
  color: white;
}

.step.clickable {
  cursor: pointer;
  transition: all 0.3s ease;
}

.step.clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.step.completed:hover .step-number {
  background-color: #45a049;
}

.step.active:hover .step-number {
  background-color: #1976d2;
}

.step-title {
  font-size: 12px;
  color: #666;
  text-align: center;
}

.session-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background-color: #f5f5f5;
  border-radius: 4px;
  font-size: 14px;
  color: #666;
}

.delete-btn {
  background-color: #f44336;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.delete-btn:hover {
  background-color: #d32f2f;
}

/* ========================================
   DATASHEET VIEW STYLES
   ======================================== */
.datasheet-container {
  padding-top: 10px;
}

.character-overview {
  margin-bottom: 30px;
  margin-top: 0;
}

.character-image {
  position: relative;
}

.character-image .image-upload-container {
  position: absolute;
  bottom: 10px;
  right: 10px;
}

.character-info {
  margin-top: 20px;
}

.info-section {
  max-width: none;
  white-space: normal;
  line-height: 1.6;
}

.info-section p {
  margin: 15px 0;
  padding: 0;
}

.editable-value {
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
  transition: background-color 0.2s;
}

.editable-value:hover {
  background-color: rgba(0, 123, 255, 0.1);
}

.edit-input {
  width: 60px;
  padding: 2px 4px;
  font-size: inherit;
  font-weight: bold;
  border: 2px solid var(--primary-color);
  border-radius: 3px;
  text-align: center;
}

.edit-input:focus {
  outline: none;
  border-color: #0056b3;
}

.editable-prop {
  cursor: pointer;
  padding: 1px 3px;
  border-radius: 2px;
  transition: background-color 0.2s;
  display: inline-block;
  min-width: 20px;
}

.editable-prop:hover {
  background-color: rgba(0, 123, 255, 0.1);
}

.prop-input {
  padding: 1px 4px;
  font-size: inherit;
  border: 1px solid var(--primary-color);
  border-radius: 3px;
  min-width: 60px;
}

.prop-input:focus {
  outline: none;
  border-color: #0056b3;
}

/* ===================================
   LANDING PAGE STYLES
   =================================== */

.landing-page {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: url('/Abgrund-DD2.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
}

.landing-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.landing-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 2rem;
  text-align: center;
  color: white;
}

.dragon-container {
  margin-bottom: 2rem;
}

.dragon-image {
  max-width: 300px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.info-container h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  line-height: 1.2;
}

.info-container .description {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.version-info {
  margin-bottom: 2rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

.version-info p {
  margin: 0.5rem 0;
  line-height: 1.4;
}

.action-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.action-links .btn {
  min-width: 150px;
  font-size: 1.1rem;
  padding: 12px 24px;
}

@media (max-width: 768px) {
  .landing-content {
    padding: 1rem;
  }

  .dragon-image {
    max-width: 200px;
  }

  .info-container h1 {
    font-size: 1.8rem;
  }

  .info-container .description {
    font-size: 1rem;
  }

  .action-links {
    flex-direction: column;
    align-items: center;
  }

  .action-links .btn {
    width: 100%;
    max-width: 300px;
  }
}