/* Equipment container with 3-column grid */
.equipment-container {
  width: 87%;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  
}

.equipment-container > *:nth-child(10) {
  grid-column: 2 / 3; /* Places the 10th element in the second column */
}

.buffcontainer {
  position: relative;
  left: -420px;
  top: 0px;
  width: 100%;
  height: 100%;
  display: block;

}

.buff-icon {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.buff-icon img {
  width: 28px;
  height: 28px;
  transition: all 0.2s ease;
}

.buff-icon:hover img {
  border-color: #ffd700;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
  transform: scale(1.05);
}

/* Diablo 2 Style Tooltip */
.buff-tooltip {
  position: absolute;
  top: 45px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(20, 10, 5, 0.95), rgba(0, 0, 0, 0.95));
  border: 2px solid #8B4513;
  border-radius: 4px;
  padding: 12px 16px;
  color: #F5DEB3;
  font-family: "Oswald", "Bahnschrift Condensed", sans-serif;
  font-size: 14px;
  font-weight: normal;
  white-space: nowrap;
  z-index: 565;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
}

/* Tooltip arrow */
.buff-tooltip::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: #fc0000;
}

.buff-tooltip::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-bottom-color: rgba(40, 20, 10, 0.95);
  z-index: 1;
}

/* Show tooltip on hover */
.buff-icon:hover .buff-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(5px);
}

/* Tooltip content styling */
.buff-tooltip .buff-name {
  color: #FFD700;
  font-weight: bold;
  font-size: 16px;
  display: block;
  margin-bottom: 4px;
}

.buff-tooltip .buff-type {
  color: #90EE90;
  font-size: 12px;
  font-style: italic;
  display: block;
  margin-bottom: 6px;
}

.buff-tooltip .buff-level {
  color: #87CEEB;
  font-size: 13px;
  display: block;
  margin-bottom: 4px;
}

.buff-tooltip .buff-description {
  color: #F5DEB3;
  font-size: 12px;
  line-height: 1.3;
  display: block;
}

/* Different tooltip styles for different buff types */
.buff-tooltip.aura {
  border-color: #4169E1;
}

.buff-tooltip.aura::after {
  border-top-color: #4169E1;
}

.buff-tooltip.curse {
  border-color: #8B0000;
  background: linear-gradient(135deg, rgba(40, 5, 5, 0.95), rgba(60, 10, 10, 0.95));
}

.buff-tooltip.curse::after {
  border-top-color: #8B0000;
}

.buff-tooltip.blessing {
  border-color: #FFD700;
}

.buff-tooltip.blessing::after {
  border-top-color: #FFD700;
}

/* Styling for each category group */
.groupweapons,
.mercgroupweapons,
.grouphelms,
.mercgrouphelms,
.grouparmor,
.mercgrouparmors,
.groupoffhand,
.mercgroupoffs,
.groupgloves,
.mercgroupgloves,
.groupbelts,
.mercgroupbelts,
.groupboots,
.mercgroupboots,
.groupringsone,
.groupringstwo,
.groupamulets {
  display: flex;
  margin-top: 7%;
  flex-direction: column;
  gap: 10px;
  background-color: rgba(18, 7, 7, 0.9);
  border: 1px solid #e00808;
  padding: 15px;
  border-radius: 4px;
  min-width: 0; /* Prevent overflow */
}

/* Styling for labels */
label {
  color: #ffd700;
  font-size: 16px;
}

#selectClass {
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: 1px solid #e00808;
  padding: 5px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  max-width: 113px;
  margin: 10px auto;
}

/* Styling for dropdowns */
select {
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: 1px solid #e00808;
  padding: 5px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  width: 100%;
}

/* Styling for buttons */
button {
  background-color: #4a4a4a;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
    font-family: inherit;
    font-size: 13px;
  width: 33%;
  align-self: center;
  transition: background-color 0.2s;
}

button:hover {
  background-color: #270707;
}

/* Styling for info sections */
.item-info {
  background-color: #120707;
  border: 1px solid #e00808;
  text-align: center;
  padding: 10px;
  font-size: 15px;
  min-height: 50px;
  word-wrap: break-word;
}

/* Reset default styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: url("img/cursor3.png"), auto;
}

/* Root variables */
:root {
  --primary-color: #a41515;
  --text-color: rgb(243, 241, 242);
  --background-color: rgba(0, 0, 0, 0.9);
  --gold-color: #ffd700;
  --button-bg: #4a4a4a;
  --button-hover-bg: #270707;
}

/* Body styling */
body {
  font-family: "overlock sc", "bahnschrift condensed", sans-serif;
  font-size: 15px;
  background-color: var(--background-color);
  color: var(--text-color);
  background-color: #000000;
  margin: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 200px; /* Main content | Mercenary section */
  gap: 20px;
  overflow-x: auto;
}

/* Container layout */
.container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  width: 1200px;
  padding: 20px;
}

/* Header section */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.header select,
.header input[type="text"] {
  background-color: rgba(0, 0, 0, 0.7);
  color: var(--text-color);
  border: 1px solid var(--primary-color);
  padding: 5px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
}

.header .life {
  color: rgb(241, 37, 37);
  font-size: 18px;
}

.header .dps {
  font-size: 16px;
}

.header button {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.header button:hover {
  background-color: #218838;
}

/* Main content layout */
.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Equipment section */
.equipment-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Stats section */
.stats-section {
  background-color: rgba(18, 7, 7, 0.9);
  border: 1px solid var(--primary-color);
  padding: 15px;
  margin: 20px 0;
  font-family: inherit;
  border-radius: 4px;
  width: 200px;
}

#str, #dex, #vit, #enr, #lvlValue {
  width: 30%;
  background-color: rgba(0, 0, 0, 0.8);
  color:rgb(243, 241, 242) ;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  text-align: center;
}

#merclvlValue {
  display: flex;
  position: absolute;
  left: 11vh;
  margin: 4px;
  width: 46px;
  background-color: rgba(0, 0, 0, 0.8);
  color:rgb(243, 241, 242) ;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  text-align: center;
}

.stats-section h3 {
  color: var(--gold-color);
  margin-bottom: 10px;
}

.stats-section p {
  font-size: 14px;
  margin: 5px 0;
}

.stats-section .highlight {
  color: rgb(241, 37, 37);
}

/* Mercenary section */
.mercenary-section {
  position: absolute;
  left: 250vh;
  top: 50px;
  min-width: 400px;
  background: rgba(26, 26, 46, 0.9);
  border: 2px solid #0f3460;
  border-radius: 10px;
  padding: 20px;
  height: fit-content;
}

.mercequipment-container {
  width: 140vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;

}

.mercequipment-container > *:nth-child(7) {
  grid-column: 2 / 3; /* Places the 7th element in the second column */
}

.mercenary-section label {
  color: var(--gold-color);
  font-size: 16px;
}

.mercenary-section select {
  background-color: rgba(0, 0, 0, 0.7);
  color: var(--text-color);
  border: 1px solid var(--primary-color);
  padding: 5px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  width: 100%;
  max-width: 300px;
}

.mercenary-section button {
  background-color: var(--button-bg);
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.mercenary-section button:hover {
  background-color: var(--button-hover-bg);
}

/* Create Custom Item button */
.create-custom-item {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 0.2s;
}

.create-custom-item:hover {
  background-color: #c0392b;
}

.unique-item { 
  color: #FFD700; 
}

.set-item { 
  color: #00FF00; 
}

.inventorycontainer {
  display: grid;
  position: absolute;
  left: 60vw;
  top: 23%;
  grid-template-columns: repeat(10, 40px);
  grid-gap: 1px;
  background-color: #0f0e0e;
  padding: 10px;
  width: 428px;
}

.charm1 {
  width: 40px;
  height: 40px;
  background-color: #555;
  border: 1px solid #000;
}

/* Socket System Styles - CONSOLIDATED */
.socket-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
  padding: 6px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
  min-height: 30px;
  width: 100%;
  align-items: center;
}

.socket-grid {
  display: grid;
  gap: 3px;
  justify-content: center;
  align-items: center;
}

/* Socket grid layouts based on count */

.socket-grid.sockets-0 {
  display: none;
}


.socket-grid.sockets-1 {
  grid-template-columns: 1fr;
  justify-items: center;
}

.socket-grid.sockets-2 {
  grid-template-columns: repeat(2, 1fr);
}

/* .socket-grid.sockets-3 {
  grid-template-columns: 1fr;
  grid-template-rows: repeat(3, 1fr);
}

.socket-grid.sockets-4 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.socket-grid.sockets-5 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, 1fr);
}

.socket-grid.sockets-5 .socket-slot:nth-child(3) {
  grid-column: 1 / 3;
  justify-self: center;
} */

.socket-grid.sockets-6 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, 1fr);
}

.socket-slot {
  width: 30px;
  height: 30px;
  border: 1px dashed #666;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.socket-slot:hover {
  border-color: #ffd700;
  background-color: rgba(255, 215, 0, 0.1);
}

.socket-slot.filled {
  border: 1px solid #ffd700;
  background-color: rgba(229, 89, 1, 0.2);
}

.socket-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.add-socket-btn {
  background-color: #2c5aa0;
  color: white;
  border: none;
  padding: 2px 6px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 10px;
  height: 20px;
  margin-top: 5px;
}

.add-socket-btn:hover {
  background-color: #1e3f73;
}

/* Socket Modal Styles */
.socket-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
}

.socket-modal-content {
  background-color: rgba(18, 7, 7, 0.95);
  margin: 5% auto;
  padding: 20px;
  border: 2px solid #e00808;
  width: 80%;
  max-width: 800px;
  border-radius: 8px;
  color: #fff;
}

.socket-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.socket-close:hover {
  color: #fff;
}

.socket-categories {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.socket-category-tab {
  background-color: #4a4a4a;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.socket-category-tab.active,
.socket-category-tab:hover {
  background-color: #e00808;
}

.socket-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 5px;
  margin-top: 15px;
  max-height: 800px;
  overflow-y: auto;
}

.socket-item {
  background-color: rgba(0, 0, 0, 0.7);
  border: 1px solid #666;
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.socket-item:hover {
  border-color: #ffd700;
  background-color: rgba(255, 215, 0, 0.1);
}

.socket-item img {
  width: 24px;
  height: 24px;
  margin-bottom: 5px;
}

.socket-item-name {
  font-size: 12px;
  color: #fff;
  word-wrap: break-word;
}
.stats-display-grid {
  position: absolute;
  left: 80%;
  top: 5%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 10px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    border: 1px solid #666;
}

.stat-group {
    background: rgba(20, 20, 30, 0.8);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #444;
}

.stat-group h4 {
    color: #ffd700;
    margin: 0 0 10px 0;
    font-size: 14px;
    text-align: center;
    border-bottom: 1px solid #666;
    padding-bottom: 5px;
}

.stat-item {
    display: flex;
    justify-content: space-between; /* Changed from left */
    align-items: center;
    padding: 2px 0;
    font-size: 12px;

    
}

.stat-label {
    color: #cccccc;
    font-weight: normal;
    flex: 1; /* Takes up available space */
    text-align: ce; /* Keep labels left-aligned */
}

.stat-value {
    color: #ffffff;
    font-weight: bold;
    min-width: 20px; /* Increased from 40px for longer values */
    text-align: right; /* All values align to the right */
    flex-shrink: 0; /* Prevents shrinking */
}

.socket-enhanced-stat {
  color: #00BFFF;
  font-weight: bold;
  border-left: none;
}


  .skill-tree-container {
    position: absolute;
    top: 147px;
    width: 250px;
    height: 450px;
    overflow-y: auto;
    overflow-x: hidden;
    background: rgba(0,0,0,0.9);
    border: 2px solid #666;
    border-radius: 8px;
    padding: 12px;
    color: white;
    font-family: Oswald, sans-serif;
    z-index: 5;
    display: block;
    box-sizing: border-box;
    margin: 0;
    float: none;
    transform: none;
  }

  .skill-tree-container input[type="number"] {
  font-family: Oswald, sans-serif;
}

.skill-tree-container h3 {
  margin: 0 0 15px 0;
  color: #ffd700;
  text-align: center;
  border-bottom: 1px solid #666;
  padding-bottom: 8px;
  font-size: 16px;
}

.skill-points-display {
  position: absolute;
  top: 595px;  /* Just above the skill containers at 1500px */
  right: 110px;  /* Same left position as first container */
  background: rgba(0,0,0,0.9);
  color: white;
  padding: 15px;
  border-radius: 8px;
  border: 2px solid #666;
  font-family: Oswald, sans-serif;
  z-index: 4;
  min-width: 150px;
  box-sizing: border-box;
}

#javelinandspearskillscontainer {
  right: 10px;
}

#passiveskillscontainer {
  right: -260px;
}

#bowandcrossbowskillscontainer {
  right: -530px;
}

.skill-calculator-container {
  position: absolute;
  top: 190px;
  left: 220px;
  background: rgba(0,0,0,0.9);
  border: 2px solid #666;
  border-radius: 5px;
  padding: 3px;
  color: white;
  font-family: Oswald, sans-serif;
  font-size: 12px;
  width: 160px;
  z-index: 4;
  box-sizing: border-box;
}

.skill-calculator-container h5 {
  margin: 0 0 10px 0;
  color: #ffd700;
}

.skill-calculator-container select {
  width: 100%;
  padding: 5px;
  background: #333;
  color: white;
  border: 1px solid #666;
  margin-bottom: 10px;
}

.skill-damage-display {
  position: absolute;
  top: 190px;
  left: 380px;
  background: rgba(0,0,0,0.9);
  border: 2px solid #666;
  border-radius: 5px;
  padding: 5px;
  color: white;
  font-family: Oswald, sans-serif;
  font-size: 12px;
  width: 640px;  /* Wider to accommodate horizontal layout */
  max-height: 240px;  /* Shorter since content spreads horizontally */
  overflow-y: auto;
  overflow-x: hidden;
  word-wrap: break-word;
  box-sizing: border-box;
  z-index: 4;
}

.skill-damage-display h5 {
  margin: 0 0 10px 0;
  color: #ffd700;
  width: 100%;
}

/* Horizontal layout for damage info */
.skill-damage-display #damage-results {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: flex-start;
}

.skill-damage-display #damage-results > div {
  flex: 0 0 auto;
  min-width: 120px;
  margin: 0;
  padding: 2px 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  white-space: nowrap;
}

.modecontainer {
  position: absolute;
  top: 5px;
  left: 130px;
  background-color: #2b1b17;
  border: 1.13px solid #906363;
  padding: 3px;
  width: auto;
}

.anyacontainer {
  position: absolute;
  font-size: 9px;
  top: 5px;
  right: 680px;
  background-color: #0f0f0f;
  border: 1.13px solid #7b0e0e;
  padding: 3px;
  width: auto;
  /* z-index: -3; */
}

.section {
  color: #d4a017;
  font-weight: bold;
}

.anyasection {
  color: #f5ad03;
  font-weight: italic;
}

label {
  font-size: 14px;
  font-weight: lighter;
  color: #d7bc23;

}


.label input[type="checkbox"] {
    display: none;
}

.label .checkbox {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #333;
    border-radius: 4px;
    margin-right: 8px;
    background-color: #fff;
    transition: background-color 0.2s;
}

.label input[type="checkbox"]:checked + .checkbox {
    background-color: #000;
    border: 1px solid rgba(137, 17, 17, 0.9);
}

.label input[type="checkbox"]:checked + .checkbox::before {
    content: "Ϛ"; /* Checkmark or any symbol */
    color: #fff; /* White for contrast */
    font-size: 14px;
    /* margin-left: 4px; */

}

.checkbox {
  margin-right: 3px;
}


.modedropdown {
  background-color: #000;
  color: #fff;
  border: 1.5px solid #ff0000;
  padding: 3px;
  width: auto;
  
}

.charm-stat,
.affix,
.suffix {
    color: #E91E63;
    font-size: 11px;
    margin: 1px 0;
}

/* Charm stat breakdown tooltip */
.stat-breakdown {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #666;
    padding: 5px;
    font-size: 10px;
    z-index: 1000;
    pointer-events: none;
    white-space: nowrap;
}
/* .stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(42, 42, 78, 0.3);
}

.stat-row label {
  display: flex;
  align-items: center;
  width: 115%;
}

.stat-row input {
  width: 90px;
  margin-left: auto;
  margin-right: 10px;
  text-align: center;
}

.stat-row span {
  min-width: 10px;
  text-align: left;
} */

/* Responsive design */
@media (max-width: 768px) {
    .stats-display-grid {
        grid-template-columns: 1fr;
    }
}


/* Responsive adjustments */
@media (max-width: 768px) {
  .main-content {
    grid-template-columns: 1fr;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .equipment-container {
    grid-template-columns: 1fr;
  }

  body.moody .stats-display-grid {
    background: rgba(50, 0, 50, 0.8);
    border-color: #a855f7;
}

body.moody .stat-group {
    background: rgba(80, 0, 80, 0.6);
    border-color: #9333ea;
}

body.moody .stat-group h4 {
    color: #e879f9;
}

/* .buff-tooltip {
    font-size: 12px;
    padding: 8px 12px;
  }

.buff-tooltip .buff-name {
    font-size: 14px;
  } */

}

/* Mercenary Stats Display */
.mercenary-stats-display {
  position: absolute;
  left: 235vh;
  top: 50px;
  padding: 5px;
  background: rgba(30, 30, 30, 0.8);
  border: 2px solid #63057a;
  border-radius: 4px;
  width: 165px;
  max-width: 400px;
}

.mercenary-stats-display h4 {
  margin: 0 0 10px 0;
  color: #63057a;
  text-align: center;
  font-size: 14px;

}

.merc-stats-grid {
  display: block;
 
}

.merc-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 23px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.merc-stat-label {
  color: #aaa;
  font-size: 12px;
}

.merc-stat-value {
  color: #fff;

  font-size: 12px;
}