/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Germania+One&family=Roboto:wght@300;400;500;700&display=swap');

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary-color: #AD810A;
  --border-color: #5A5A5A;
  --bg-dark: #000000;
  --bg-darker: #0A0A0A;
  --text-light: #FFFFFF;
  --text-muted: #999999;
}

/* Base Typography */
body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 400;
  padding: 0;
  margin: 0;
}

/* Header Styles */
.app-header {
  text-align: center;
  padding: 1.8rem 0 1.2rem;
  position: relative;
  background: linear-gradient(145deg, #0a0a0a 0%, #111 100%);
  border-bottom: 1px solid #2a210f;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.title-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 3rem;
  background: rgba(15, 12, 8, 0.85);
  border: 1px solid #4a3a1a;
  box-shadow: 
    0 0 0 1px #000,
    inset 0 0 15px rgba(0, 0, 0, 0.6),
    0 0 10px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  z-index: 1;
  max-width: 90%;
  margin: 0 auto;
  border-radius: 2px;
}

.title-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h100v100H0z" fill="none"/><path d="M0 0h100v100H0z" fill="none" stroke="%23b8860b" stroke-width="0.2" opacity="0.15" stroke-dasharray="3,3"/></svg>'),
    linear-gradient(135deg, rgba(184, 134, 11, 0.05) 0%, transparent 50%, rgba(184, 134, 11, 0.05) 100%);
  z-index: -1;
  opacity: 0.6;
}

.main-title {
  font-family: 'Germania One', cursive;
  font-size: 3.5rem;
  color: #e6c88a;
  text-shadow: 
    1px 1px 1px rgba(0, 0, 0, 0.7),
    0 0 10px rgba(0, 0, 0, 0.5);
  letter-spacing: 4px;
  margin: 0;
  line-height: 1.2;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  background: linear-gradient(to bottom, #fff1c1, #d4a518);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0.3px rgba(0, 0, 0, 0.3);
  padding: 0 1rem;
  font-weight: 500;
  text-align: center;
  display: block;
  position: relative;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.7));
}

.title-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, #d4a518, transparent);
  margin: 1.5rem auto 1.2rem;
  width: 60%;
  max-width: 300px;
  position: relative;
  border: none;
  opacity: 0.9;
  box-shadow: 0 0 10px rgba(212, 165, 24, 0.3);
}

.subtitle {
  font-family: 'Germania One', cursive;
  font-size: 1.2rem;
  color: #d4af37;
  text-shadow: 
    1px 1px 2px #000,
    0 2px 4px rgba(0, 0, 0, 0.8);
  letter-spacing: 3px;
  margin: 0.5rem 0 0;
  font-weight: normal;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
  padding: 0.4rem 1.5rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #3d2e0f;
  box-shadow: 
    inset 0 0 10px rgba(0, 0, 0, 0.5),
    0 0 10px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 90%;
}

.subtitle::before,
.subtitle::after {
  content: '❖';
  color: #b8860b;
  margin: 0 0.8rem;
  font-size: 0.9em;
  position: relative;
  top: -1px;
  text-shadow: 1px 1px 1px #000;
  opacity: 0.8;
}

.title-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, #b8860b, transparent);
  margin: 0.5rem auto 0;
  width: 80%;
  position: relative;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.team-comp {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  padding: 15px 0;
}

.hero-section {
  background-color: var(--bg-darker);
  border: 2px solid var(--border-color);
  border-radius: 6px;
  padding: 0;
  transition: all 0.3s ease;
  position: relative;
  overflow: visible; /* Changed from hidden to visible to allow tooltips to overflow */
  min-height: 500px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-image-container {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image {
  max-width: 100%;
  max-height: 140px;
  object-fit: contain;
  display: none;
  margin: 0 auto;
}

.hero-content {
  flex: 1;
  padding: 15px 10px;
  position: relative;
  z-index: 1;
}

/* Headers and Titles */
h1, h2, h3, h4, h5, h6,
.hero-header,
.skill-tooltip::before,
.hero-name {
  font-family: 'Germania One', cursive;
  text-transform: uppercase;
  font-weight: normal;
  letter-spacing: 1px;
}

/* Hero Header */
.hero-header {
  background: linear-gradient(to right, #1a1a1a, #2a2a2a);
  border-radius: 4px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid #3d3d3d;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
}

.hero-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
  opacity: 0.7;
}

.hero-header .heroIcon {
  width: 44px;
  height: 44px;
  min-width: 44px; /* Prevent icon from shrinking */
  object-fit: contain;
  margin-right: 10px;
  filter: drop-shadow(0 0 3px rgba(173, 129, 10, 0.5));
  transition: transform 0.2s ease;
  flex-shrink: 0; /* Prevent icon from shrinking */
}

.hero-header:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(173, 129, 10, 0.4);
  transform: translateY(-1px);
}

.hero-header:hover .heroIcon {
  transform: scale(1.05);
}

/* Custom Select Styling */
.image-selector {
  background: #1a1a1a;
  color: #e0e0e0;
  border: 1px solid #3d3d3d;
  border-radius: 4px;
  padding: 8px 30px 8px 12px;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23AD810A'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  transition: all 0.3s ease;
  min-width: 0; /* Allow flex-shrink */
  width: 100%; /* Take available space */
  max-width: 100%; /* Ensure it doesn't overflow */
  text-overflow: ellipsis;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
  flex: 1 1 auto; /* Allow it to grow and shrink */
  box-sizing: border-box; /* Include padding in width */
  margin: 0;
}

/* Remove default arrow in IE */
.image-selector::-ms-expand {
  display: none;
}

/* Hover state */
.image-selector:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 8px rgba(173, 129, 10, 0.3);
}

/* Focus state */
.image-selector:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(173, 129, 10, 0.3);
}

/* Disabled option styling */
.image-selector option:disabled {
  color: #666;
  background-color: #2a2a2a;
}

/* Option styling */
.image-selector option {
  background: #2a2a2a;
  color: #e0e0e0;
  padding: 8px;
}

/* Dropdown arrow container */
.select-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--primary-color);
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  justify-items: center;
  align-items: center;
  box-sizing: border-box;
  grid-auto-rows: 1fr;
  grid-auto-columns: 1fr;
}

/* Skill container - ensures perfect square */
.skill {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 100%; /* This creates a square aspect ratio */
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #3d3d3d;
  border-radius: 4px;
  background: #1a1a1a;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
  margin: 0;
  -webkit-tap-highlight-color: transparent;
}

/* Selected state for skills */
.skill.selected {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(173, 129, 10, 0.6);
  transform: scale(0.95);
  position: relative;
  z-index: 2;
}

/* Add a number indicator for selected skills */
.skill.selected::after {
  content: attr(data-selected-index);
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  background: var(--primary-color);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  z-index: 2;
}

/* Style for when max skills are selected */
.skill.max-selected:not(.selected) {
  opacity: 0.6;
  filter: grayscale(0.8);
  cursor: not-allowed;
}

/* Counter for selected skills */
.skills-counter {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--primary-color);
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: bold;
  z-index: 10;
  pointer-events: none; /* Allow clicks to pass through to elements below */
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .container {
    padding: 0 15px;
  }
}

@media (max-width: 992px) {
  .team-comp {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero-header {
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .image-selector {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .team-comp {
    grid-template-columns: 1fr;
  }
  
  .hero-section {
    min-height: auto;
  }
  
  .hero-header {
    padding: 6px 8px;
  }
  
  .hero-content {
    padding: 10px;
  }
  
  .skills-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 576px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 8px;
  }
  
  .hero-image-container {
    width: 120px;
    height: 120px;
  }
  
  .hero-image {
    max-height: 110px;
  }
  
  .hero-header h2 {
    font-size: 1.1em;
  }
}

/* Ensure all skill images fill their containers */
.skill img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important; /* Changed from contain to cover */
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  aspect-ratio: 1 / 1; /* Ensures perfect square */
  border-radius: 0 !important;
  line-height: 0;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.skill:hover {
  transform: scale(1.05); /* Scale instead of translate for better effect */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-color: var(--primary-color);
  z-index: 2; /* Bring hovered item above others */
}

.skill.highlight img {
  border: 2px solid var(--primary-color);
  box-shadow: 0 0 10px var(--primary-color);
  border-radius: 4px;
}

.skill img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  box-sizing: border-box;
  display: block;
  margin: 0;
}

/* Skill icon wrapper */
.skill-icon-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Skill icon */
.skill-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Skill container */
.skill {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 60px; /* Ensure minimum height */
  cursor: pointer;
  z-index: 1;
  background-color: rgba(40, 40, 40, 0.7);
  border: 1px solid rgba(90, 90, 90, 0.5);
  border-radius: 4px;
  overflow: visible;
  transition: all 0.2s ease;
}

.skill:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(173, 129, 10, 0.4);
}

/* Skill icon */
/* Skill icon - fills container */
.skill-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  max-width: 100%;
  max-height: 100%;
}

.skill:hover .skill-icon {
  transform: scale(1.1);
}

/* Tooltip styles */
.custom-tooltip {
  position: fixed;
  background: rgba(0, 0, 0, 0.95);
  color: #e0e0e0; /* Light gray text */
  border: 1px solid #b8860b; /* Darker yellow border */
  padding: 4px 0; /* Reduced main padding */
  border: 1px solid #b8860b; /* Darker yellow border */
  border-radius: 8px;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  max-width: 300px;
  width: max-content;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.3px;
  margin: 0;
  box-sizing: border-box;
}

.custom-tooltip.visible {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

.custom-tooltip .tooltip-title {
  font-size: 16px;
  font-weight: bold;
  color: #b8860b; /* Darker yellow */
  margin: 0 0 8px 0;
  padding: 12px 16px 8px; /* Added padding around title */
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
  line-height: 1.4;
  letter-spacing: 0.5px;
  display: block;
}

.custom-tooltip .tooltip-content {
  font-size: 14px;
  line-height: 1.6;
  color: #e0e0e0; /* Light gray */
  margin: 0;
  padding: 0 16px 12px; /* Added horizontal and bottom padding */
  display: block;
}

.custom-tooltip .tooltip-content p {
  margin: 0 0 10px 0;
  padding: 0;
}

.custom-tooltip .tooltip-content p:last-child {
  margin-bottom: 0;
}

.custom-tooltip .tooltip-content ul,
.custom-tooltip .tooltip-content ol {
  margin: 8px 0 12px 0;
  padding-left: 20px;
}

.custom-tooltip .tooltip-content li {
  margin-bottom: 6px;
  padding-left: 4px;
}

.custom-tooltip .tooltip-content img.inline-token {
  vertical-align: middle;
  margin: 0 3px;
  height: 1.5em;
  width: auto;
  min-width: 20px;
  object-fit: contain;
  display: inline-block;
}

.skill-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: var(--primary-color) transparent transparent transparent;
}

.skill:hover .skill-tooltip {
  opacity: 1;
  visibility: visible;
  z-index: 10000;
}

/* Tooltip container */
.tooltip {
  position: relative;
  display: inline-block;
  width: 100%;
  height: 100%;
  overflow: visible !important; /* Ensure tooltips can overflow */
}

/* Tooltip text */
.tooltip .tooltiptext {
  display: block;
  visibility: hidden;
  width: 200px;
  z-index: 10000;
  background-color: #111;
  color: #fff;
  text-align: center;
  border: 1px solid #5A5A5A;
  padding: 10px;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 10px;
  opacity: 0;
  transition: opacity 0.3s;
}

.skill-tooltip {
  visibility: hidden;
  width: 200px;
  background-color: rgba(0, 0, 0, 0.95);
  color: #e0e0e0; /* Light gray */
  border: 1px solid #b8860b; /* Darker yellow */
  color: #fff;
  border-radius: 4px;
  padding: 10px;
  position: absolute;
  z-index: 100; /* Higher than skills counter */
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s;
  pointer-events: none;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(2px);
}

/* Selected Skills Container */
.selected-skills-container {
  margin-top: 10px;
  background: rgba(26, 26, 26, 0.9);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px;
  min-height: 50px;
  max-height: none;
  overflow-y: visible;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.selected-skills-container h3 {
  color: var(--primary-color);
  font-size: 15px;
  margin: 0 0 10px 0;
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.selected-skills-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.selected-skills-list li {
  margin: 0;
  padding: 10px 12px;
  background: rgba(35, 35, 35, 0.8);
  border-left: 3px solid var(--primary-color);
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 13px;
  color: #ddd;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  white-space: normal;
  line-height: 1.4;
  width: 100%;
  box-sizing: border-box;
  min-height: 50px; /* Ensure minimum height for better touch targets */
}

.selected-skills-list li .skill-info {
  flex: 1;
  min-width: 0; /* Allows text to wrap properly */
  overflow: hidden;
}

.selected-skills-list li .skill-name {
  display: block;
  font-weight: bold;
  color: #fff;
  margin-bottom: 4px;
}

.selected-skills-list li .skill-desc {
  font-size: 12px;
  line-height: 1.4;
  color: #bbb;
  word-wrap: break-word;
  overflow: hidden;
}

.selected-skills-list li .inline-token {
  margin: 0 1px;
  vertical-align: middle;
}

.selected-skills-list li:hover {
  background: rgba(45, 45, 45, 0.95);
  transform: translateX(3px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Skill info styling */
.skill-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  margin-right: 10px;
  min-width: 0; /* Prevents flex items from overflowing */
}

.skill-desc {
  font-size: 12px;
  color: #bbb;
  line-height: 1.4;
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
}

/* Plague Doctor specific skill text colors */
.skill-desc:contains('Clear All Corpses') {
  color: #c0392b; /* Medium dark red */
}

.skill-desc:contains('Shuffle') {
  color: rgb(104, 95, 145); /* Specified purple */
}

.skill-desc:contains('Positive') {
  color: #d4af37; /* Darker yellow */
}

.skill-desc:contains('Negative') {
  color: #3498db; /* Blue */
}

/* Token container styling */
.skill-tokens {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.token {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  font-size: 11px;
  color: #ddd;
  white-space: nowrap;
}

.token img {
  width: 16px;
  height: 16px;
  margin-right: 2px;
  object-fit: contain;
  border: none !important;
  background: none !important;
  padding: 0;
}

/* Inline token images */
.inline-token {
  display: inline-block !important;
  width: 16px !important;
  height: 16px !important;
  vertical-align: middle !important;
  margin: 0 2px !important;
  position: relative;
  object-fit: contain;
  border: none !important;
  background: none !important;
}

/* Target any img tags directly in the tooltip */
.skill-tooltip img {
  width: 16px !important;
  height: 16px !important;
  vertical-align: middle !important;
  margin: 0 2px !important;
  display: inline-block !important;
  object-fit: contain;
  border: none !important;
  background: none !important;
}
/* Tooltip styles */
.skill-tooltip {
  position: absolute;
  bottom: 100%;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #b8860b;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  text-align: left;
  white-space: normal;
  line-height: 1.5;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  display: block;
  font-family: 'Roboto', sans-serif;
}

/* Skill name styling */
.skill-tooltip::before {
  content: attr(data-skill-name);
  font-family: 'Germania One', cursive;
  display: block;
  font-size: 1.2em;
  margin-bottom: 8px;
  color: #b8860b;
  border-bottom: 1px solid #b8860b;
  padding-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Tooltip content */
.skill-tooltip .tooltip-content {
  white-space: normal;
  word-wrap: break-word;
  line-height: 1.5;
  font-size: 13px;
  font-family: 'Roboto', sans-serif;
}

/* Inline token images */
.inline-token {
  display: inline-block !important;
  width: 20px !important;
  height: 20px !important;
  vertical-align: text-bottom !important;
  margin: 0 1px !important;
  position: relative;
  top: 2px;
  object-fit: contain;
  pointer-events: none;
  image-rendering: crisp-edges;
}

/* Ensure images in tooltips are properly sized */
.skill-tooltip img {
  display: inline-block !important;
  width: 20px !important;
  height: 20px !important;
  vertical-align: text-bottom !important;
  margin: 0 1px !important;
  position: relative;
  top: 2px;
  object-fit: contain;
  pointer-events: none;
  image-rendering: crisp-edges;
}

/* Show tooltip on hover */
.skill:hover .skill-tooltip {
  opacity: 1;
  pointer-events: auto;
}

/* Reset any conflicting styles */
.movement-term {
  color: #685f91;
  font-weight: bold;
}

.tooltip-content p,
.tooltip-content div,
.tooltip-content span {
  display: inline !important;
  margin: 0 !important;
  line-height: 1.5 !important;
  white-space: normal !important;
  font-size: inherit !important;
}

/* Ensure the skill/* Enhanced Tooltip Styles */
.custom-tooltip {
  position: fixed;
  background: rgba(0, 0, 0, 0.95);
  color: #f0f0f0;
  padding: 18px 20px;
  border: 1px solid #b8860b; /* Darker yellow border */
  border-radius: 8px;
  border-radius: 6px;
  font-family: 'Roboto', sans-serif;
  margin: 0 0 8px 0;
  padding: 0 0 4px 0;
  border-bottom: 1px solid var(--primary-color);
  white-space: normal;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Remove button styling */
.remove-button {
  margin-right: 8px;
}

.skill-tooltip::before {
  content: attr(data-skill-name);
  display: block;
  font-weight: bold;
  color: #b8860b; /* Darker yellow */
  color: var(--primary-color);
  font-size: 17px;
  margin: 0 0 12px 0;
  padding: 0 0 8px 0;
  white-space: normal;
  line-height: 1.4;
  display: block;
  overflow: visible;
  text-overflow: ellipsis;
  max-height: none;
}

.skill-desc .inline-token {
  vertical-align: middle;
  display: inline-block;
  width: 16px;
  height: 16px;
}

.skill-desc br {
  display: block;
  content: '';
  margin-top: 4px;
}

.remove-skill {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: #ff6b6b;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  margin-left: 8px;
  padding: 2px 8px 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  line-height: 1;
}

.remove-skill:hover {
  background: rgba(255, 107, 107, 0.3);
  transform: scale(1.1);
}

.remove-skill:active {
  transform: scale(0.95);
}

/* Inline token images */
.inline-token {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin: 0 2px;
  position: relative;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(0, 0, 0, 0.3);
}

/* Show the tooltip text when you mouse over the skill icon */
.skill:hover .skill-tooltip,
.skill:focus .skill-tooltip,
.skill:focus-within .skill-tooltip {
  visibility: visible;
  opacity: 1;
  transition-delay: 0.2s;
}

/* Tooltip arrow */
.tooltip .tooltiptext::after {
  content: "";
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #5A5A5A transparent transparent transparent;
}

/* Skill icon wrapper - fills parent */
.skill-icon-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-sizing: border-box;
  pointer-events: auto;
  overflow: hidden;
}

/* Skill icon */
.skill-icon {
  width: 36px; /* Fixed size for consistency */
  height: 36px; /* Fixed size for consistency */
  object-fit: contain;
  pointer-events: none;
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-section {
  animation: fadeIn 0.3s ease-out forwards;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Movement-related text */
.movement-term {
  color: #685f91;
}

/* Clear Corpse text */
.clear-corpse {
  color: #ff0000;
}

/* Execution text */
.execution-text {
  color: #ff0000;
  font-weight: bold;
}

/* Make Target and Self bold in skill descriptions */
.skill-desc strong,
.skill-tooltip strong,
.custom-tooltip strong,
.tooltip-content strong,
.tooltip-desc strong {
  font-weight: bold !important;
  color: #e6c15c; /* Light gold color for better visibility */
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.7);
}
