body {
  margin: 0;
  font-family: 'Exo 2', sans-serif;
  background-color: #121212;
  color: white;
  overflow-x: clip;
}

html {
  overflow-x: clip;
}

a:link,
a:visited,
a:hover,
a:active {
  color: inherit; /* or a specific color like #000 (black) */
  text-decoration: none; /* removes the underline */
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #1c1c1c;
  padding: 1rem;
  position: relative;
}
.logo {
  font-size: 1.5rem;
  font-weight: bold;
}
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}
.nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

/* Responsive styles */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #1c1c1c;
    padding: 1rem;
  }
  .nav-links.active {
    display: flex;
    width:120px;
    opacity:0.9;
    z-index: 5;
  }
}

main {
  /* padding: 2rem;
  padding-left:0px; */
  transition: padding-bottom 0.3s ease-in-out;
}

main.loadout-active {
  padding-bottom: calc(33.33vh + 20px);
}

.monster-container {
  width:335px;
  margin: 0 auto;
  font-family: 'Exo 2', sans-serif;
  color: white;
  padding-top:10px;
}

.custom-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.custom-select {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-direction: column;
  position: relative;
}

.stars-yellow {
  color:rgb(222, 233, 24)
}

.stars-purple {
  color:rgb(194, 30, 239)
}

#custom-select-stars {
  top:-2px;
}

#dropdown-button {
  background-color: #1e1e1e;
  color: white;
  padding: 0.6rem 1rem;
  border: 1px solid #444;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: 'Exo 2', sans-serif;
  cursor: pointer;
  text-align: left;
  transition: width 0.5s ease;
  white-space: nowrap;
  overflow: hidden;
}

#search-input {
  background-color: #1e1e1e;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23888" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.35-4.35"></path></svg>');
  background-repeat: no-repeat;
  background-position: 10px center;
  background-size: 16px 16px;
  color: white;
  padding: 0.6rem 1rem 0.6rem 2.2rem;
  border: 1px solid #444;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: 'Exo 2', sans-serif;
  cursor: pointer;
  width: 0px;
  text-align: left;
  transition: width 0.5s ease;
}

.search-icon {
  position:relative;
  left:-30px;
}

.material-search-icon {
  position:absolute;
  top:10px;
  left:245px;
}

#dropdown-button-stars {
  background-color: #1e1e1e;
  color: rgb(194, 30, 239);
  border: 1px solid #444;
  border-radius: 0.5rem;
  font-family: 'Exo 2', sans-serif;
  cursor: pointer;
  text-align: left;
  padding:10px;
}

#dropdown-options {
  position: absolute;
  top: 45px;
  left: 0;
  background-color: #2a2a2a;
  border: 2px solid #444;
  border-radius: 0.5rem;
  width: 290px;
  max-height: 500px;
  overflow-y: auto;
  z-index: 1000;
  list-style: none;
  padding: 0;
  margin: 0;
}

#dropdown-options li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

#dropdown-options li:hover {
  background-color: #3a3a3a;
}

/* Costs page dropdown styles */
#costs-dropdown-button {
  background-color: #2a2a2a;
  color: white;
  padding: 10px 16px;
  border: 2px solid #444;
  border-radius: 6px;
  font-size: 1rem;
  font-family: 'Exo 2', sans-serif;
  cursor: pointer;
  width: 350px;
  text-align: left;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
}

#costs-dropdown-button:hover {
  background: #333;
}

#costs-dropdown-options {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #2a2a2a;
  border: 2px solid #444;
  border-top: none;
  border-radius: 0 0 6px 6px;
  width:346px;
  z-index: 1000;
  margin-top: -2px;
  flex-direction: column;
}

#costs-dropdown-options:not(.hidden) {
  display: flex;
}

#costs-dropdown-options.hidden {
  display: none;
}

#costs-filter-toggle {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background-color: #1e1e1e;
  border-bottom: 1px solid #444;
}

.costs-filter-btn {
  flex: 1;
  padding: 6px 12px;
  background-color: #2a2a2a;
  color: #999;
  border: 1px solid #444;
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: 'Exo 2', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.costs-filter-btn:hover {
  background-color: #333;
  color: #ccc;
}

.costs-filter-btn.active {
  background-color: #444;
  color: white;
  border-color: #666;
}

#costs-search-input {
  padding: 10px 12px 10px 2.2rem;
  background-color: #1e1e1e;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23888" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.35-4.35"></path></svg>');
  background-repeat: no-repeat;
  background-position: 10px center;
  background-size: 16px 16px;
  border: none;
  border-bottom: 1px solid #444;
  color: white;
  font-size: 0.9rem;
  outline: none;
  width: auto;
  transition: none;
}

#costs-search-input::placeholder {
  color: #666;
}

#costs-search-input:focus {
  background: #252525;
}

#costs-dropdown-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 400px;
  overflow-y: auto;
}

#costs-dropdown-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

#costs-dropdown-list li:hover {
  background-color: #3a3a3a;
}

#dropdown-options-stars {
  position: absolute;

  left: 0;
  background-color: #1e1e1e;
  border: 1px solid #444;
  border-radius: 0.5rem;
  list-style: none;
  padding: 10px;
  margin: 0;
  width: 100px;
  z-index: 1000;
  line-height:1.75rem;
  cursor:pointer;
}

#dropdown-options-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

#dropdown-options-list li:hover {
  background-color: #3a3a3a;
}

.dropdown-section-title {
  font-weight: bold;
  color: #ffffff;
  background-color: #1e1e1e !important;
  cursor: default !important;
  padding: 0.7rem 1rem !important;
  font-size: 0.9rem;
  border-top: 1px solid #444;
}

.dropdown-section-title:first-child {
  border-top: none;
  margin-top: 1px;
}

.dropdown-section-title:hover {
  background-color: #1e1e1e !important;
}

.hidden {
  display: none;
}

.monster-icon {
  width: 24px;
  height: 24px;
}

.armor-dropdown-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  margin-right: 8px;
}

.monster-icon-big {
  width:140px;
  height:140px;
}

.material-icon {
  width: 32px;
  height:32px;
  
}

.monster-material {
  border:2px solid;
  border-radius: 0.5rem;
  display:inline-block;
  width:52px;
  text-align: center;
  margin:2px;
  background-color: rgb(56, 56, 56);
}

.monster-material::after {
  font-size: 0.8rem;
  display:block;
  color:white;
}

.material-rarity-1 {
  border-color: #94aaa9;
}

.material-rarity-1::after {
  content: "Rarity 1";
  background-color: #94aaa9;
}

.material-rarity-2 {
  border-color: #49b955;
}

.material-rarity-2::after {
  content: "Rarity 2";
  background-color: #49b955;
}

.material-rarity-3 {
  border-color: #4b8aca;
}

.material-rarity-3::after {
  content: "Rarity 3";
  background-color: #4b8aca;
}

.material-rarity-4 {
  border-color: #c26adf;
}

.material-rarity-4::after {
  content: "Rarity 4";
  background-color: #c26adf;
}

.material-rarity-5 {
  border-color: #eeb83b;
}

.material-rarity-5::after {
  content: "Rarity 5";
  background-color: #eeb83b;
}

.material-rarity-6 {
  border-color: #fd696a;
}

.material-rarity-6::after {
  content: "Rarity 6";
  background-color: #fd696a;
}

.material-rarity-1-nolabel {
  border: 3px solid #94aaa9;
}

.material-rarity-2-nolabel {
  border: 3px solid #49b955;
}

.material-rarity-3-nolabel {
  border: 3px solid #4b8aca;
}

.material-rarity-4-nolabel {
  border: 3px solid #c26adf;
}

.material-rarity-5-nolabel {
  border: 3px solid #eeb83b;
}

.material-rarity-6-nolabel {
  border: 3px solid #fd696a;
}

.armor-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top:10px;
}

.armor-card {
  display: flex;
  background: #1e1e1e;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  padding: 16px;
  
  gap: 16px;
  transition: background 0.3s;
  cursor: pointer;
}

.armor-card:hover {
  background: #2a2a2a;
}

.armor-card > img {
  width: 80px;
  height: 80px;
  object-fit: cover;
}

.weapon-image-container {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.weapon-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
}

.weapon-monster-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 50%;
  background-color: rgba(30, 30, 30, 0.9);
  border: 2px solid #444;
  padding: 2px;
  transition: all 0.3s ease;
}

/* Expanded state - badge moves below weapon icon and gets larger */
.weapon-image-container.expanded .weapon-monster-badge {
  top: 88px;
  right: 26px;
  width: 48px;
  height: 48px;
  padding: 3px;
}

/* Badge position for Long Sword, Hunting Horn, Lance, Gunlance, Charge Blade - top-left */
.weapon-image-container[data-weapon-category="long_sword"] .weapon-monster-badge,
.weapon-image-container[data-weapon-category="hunting_horn"] .weapon-monster-badge,
.weapon-image-container[data-weapon-category="lance"] .weapon-monster-badge,
.weapon-image-container[data-weapon-category="gunlance"] .weapon-monster-badge,
.weapon-image-container[data-weapon-category="charge_blade"] .weapon-monster-badge {
  top: -8px;
  right: auto;
  left: -8px;
}

/* Expanded state for top-left weapons */
.weapon-image-container.expanded[data-weapon-category="long_sword"] .weapon-monster-badge,
.weapon-image-container.expanded[data-weapon-category="hunting_horn"] .weapon-monster-badge,
.weapon-image-container.expanded[data-weapon-category="lance"] .weapon-monster-badge,
.weapon-image-container.expanded[data-weapon-category="gunlance"] .weapon-monster-badge,
.weapon-image-container.expanded[data-weapon-category="charge_blade"] .weapon-monster-badge {
  top: 88px;
  right: auto;
  left: 16px;
}

/* Badge position for Hammer - bottom-right */
.weapon-image-container[data-weapon-category="hammer"] .weapon-monster-badge {
  top: 20px;
  bottom: auto;
  right: -10px;
  left: auto;
}

/* Expanded state for Hammer */
.weapon-image-container.expanded[data-weapon-category="hammer"] .weapon-monster-badge {
  top: 88px;
  right: 26px;
  left: auto;
}

/* Badge position for Bow - bottom-right */
.weapon-image-container[data-weapon-category="bow"] .weapon-monster-badge {
  top: auto;
  bottom: -8px;
  right: -8px;
  left: auto;
}

/* Expanded state for Bow */
.weapon-image-container.expanded[data-weapon-category="bow"] .weapon-monster-badge {
  top: 88px;
  bottom: auto;
  right: 26px;
}

/* Badge position for Light Bowgun and Heavy Bowgun - bottom-left */
.weapon-image-container[data-weapon-category="light_bowgun"] .weapon-monster-badge,
.weapon-image-container[data-weapon-category="heavy_bowgun"] .weapon-monster-badge {
  top: auto;
  bottom: -5px;
  right: auto;
  left: -5px;
}

/* Expanded state for Bowguns */
.weapon-image-container.expanded[data-weapon-category="light_bowgun"] .weapon-monster-badge,
.weapon-image-container.expanded[data-weapon-category="heavy_bowgun"] .weapon-monster-badge {
  top: 88px;
  bottom: auto;
  right: auto;
  left: 16px;
}

/* Armor badge styles */
.armor-image-container {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.armor-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
}

.armor-monster-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 50%;
  background-color: rgba(30, 30, 30, 0.9);
  border: 2px solid #444;
  padding: 2px;
  transition: all 0.3s ease;
}

/* Expanded state - badge moves below armor icon and gets larger */
.armor-image-container.expanded .armor-monster-badge {
  top: 88px;
  right: 11px;
  width: 48px;
  height: 48px;
  padding: 3px;
}

.armor-info {
  min-width:50%;
}

.armor-info h2 {
  margin: 0 0 10px 0;
  font-size: 18px;
  color: #ffffff;
}

.armor-info-list {
  list-style: none;
  padding: 0;
  
  margin-top:10px;
}

.armor-info-listitem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 15px;
  color: #cccccc;
}

.icon {
  margin-right: 8px;
}

.grade-value {
  font-weight: bold;
  color: #ffffff;
  min-width: 20px;
  text-align: right;
  padding-left:5px;
}

.home-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  row-gap: 16px;
  column-gap: 16px;
}

.home-container > a {
  display: block;
}

.home-container > p {
  grid-column: 1 / -1;
  margin: 0 0 8px 0;
}

.home-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #1e1e1e;
  border: 1px solid #444;
  border-radius: 0.5rem;
  padding: 16px 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.home-button:hover {
  background-color: #2a2a2a;
}

.home-button img {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
}

.home-button div {
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
}

.skill-detail {
  font-size: smaller;
  color: #8a8a8a;
  margin-bottom:15px;
}

.armor-level-selector {
  margin-bottom:2px;
}

.armor-level-selector select {
  background-color: #1e1e1e;
  color: #cccccc;
  padding: 0.1rem .3rem;
  border: 1px solid #444;
  border-radius: 0.3rem;
  font-size: 1rem;
  font-family: 'Exo 2', sans-serif;
  cursor: pointer;
}

.skill-grid {
  display: grid;
  grid-template-columns: auto auto;
  gap: 10px;
}

.skill-grid-lvl {
  color: #cccccc
}

.armor-defense-container {
  font-size:15px;
  color:#cccccc;
  margin-bottom:2px;
}

.armor-defense-label {
  color:white;
}

.armor-defense-value {
  color:#adadad
}

.grade-point {
  display: inline-block;
  width:18px;
  margin-right:4px;
  text-align:center;
  border-bottom: 4px solid #f0a400;
}

.grade-point-empty {
  display: inline-block;
  width:18px;
  margin-right:4px;
  text-align: center;
  border-bottom: 4px solid #cccccc;
}

.armor-ammo-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.armor-ammo-table th {
  font-size:14px;
  color:#cccccc;
  font-weight: normal;
  text-align:left;
  padding:2px;
}

.armor-ammo-table td {
  font-size:smaller;
  color:#8a8a8a;
  padding:5px 2px 5px 2px;
}

.armor-ammo-table td {
  border-top:1px solid #4a4a4a;
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  background-color: #1c1c1c;
  border: 2px solid #4a4a4a;
  border-radius: 8px;
  padding: 20px;
  max-width: 500px;
  width: 90%;
  color: white;
}

.modal-content h3 {
  margin-top: 0;
  color: #ffffff;
  font-size: 1.2rem;
}

.modal-content p {
  color: #cccccc;
  line-height: 1.5;
  margin-bottom: 0;
}

.materials-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.material-card {
  background: #2c2c2c;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  cursor: pointer;
}

.material-card.expanded {
  grid-column: span 2;
  align-items: stretch;
  text-align: left;
}

.material-card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.material-name {
  font-size: 0.85rem;
  color: #ffffff;
  word-wrap: break-word;
  text-align: center;
  line-height: 1.2;
}

.material-details {
  width: 100%;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #444;
}

.material-details.hidden {
  display: none;
}

.material-usage-section {
  margin-bottom: 12px;
}

.material-usage-title {
  font-weight: bold;
  color: #ffffff;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.material-usage-item {
  font-size: 0.8rem;
  color: #cccccc;
  padding: 2px 0;
  padding-left: 8px;
  display: block;
  text-decoration: none;
  transition: color 0.2s;
}

.material-usage-item:hover {
  color: #ffffff;
  text-decoration: underline;
}

.material-usage-none {
  font-size: 0.8rem;
  color: #888888;
  font-style: italic;
}

@media (max-width: 768px) {
  .materials-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .material-card.expanded {
    grid-column: span 3;
  }
}

/* Costs page styles */
#grade-selectors {
  margin: 20px 0;
}

#grade-selectors label {
  color: #cbcbcb;
  display: block; 
  margin-bottom: 5px; 
  text-align: left;
  margin-left:7px;
}

#grade-selectors select {
  background-color: #1e1e1e;
  color: #cccccc;
  padding: 0.5rem 0.7rem;
  border: 1px solid #444;
  border-radius: 0.3rem;
  font-size: 1rem;
  font-family: 'Exo 2', sans-serif;
  cursor: pointer;
  margin: 0 5px;
}

#grade-selectors select:hover {
  background-color: #2a2a2a;
}

#calculate-btn {
  background-color: #1e1e1e;
  color: white;
  padding: 12px 40px;
  border: 1px solid #444;
  border-radius: 0.5rem;
  font-size: 16px;
  font-family: 'Exo 2', sans-serif;
  cursor: pointer;
  transition: background-color 0.3s;
}

#calculate-btn:hover {
  background-color: #2a2a2a;
}

#calculate-btn:active {
  background-color: #333;
}

.hitpoints-table {
  border-collapse:collapse;
  width:100%;
}

.hitpoints-table th {
  padding:8px;
  text-align:center
}

.hitpoints-table td {
  border-top:1px solid #444;
  border-bottom:1px solid #444;
  padding:8px;
  text-align:center
}

.hitpoints-table img {
  height:32px;
  display:block;
  margin:0 auto
}

/* Loadout/Build Functionality Styles */

/* Gear checkbox positioning */
.armor-card {
  position: relative;
}

.gear-checkbox-container {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gear-checkbox {
  width: 24px;
  height: 24px;
  cursor: pointer;
  accent-color: #49b955;
  margin: 0;
}

.gear-checkbox:hover {
  transform: scale(1.1);
}

/* Loadout Panel - Slide up from bottom */
.loadout-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, #1c1c1c 0%, #1e1e1e 100%);
  border-top: 2px solid #49b955;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.7);
  z-index: 9999;
  max-height: 33.33vh;
  overflow-y: auto;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  transform: translateY(0);
  opacity: 1;
}

.loadout-panel.hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.loadout-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #333;
  background-color: #1c1c1c;
  position: sticky;
  top: 0;
  z-index: 1;
  cursor: ns-resize;
  user-select: none;
}

.loadout-panel-header:hover {
  background-color: #252525;
}

.loadout-panel-header::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background-color: #555;
  border-radius: 2px;
}

.loadout-panel-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #49b955;
  font-weight: 600;
}

.loadout-panel-close {
  background: none;
  border: none;
  color: #cccccc;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s;
  line-height: 1;
}

.loadout-panel-close:hover {
  background-color: #333;
  color: #ffffff;
}

.loadout-panel-content {
  padding: 20px;
}

/* Gear summary section */
.loadout-gear-summary {
  margin-bottom: 24px;
}

.loadout-gear-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.loadout-gear-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background-color: #2a2a2a;
  border-radius: 6px;
  font-size: 0.95rem;
  gap: 8px;
}

.loadout-gear-type {
  font-weight: 600;
  color: #49b955;
  min-width: 80px;
}

.loadout-gear-name {
  color: #ffffff;
  flex: 1;
}

.loadout-gear-remove {
  background: none;
  border: none;
  color: #888;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s;
  line-height: 1;
  margin-left: auto;
}

.loadout-gear-remove:hover {
  background-color: #fd696a;
  color: #ffffff;
}

/* Perks section */
.loadout-perks-section h4 {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  color: #cccccc;
  font-weight: 600;
}

.loadout-perks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.loadout-perk-item {
  background-color: #2a2a2a;
  border-radius: 6px;
  padding: 12px;
  border-left: 4px solid #49b955;
}

.loadout-perk-name {
  font-size: 1rem;
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 6px;
}

.loadout-perk-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.loadout-perk-gauge {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-bottom: 8px;
}

.loadout-gauge-box {
  width: 20px;
  height: 4px;
  border: 1px solid #666;
  border-radius: 2px;
  display: inline-block;
}

.loadout-gauge-box.filled {
  background-color: #f0a400;
  border-color: #f0a400;
}

.loadout-gauge-box.empty {
  background-color: transparent;
  border-color: #444;
}

.loadout-perk-sources {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
}

.loadout-perk-source {
  color: #cccccc;
  display: flex;
  align-items: center;
  gap: 6px;
}

.loadout-perk-grades-mini {
  display: inline-flex;
  gap: 3px;
  font-size: 0.8rem;
  font-weight: 600;
}

.loadout-perk-grades-mini span {
  opacity: 0.8;
}

.no-perks {
  color: #888888;
  font-style: italic;
  text-align: center;
  padding: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .loadout-panel {
    max-height: 33.33vh;
  }

  .loadout-panel-header {
    padding: 12px 16px;
  }

  .loadout-panel-header h3 {
    font-size: 1.1rem;
  }

  .loadout-panel-content {
    padding: 16px;
  }

  .gear-checkbox-container {
    top: 8px;
    right: 8px;
    padding: 4px;
  }

  .gear-checkbox {
    width: 20px;
    height: 20px;
  }
}

/* Skills Page Styles */
.skills-container {
  padding: 10px 0;
}

.skills-header h2 {
  text-align: center;
  margin: 10px 0 20px 0;
  color: #49b955;
  font-size: 1.5rem;
}

/* Skills Search Filter */
.skills-search-section {
  margin-bottom: 20px;
}

.skills-search-input {
  width: 100%;
  background-color: #1e1e1e;
  color: white;
  padding: 12px 16px;
  border: 1px solid #444;
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Exo 2', sans-serif;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.skills-search-input:focus {
  outline: none;
  border-color: #49b955;
}

.skills-search-input::placeholder {
  color: #888;
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-card {
  background: #1e1e1e;
  border-radius: 8px;
  border: 1px solid #333;
  overflow: hidden;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.skill-card:hover {
  background: #2a2a2a;
  border-color: #49b955;
}

.skill-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
}

.skill-card-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
}

.skill-card-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.skill-card-maxlevel {
  font-size: 0.9rem;
  color: #888;
}

.skill-quick-add-btn {
  background-color: #49b955;
  color: #121212;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color 0.2s, transform 0.1s;
  line-height: 1;
}

.skill-quick-add-btn:hover {
  background-color: #5ed46a;
  transform: scale(1.1);
}

.skill-quick-add-btn:active {
  transform: scale(0.95);
}

.skill-quick-add-btn.skill-remove-state {
  background-color: #fd696a;
}

.skill-quick-add-btn.skill-remove-state:hover {
  background-color: #ff7a7b;
}

.skill-card-details {
  padding: 0 16px 16px 16px;
  border-top: 1px solid #333;
  margin-top: 8px;
}

.skill-card-details.hidden {
  display: none;
}

.skill-levels-container {
  margin-bottom: 16px;
}

.skill-level-item {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #2a2a2a;
}

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

.skill-level-label {
  font-weight: 600;
  color: #f0a400;
  font-size: 0.9rem;
}

.skill-level-desc {
  color: #cccccc;
  font-size: 0.9rem;
  line-height: 1.4;
}

.skill-gear-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #444;
}

.skill-gear-section h4 {
  margin: 0 0 12px 0;
  font-size: 1rem;
  color: #ffffff;
}

.skill-gear-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.skill-gear-subtitle {
  font-weight: 600;
  color: #49b955;
  margin-top: 12px;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.skill-gear-item {
  padding: 4px 0;
  font-size: 0.9rem;
  color: #cccccc;
}

.skill-gear-item a {
  color: #49b955;
  text-decoration: none;
}

.skill-gear-item a:hover {
  text-decoration: underline;
}

.skill-gear-levels {
  color: #888;
  font-size: 0.85rem;
  margin-left: 4px;
}

.skill-gear-none {
  color: #888;
  font-style: italic;
  font-size: 0.9rem;
  padding: 8px 0;
}

/* Gear Lock Styles */
.gear-lock-section {
  background: #1e1e1e;
  border-radius: 8px;
  border: 1px solid #333;
  margin-bottom: 24px;
}

.gear-lock-header {
  background: #2a2a2a;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #4b8aca;
}

.gear-lock-header:hover {
  background: #333;
}

.gear-lock-header h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1.1rem;
}

.gear-lock-header::after {
  content: '▼';
  font-size: 0.8rem;
  color: #888;
  transition: transform 0.3s;
}

.gear-lock-header.collapsed::after {
  transform: rotate(-90deg);
}

.gear-lock-description {
  margin: 0;
  color: #888;
  font-size: 0.85rem;
  font-style: italic;
}

.gear-lock-content {
  padding: 16px;
}

.gear-lock-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gear-lock-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gear-lock-label {
  font-weight: 600;
  color: #ffffff;
  min-width: 60px;
  font-size: 0.95rem;
}

.gear-lock-dropdown {
  flex: 1;
  position: relative;
}

.gear-lock-button {
  width: 100%;
  background-color: #2a2a2a;
  color: #cccccc;
  padding: 8px 12px;
  border: 1px solid #444;
  border-radius: 6px;
  font-family: 'Exo 2', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gear-lock-button:hover {
  background-color: #333;
  border-color: #4b8aca;
}

.gear-lock-button-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.gear-lock-button-text {
  flex: 1;
}

.gear-lock-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background-color: #2a2a2a;
  border: 1px solid #4b8aca;
  border-radius: 6px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.gear-lock-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.gear-lock-option:hover {
  background-color: #333;
}

.gear-lock-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.gear-lock-option-text {
  color: #cccccc;
  font-size: 0.9rem;
}

.gear-lock-category-header {
  font-weight: 600;
  color: #4b8aca;
  background-color: #1e1e1e;
  padding: 10px 12px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-top: 1px solid #444;
  cursor: default;
  pointer-events: none;
}

.gear-lock-category-header:first-of-type {
  border-top: none;
}

.weapon-type-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background-color: #1e1e1e;
  border-bottom: 1px solid #444;
  justify-content: center;
}

.weapon-type-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s, transform 0.2s;
  border: 2px solid transparent;
  border-radius: 4px;
  padding: 2px;
}

.weapon-type-icon:hover {
  opacity: 0.8;
  transform: scale(1.1);
}

.weapon-type-icon.active {
  opacity: 1;
  border-color: #4b8aca;
  background-color: rgba(75, 138, 202, 0.2);
}

/* Excluded Gear Styles */
.gear-exclude-section {
  background: #1e1e1e;
  border-radius: 8px;
  border: 1px solid #333;
  margin-bottom: 24px;
}

.gear-exclude-header {
  background: #2a2a2a;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #ca4b4b;
}

.gear-exclude-header:hover {
  background: #333;
}

.gear-exclude-header h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1.1rem;
}

.gear-exclude-header::after {
  content: '▼';
  font-size: 0.8rem;
  color: #888;
  transition: transform 0.3s;
}

.gear-exclude-header.collapsed::after {
  transform: rotate(-90deg);
}

.gear-exclude-description {
  margin: 0;
  color: #888;
  font-size: 0.85rem;
  font-style: italic;
}

.gear-exclude-content {
  padding: 16px;
}

.gear-exclude-controls {
  margin-bottom: 16px;
}

.gear-exclude-dropdown {
  position: relative;
  width: 100%;
}

.gear-exclude-button {
  width: 100%;
  padding: 10px 16px;
  background: #2a2a2a;
  border: 2px solid #444;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-size: 0.95rem;
  text-align: left;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gear-exclude-button:hover {
  background: #333;
  border-color: #ca4b4b;
}

.gear-exclude-button-text {
  flex: 1;
}

.gear-exclude-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #2a2a2a;
  border: 2px solid #444;
  border-top: none;
  border-radius: 0 0 6px 6px;
  z-index: 1000;
  margin-top: -2px;
  flex-direction: column;
}

.gear-exclude-options:not(.hidden) {
  display: flex;
}

.gear-exclude-search {
  padding: 10px 12px;
  background: #1e1e1e;
  border: none;
  border-bottom: 1px solid #444;
  color: white;
  font-size: 0.9rem;
  outline: none;
}

.gear-exclude-search::placeholder {
  color: #666;
}

.gear-exclude-search:focus {
  background: #252525;
}

.gear-exclude-options-list {
  max-height: 300px;
  overflow-y: auto;
}

.gear-exclude-option {
  padding: 10px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 0.9rem;
}

.gear-exclude-option:hover {
  background: #3a3a3a;
}

.gear-exclude-no-results {
  padding: 20px;
  text-align: center;
  color: #666;
  font-style: italic;
}

.gear-exclude-category-header {
  font-weight: 600;
  color: #ca4b4b;
  background-color: #1e1e1e;
  padding: 10px 12px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-top: 1px solid #444;
  cursor: default;
  pointer-events: none;
}

.gear-exclude-category-header:first-of-type {
  border-top: none;
}

.excluded-gear-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.excluded-gear-empty {
  color: #666;
  font-style: italic;
  text-align: center;
  padding: 20px;
}

.excluded-gear-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #2a2a2a;
  border-radius: 4px;
  border: 1px solid #444;
}

.excluded-gear-name {
  color: #fff;
  font-size: 0.9rem;
}

.excluded-gear-remove {
  background: #ca4b4b;
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  padding: 0;
}

.excluded-gear-remove:hover {
  background: #ff5555;
}

/* Build Optimizer Styles */
.build-optimizer-section {
  background: #1e1e1e;
  border-radius: 8px;
  border: 1px solid #333;
  margin-bottom: 24px;
  overflow: hidden;
}

.build-optimizer-header {
  background: #2a2a2a;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #49b955;
}

.build-optimizer-header:hover {
  background: #333;
}

.build-optimizer-header h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1.1rem;
}

.build-optimizer-header::after {
  content: '▼';
  font-size: 0.8rem;
  color: #888;
  transition: transform 0.3s;
}

.build-optimizer-header.collapsed::after {
  transform: rotate(-90deg);
}

.build-optimizer-content {
  padding: 16px;
}

.skill-selector-panel {
  margin-top: 16px;
}

.skill-selector-instructions {
  color: #cccccc;
  font-size: 0.9rem;
  margin-bottom: 16px;
  padding: 12px;
  background: #2a2a2a;
  border-radius: 6px;
  border-left: 4px solid #49b955;
}

.selected-skills-list {
  margin-bottom: 16px;
  min-height: 40px;
}

.no-skills-selected {
  color: #888;
  font-style: italic;
  text-align: center;
  padding: 20px;
}

.selected-skill-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #2a2a2a;
  border-radius: 6px;
  margin-bottom: 8px;
  cursor: move;
  transition: background-color 0.2s, border 0.2s;
}

.selected-skill-item:hover {
  background: #333;
}

.skill-drag-handle {
  color: #888;
  font-size: 1rem;
  cursor: grab;
  user-select: none;
  line-height: 1;
}

.skill-drag-handle:active {
  cursor: grabbing;
}

.selected-skill-name {
  flex: 1;
  color: #ffffff;
  font-weight: 600;
}

.selected-skill-level {
  background-color: #1e1e1e;
  color: #cccccc;
  padding: 4px 8px;
  border: 1px solid #444;
  border-radius: 4px;
  font-family: 'Exo 2', sans-serif;
  cursor: pointer;
}

.selected-skill-remove {
  background: none;
  border: none;
  color: #888;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s;
  line-height: 1;
}

.selected-skill-remove:hover {
  background-color: #fd696a;
  color: #ffffff;
}

.optimize-build-btn,
.clear-selections-btn {
  background-color: #49b955;
  color: #121212;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-family: 'Exo 2', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-right: 8px;
  margin-bottom: 8px;
}

.optimize-build-btn:hover {
  background-color: #5ed46a;
}

.clear-selections-btn {
  background-color: #444;
  color: #ffffff;
}

.clear-selections-btn:hover {
  background-color: #555;
}

.skill-selector-controls {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #444;
}

.skill-add-btn {
  background-color: #4b8aca;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-family: 'Exo 2', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  width: 100%;
}

.skill-add-btn:hover {
  background-color: #5a9cd4;
}

.skill-add-btn.skill-remove-state {
  background-color: #fd696a;
}

.skill-add-btn.skill-remove-state:hover {
  background-color: #ff7a7b;
}

/* Build Results */
.build-results-panel {
  margin-top: 20px;
}

.build-results-loading,
.no-builds-found {
  text-align: center;
  padding: 40px 20px;
  color: #cccccc;
  font-size: 1rem;
}

.build-results-header h3 {
  margin: 0 0 16px 0;
  color: #49b955;
  font-size: 1.1rem;
}

.build-results-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.build-result-item {
  background: #2a2a2a;
  border-radius: 8px;
  padding: 16px;
  border: 1px solid #444;
}

.build-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #444;
}

.build-result-rank {
  font-size: 1.2rem;
  font-weight: 700;
  color: #49b955;
}

.build-result-score {
  font-size: 0.9rem;
  color: #888;
}

.build-result-gear {
  margin-bottom: 12px;
}

.build-gear-piece {
  padding: 4px 0;
  color: #cccccc;
  font-size: 0.9rem;
}

.build-gear-piece strong {
  color: #49b955;
  margin-right: 8px;
}

.build-gear-skills {
  font-size: 0.8rem;
  color: #888;
  margin-left: 16px;
  margin-top: 2px;
  font-style: italic;
}

.build-result-skills {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #444;
}

.build-skill-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: #1e1e1e;
  border-radius: 4px;
  border: 1px solid transparent;
}

.build-skill-item.selected-met {
  border-color: #49b955;
  background: rgba(73, 185, 85, 0.1);
}

.build-skill-item.selected-unmet {
  border-color: #fd696a;
  background: rgba(253, 105, 106, 0.1);
}

.build-skill-name {
  font-size: 0.9rem;
  color: #ffffff;
  font-weight: 600;
  flex: 0 0 auto;
  margin-right: 12px;
}

.build-skill-gauge {
  display: flex;
  gap: 3px;
  align-items: center;
  flex: 0 0 auto;
}

.build-gauge-box {
  width: 18px;
  height: 4px;
  border: 1px solid #666;
  border-radius: 2px;
  display: inline-block;
}

.build-gauge-box.filled {
  background-color: #f0a400;
  border-color: #f0a400;
}

.build-gauge-box.empty {
  background-color: transparent;
  border-color: #444;
}

.build-driftstone-recommendations {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #444;
}

.build-driftstone-recommendations h4 {
  margin: 0 0 12px 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: #aaa;
}

.driftstone-rec-item {
  padding: 8px 12px;
  background: #1e1e1e;
  border-radius: 4px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: #ccc;
  line-height: 1.5;
}

.driftstone-rec-message {
  padding: 8px 12px;
  color: #888;
  font-style: italic;
  font-size: 0.85rem;
}

.build-number-div {
  font-size:0.5em;
  color:#888;
  margin-top:100px;
}