html {
  height: 100%;
  width: 100%;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  padding: 8px;
  margin: 0;
  background-color: #f4f1e8;
  min-height: 100vh;
  color: #2c2416;
}

.wrapper {
  max-width: 1400px;
  margin: 0 auto;
  background: #fafaf8;
  padding: 15px;
  border-radius: 5px;
  border: 1px solid #d4c4a8;
  box-shadow: 0 4px 16px rgba(44,36,22,0.12);
}

.container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 5px;
  margin-bottom: 10px;
}

.name-field {
  grid-column: span 3;
  padding: 4px 8px;
  border: 1px solid #8b7355;
  border-radius: 3px;
  font-size: 16px;
  transition: all 0.3s ease;
  background-color: #fff;
}

.name-field:focus {
  outline: none;
  border-color: #5a4a3a;
  box-shadow: 0 0 5px rgba(90, 74, 58, 0.3);
}

.empty {
  grid-column: span 1;
}

.vp-field {
  grid-column: span 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid #d4c4a8;
  border-radius: 3px;
  background: #fafaf8;
  transition: all 0.3s ease;
}

.vp-field:hover {
  background: #f4f1e8;
}

.vp-field label {
  font-weight: 600;
  white-space: nowrap;
  color: #5a4a3a;
}

.vp-field .number-field {
  flex: 1;
  padding: 1px 1px;
  border: 1px solid #8b7355;
  border-radius: 3px;
  width: 40px;
  max-width: 40px;
  transition: all 0.3s ease;
}

.vp-field .number-field:focus {
  outline: none;
  border-color: #5a4a3a;
  box-shadow: 0 0 5px rgba(90, 74, 58, 0.3);
}

.net-line {
  grid-column: span 1;
  padding: 1px 1px;
  border: 1px solid #d4c4a8;
  border-radius: 3px;
  background: #fafaf8;
  font-weight: 600;
  color: #5a4a3a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropdown-1,
.dropdown-2 {
  grid-column: span 2;
  padding: 1px 1px;
  border: 1px solid #8b7355;
  border-radius: 3px;
  font-size: 15px;
  background: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dropdown-1:focus,
.dropdown-2:focus {
  outline: none;
  border-color: #5a4a3a;
  box-shadow: 0 0 5px rgba(90, 74, 58, 0.3);
}

.tables-container {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.descriptions-container {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  margin-top: 15px;
}

.description-box {
  flex: 1;
}

.description-box h4 {
  margin: 0 0 10px 0;
  color: #5a4a3a;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.75px;
}

.description-box textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #8b7355;
  border-radius: 3px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 13px;
  resize: vertical;
  box-sizing: border-box;
  transition: all 0.3s ease;
  line-height: 1.5;
  background-color: #fff;
}

.description-box textarea:focus {
  outline: none;
  border-color: #5a4a3a;
  box-shadow: 0 0 5px rgba(90, 74, 58, 0.3);
}

.stats-table {
  flex: 1;
  min-width: 300px;
  border-collapse: collapse;
  border: 1px solid #d4c4a8;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(44,36,22,0.07);
  background-color: #fff;
}

.stats-table th,
.stats-table td {
  border: 1px solid #d4c4a8;
  padding: 2px;
  text-align: center;
  width: 1%;
  white-space: nowrap;
}

.stats-table td:first-child {
  width: auto;
  text-align: left;
  padding-left: 8px;
}

.stats-table th {
  background-color: #5a4a3a;
  color: white;
  font-weight: bold;
  font-size: 11pt;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  border-color: #8b7355;
}

.stats-table input[type="text"] {
  width: 35px;
  padding: 1px 1px;
  border: 1px solid #8b7355;
  border-radius: 3px;
  box-sizing: border-box;
  transition: all 0.3s ease;
  font-size: 13px;
  text-align: center;
}

.stats-table input[type="text"]:focus {
  outline: none;
  border-color: #5a4a3a;
  box-shadow: 0 0 5px rgba(90, 74, 58, 0.3);
}

.weapons-ranged-container {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.weapons-container,
.ranged-container {
  flex: 1;
  min-width: 300px;
}

.shields-armor-container {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.shields-container,
.armor-container {
  flex: 1;
  min-width: 300px;
}

.weapons-container h3,
.ranged-container h3,
.shields-container h3,
.armor-container h3 {
  margin-bottom: 12px;
  margin-top: 5px;
  color: #5a4a3a;
  font-size: 18px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.75px;
}

#equip-filter-btn {
  margin-left: 10px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: bold;
  border: 1px solid #8b7355;
  border-radius: 3px;
  background-color: #fafaf8;
  color: #5a4a3a;
  cursor: pointer;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#equip-filter-btn:hover {
  background-color: #5a4a3a;
  color: white;
}

.weapons-table,
.ranged-table,
.shields-table,
.armor-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #d4c4a8;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(44,36,22,0.07);
  background-color: #fff;
}

.weapons-table th,
.weapons-table td,
.ranged-table th,
.ranged-table td,
.shields-table th,
.shields-table td,
.armor-table th,
.armor-table td {
  border: 1px solid #d4c4a8;
  padding: 3px;
  text-align: center;
  width: 1%;
  white-space: nowrap;
}

.weapons-table th,
.ranged-table th,
.shields-table th,
.armor-table th {
  background-color: #5a4a3a;
  color: white;
  font-weight: bold;
  font-size: 10pt;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  border-color: #8b7355;
  word-wrap: break-word;
  white-space: normal;
}

.weapons-table input,
.ranged-table input,
.shields-table input,
.armor-table input {
  width: 45px;
  padding: 1px;
  border: 1px solid #8b7355;
  border-radius: 3px;
  box-sizing: border-box;
  transition: all 0.3s ease;
  font-size: 12px;
  text-align: center;
}

.weapons-table select,
.ranged-table select,
.shields-table select,
.armor-table select {
  width: 100%;
  min-width: 120px;
  padding: 1px;
  border: 1px solid #8b7355;
  border-radius: 3px;
  box-sizing: border-box;
  transition: all 0.3s ease;
  font-size: 12px;
}

.weapons-table input:focus,
.ranged-table input:focus,
.shields-table input:focus,
.armor-table input:focus,
.weapons-table select:focus,
.ranged-table select:focus,
.shields-table select:focus,
.armor-table select:focus {
  outline: none;
  border-color: #5a4a3a;
  box-shadow: 0 0 5px rgba(90, 74, 58, 0.3);
}

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

  .name-field,
  .vp-field,
  .net-line,
  .dropdown-1,
  .dropdown-2,
  .empty {
    grid-column: span 1;
  }

  .empty {
    display: none;
  }

  .tables-container {
    flex-direction: column;
  }

  .stats-table,
  .weapons-table,
  .ranged-table,
  .shields-table,
  .armor-table {
    width: 100%;
    font-size: 10px;
  }

  .stats-table th,
  .stats-table td,
  .weapons-table th,
  .weapons-table td,
  .ranged-table th,
  .ranged-table td,
  .shields-table th,
  .shields-table td,
  .armor-table th,
  .armor-table td {
    padding: 1px;
  }
}

.save-restore-container {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  justify-content: center;
}

.save-restore-container button {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: bold;
  border: 1px solid #8b7355;
  border-radius: 3px;
  background-color: #5a4a3a;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(44,36,22,0.2);
  text-transform: uppercase;
  letter-spacing: 0.75px;
}

.save-restore-container button:hover {
  background-color: #4a3a2a;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(44,36,22,0.3);
}

.save-restore-container button:active {
  transform: translateY(0);
}

.equip-checkbox {
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: #5a4a3a;
}

.weapons-table td:first-child,
.ranged-table td:first-child,
.shields-table td:first-child,
.armor-table td:first-child,
.weapons-table th:first-child,
.ranged-table th:first-child,
.shields-table th:first-child,
.armor-table th:first-child {
  width: 15px;
  text-align: center;
}
