/* Star Savior Tier-Liste */

.custom-tier-list-bsr {
  width: 100%;
  margin-top: 30px;
}

/* Zeilen der Tier-Liste */
.tier-row-bsr {
  display: flex;
  margin-bottom: 12px;
  background: #141417;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid #2a2a30;
}

/* Tier-Label links */
.tier-label-bsr {
  min-width: 50px;
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.3rem;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  padding: 10px 8px;
  position: relative;
}

.tier-label-bsr.tier-t0 {
  background: #d32f2f;
}
.tier-label-bsr.tier-ss {
  background: #ec6563;
}
.tier-label-bsr.tier-s {
  background: #ff7f7f;
}
.tier-label-bsr.tier-a {
  background: #f9a2a2;
}
.tier-label-bsr.tier-b {
  background: #ffbf7f;
}
.tier-label-bsr.tier-c {
  background: #ffff7f;
}
.tier-label-bsr.tier-d {
  background: linear-gradient(135deg, #bfff7f 0%, #81c784 100%);
}

/* Spalten für Rollen */
.tier-roles-container {
  display: flex;
  flex: 1;
  min-height: 45px;
}

/* Kopfzeile: anderes Hintergrund für Rollen-Container */
.tier-roles-container-header {
  background-color: #2a2a30;
}

/* Einzelne Rollen-Spalte */
.role-column-bsr {
  flex: 1;
  padding: 8px 6px;
  border-left: 1px solid #2a2a30;
  display: flex;
  flex-direction: column;
}

/* Desktop: Inhalt der Kopfzeile mittig vertikal */
.tier-header-row .role-column-bsr {
  justify-content: center;
  align-items: center;
  padding: 10px 6px;
  border-bottom: 12px solid #23232a;
  border-left: 2px solid #23232a;
}

/* Rollen-Überschrift */
.role-header-bsr {
  font-size: 0.75rem;
  color: #ccc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding: 6px 0;
  font-weight: 600;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  
}

.role-header-icon {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;
}

/* Desktop: Kopfzeile ohne Hintergrund, größerer Text, zentriert */
.tier-header-row .role-header-bsr {
  background: transparent;
  font-size: 1rem;
  margin-bottom: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  
}

.tier-header-row .role-header-icon {
 
}

/* Farben für Rollen in der Kopfzeile */
.tier-header-row .role-header-star {
  color: #4caf50;
}
.tier-header-row .role-header-moon {
  color: #2196f3;
}
.tier-header-row .role-header-order {
  color: #ff9800;
}
.tier-header-row .role-header-sun {
  color: #f44336;
}
.tier-header-row .role-header-chaos {
  color: #9c27b0;
}

/* Kopfzeile: Kategorien nur einmal oben auf Desktop */
.tier-header-row {
  display: flex;
}

/* Unsichtbares Tier-Label für Ausrichtung */
.tier-header-label-invisible {
  visibility: hidden;
  border: 0px;
  background-color: #23232a;
}

/* Rollen-Überschriften in Zeilen auf Desktop ausblenden */
.tier-row-bsr:not(.tier-header-row) .role-header-bsr {
  display: none;
}

/* Charakter-Grid in Rollen-Spalte */
.role-characters-bsr {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: flex-start;
}

.char-card-bsr {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100px;
  cursor: pointer;
  transition: transform 0.2s;
  text-decoration: none;
  padding: 2px;
  overflow: visible;
}

.char-card-bsr:hover {
  transform: translateY(-4px);
}

/* Info tag: small icon top-right, tooltip on hover */
.char-card-info-tag {
  position: absolute;
  top: 2px;
  right: 12px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #b0b0b0;
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  z-index: 10;
  line-height: 1;
  pointer-events: auto;
}

.char-card-info-tag:hover {
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
}

/* Custom tooltip – zeigt sofort beim Hover (ohne Klick) */
.char-card-info-tag::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  font-size: 11px;
  font-weight: normal;
  max-width: 220px;
  white-space: normal;
  text-align: center;
  border-radius: 4px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.char-card-info-tag:hover::after {
  opacity: 1;
  visibility: visible;
}

.char-avatar-bsr {
  width: 80px !important;
  height: 80px !important;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.char-avatar-bsr img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hintergrundfarben nach Seltenheit (wie Charakter-Liste) */
.char-avatar-bsr.rarity-UR {
  background: linear-gradient(160deg, #5a2d2d 0%, #ff6b6b 65%);
}
.char-avatar-bsr.rarity-SSR {
  background: linear-gradient(160deg, #6e4c42 0%, #e0c870 65%);
}
.char-avatar-bsr.rarity-SR {
  background: linear-gradient(160deg, #2d2f4d 0%, #7a5af8 65%);
}
/* Star Savior: Character-SR und Character-SSR */
.char-avatar-bsr.Character-SSR {
  background: linear-gradient(160deg, #6e4c42 0%, #e0c870 65%);
}
.char-avatar-bsr.Character-SR {
  background: linear-gradient(160deg, #2d2f4d 0%, #7a5af8 65%);
}
/* Star Sailors Abenteurer Tier 1 (Grau wie bei Charakter-Karten) */
.char-avatar-bsr.Character-TIER-1 {
  background: linear-gradient(160deg, #2d2d2d 0%, #6b7280 65%);
}

/* Charaktername */
.char-name-bsr {
  margin-top: 6px;
  font-size: 0.75rem;
  color: #ccc;
  text-align: center;
  line-height: 1.2;
  max-width: 95px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Element-Badge */
.element-badge-bsr {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 35px;
  height: 35px;
  overflow: hidden;
  z-index: 2;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

.element-badge-bsr img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.empty-role {
  color: #444;
  font-size: 0.75rem;
  font-style: italic;
  text-align: center;
  padding: 20px 0;
}

/* Anpassung für Mobilgeräte */
@media (max-width: 768px) {
  /* Kopfzeile auf Mobil ausblenden */
  .tier-header-row {
    display: none;
  }

  /* Rollen-Überschriften in jeder Spalte auf Mobil anzeigen */
  .tier-row-bsr:not(.tier-header-row) .role-header-bsr {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .tier-row-bsr {
    flex-direction: column;
  }

  .tier-label-bsr {
    min-width: 100%;
    width: 100%;
    padding: 8px;
    font-size: 1.1rem;
  }

  .tier-roles-container {
    flex-direction: column;
  }

  .role-column-bsr {
    border-left: none;
    border-top: 1px solid #2a2a30;
    padding: 10px;
  }

  .role-header-bsr {
    font-size: 0.8rem;
    margin-bottom: 6px;
    padding: 5px 0;
    align-items: center;
    justify-content: center;
    display: flex;
  }

  .role-header-icon {
    width: 32px;
    height: 32px;
  }

  .char-card-bsr {
    width: 80px;
    min-width: 80px;
  }

  .char-avatar-bsr {
    width: 70px;
    height: 70px;
  }

  .char-name-bsr {
    font-size: 0.7rem;
    max-width: 75px;
  }

  .element-badge-bsr {
    width: 16px !important;
    height: 16px !important;
  }

  /* Character card links (anchor wrappers) auf Mobil sichtbar */
  .role-characters-bsr {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
  }

  .role-characters-bsr > a {
    display: block !important;
    visibility: visible !important;
    flex-shrink: 0;
  }
}

/* Zuletzt aktualisiert */
.last-updated {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 20px;
}

/* Tier-Beschreibung */
.tier-description {
  background: #2c2d35;
  border: 1px solid #32323e;
  border-radius: 2px;
  padding: 20px;
  margin-bottom: 25px;
}

.tier-description-subtitle {
  color: #bbb;
  font-size: 1.2rem;
  margin: 0 0 15px 0;
  text-align: center;
}

.tier-description h3 {
 
  margin-bottom: 15px;
  font-size: 1.4rem;
}

.tier-description ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tier-description li {
  margin-bottom: 8px;
  font-size: 1.2rem;

  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.tier-badge {
  display: inline-block;
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.75rem;
  text-align: center;
  color: white;
}

.tier-badge.t0 { background: #d32f2f; }
.tier-badge.ss { background: #ec6563; }
.tier-badge.s { background: #ff7f7f; }
.tier-badge.a { background: #f9a2a2; }
.tier-badge.b { background: #ffbf7f; }
.tier-badge.c { background: #ffff7f; }

/* TBR (To Be Reviewed) – Label und Ausgrauung (grauer) */
#starsailors-tier-battle ~ .custom-tier-list-bsr .char-tbr,
#starsailors-tier-assist ~ .custom-tier-list-bsr .char-tbr,
.custom-tier-list-bsr .char-tbr {
  opacity: 0.4;
  transition: opacity 0.2s ease;
}
#starsailors-tier-battle ~ .custom-tier-list-bsr .char-tbr:hover,
#starsailors-tier-assist ~ .custom-tier-list-bsr .char-tbr:hover,
.custom-tier-list-bsr .char-tbr:hover {
  opacity: 0.75;
}
.char-card-bsr {
  position: relative;
}
.char-card-bsr .char-tbr-label {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #fbbf24;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 2px;
  letter-spacing: 0.5px;
  z-index: 2;
}

.char-card-bsr .char-new-label {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #22c55e;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 2px;
  letter-spacing: 0.5px;
  z-index: 2;
}


