:root {
  --element-pyro: #ff5722;
  --element-hydro: #3b91e0;
  --element-anemo: #48c9b0;
  --element-electro: #9575cd;
  --element-dendro: #4caf50;
  --element-cryo: #8cd9f7;
  --element-geo: #fbc02d;
  --border-radius: 12px;
}

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

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  min-height: 100vh;
  transition: all 0.3s ease;
}

.copyable-username {
  cursor: pointer;
  color: #5865F2; /* Discord brand color */
  text-decoration: underline;
}

.copyable-username:hover {
  opacity: 0.8;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* Header styles (updated to match header.css) */
header {
  background: var(--bg-header);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  margin: 20px auto 0; /* Top matches container, bottom margin removed */
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  box-shadow: var(--shadow);
  border: var(--border);
  color: var(--text-light);
  max-width: calc(1400px - 40px);
  width: calc(100% - 40px);
  padding: 20px 30px 25px; /* Adjusted bottom padding to match info-panel */
}


.logo {
  font-size: 28px;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 30px;
}

.server-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 14px;
  color: var(--text-light);
}

.reset-countdown {
  font-weight: 600;
  color: white;
}

.theme-toggle-container {
  display: flex;
  align-items: center;
}

.theme-toggle {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
}

.theme-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--accent-dark);
  transition: .4s;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-dark);
}

input:checked + .slider:before {
  transform: translateX(30px);
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.info-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
  border: var(--border);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}

.info-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--element-dendro), var(--accent-color));
}

.info-panel p {
  padding-left: 15px;
}

/* Banners section */
.banners {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.banner {
  height: 200px;
  border-radius: var(--border-radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-end;
}

.banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.character-banner {
  background: url('https://example.com/character-banner.jpg') center/cover;
}

.character-banner:nth-child(2) {
  background: url('https://example.com/character-banner-2.jpg') center/cover;
}

.weapon-banner {
  background: url('https://example.com/weapon-banner.jpg') center/cover;
}

.banner-content {
  padding: 20px;
  position: relative;
  z-index: 1;
  color: white;
  width: 100%;
}

.banner-content h3 {
  font-size: 24px;
  margin-bottom: 5px;
}

.banner-content p {
  font-size: 16px;
  opacity: 0.9;
}

/* Redeem codes section */
.redeem-codes {
  background: var(--bg-panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
  border: var(--border);
}

.refresh-codes {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.refresh-codes:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.codes-container {
  margin: 20px 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

.code-item {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.code-item code {
  font-family: monospace;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.copy-code {
  background: transparent;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  padding: 5px 10px;
  border-radius: 15px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.copy-code:hover {
  background: var(--accent-color);
  color: white;
}

.codes-footer {
  text-align: right;
}

.redeem-link {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s ease;
}

.redeem-link:hover {
  color: var(--accent-dark);
}

/* FAQ Section */
.faq-section {
  margin-top: 30px;
}

.faq-container {
  margin-top: 20px;
}

.faq-item {
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  cursor: pointer;
}

.faq-question h4 {
  font-size: 16px;
  font-weight: 500;
}

.faq-question i {
  transition: transform 0.3s ease;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 15px;
}

.faq-answer p {
  padding-bottom: 15px;
  font-size: 14px;
  line-height: 1.6;
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

.faq-item.active .faq-answer {
  max-height: 200px;
}

.discord-link {
  position: relative;
  display: inline-block;
  color: var(--accent-color);
  font-weight: 500;
  border-bottom: 1px dotted var(--accent-color);
  transition: all 0.2s ease;
  text-decoration: none;
}

.tooltip {
  position: relative;
  display: inline-block;
  color: var(--accent-color);
  font-weight: 500;
  cursor: help;
  border-bottom: 1px dotted var(--accent-color);
  transition: all 0.2s ease;
}

.tooltip:hover {
  color: var(--accent-dark);
  border-bottom-color: transparent;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 180px;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  text-align: center;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 14px;
  font-weight: normal;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: var(--border);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--bg-secondary) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.panel {
  background: var(--bg-panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--shadow);
  border: var(--border);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.section-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
  padding-left: 15px;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent-color);
  border-radius: 2px;
}

.tabs {
  display: flex;
  background: var(--bg-secondary);
  border-radius: 30px;
  padding: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.tab {
  padding: 8px 20px;
  cursor: pointer;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.tab.active {
  background: var(--accent-color);
  color: white;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); /* Slightly wider */
  gap: 20px;
  row-gap: 25px; /* More vertical space between rows */
  margin-bottom: 30px;
}

.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s ease;
  position: relative;
  min-height: 90px; /* Give more vertical space */
  justify-content: flex-start; /* Align content to top */
}

.icon-item:hover {
  transform: translateY(-5px);
}

.icon-img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg-secondary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  background: var(--bg-secondary);
}

.icon-item:hover .icon-img {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--accent-color);
}

.icon-name {
  font-size: 13px;
  text-align: center;
  margin-top: 8px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: normal; /* Allow wrapping */
  overflow: visible; /* Show all content */
  word-break: keep-all; /* Prevent breaking within words */
  hyphens: none; /* Disable automatic hyphenation */
  max-width: 100%;
  padding: 0 5px;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  align-items: center;
}


.detail-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 25px;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  border: var(--border);
  display: none;
}

.detail-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.detail-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-right: 20px;
  border: 3px solid var(--bg-secondary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.detail-title {
  font-size: 24px;
  font-weight: 600;
  white-space: normal;
  word-wrap: break-word;
}

.element-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
  margin-left: 12px;
  color: white;
  font-weight: 500;
  text-transform: capitalize;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.detail-card {
  background: var(--bg-secondary);
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.detail-card:hover {
  transform: translateY(-3px);
}

.detail-card-title {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-btn {
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--bg-secondary);
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.filter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.filter-btn.active {
  background: var(--accent-color);
  color: white;
  box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

/* New styles for filters and tables */
#today-character-filters{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
    
#today-weapon-filters {
  display: none;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.character-table-container,
.weapon-table-container {
  width: 100%;
}

.character-table,
.weapon-table {
  display: flex;
  gap: 20px;
  width: 100%;
}

.character-column,
.weapon-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.table-item {
  display: flex;
  align-items: flex-start; /* Better alignment for multi-line names */
  padding: 10px;
  background: var(--bg-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 10px;
  min-width: 0; /* Allow text truncation to work */
    min-height: 60px; /* Ensure enough vertical space */
}

.table-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.table-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.table-name {
  flex: 1;
  font-weight: 500;
  white-space: normal;
  overflow: visible;
  word-break: keep-all;
  hyphens: none;
  line-height: 1.2;
}

.table-rarity {
  color: #ffd700;
  font-size: 14px;
}

.detail-rarity {
  color: #ffd700;
  font-size: 18px;
  margin-left: 10px;
}

.show-all-btn {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  margin-top: 20px;
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  transition: all 0.3s ease;
}

.show-all-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

/* Region Selector Styles */
.region-selector {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 1000;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 15px;
}

.region-main-btn {
  width: 60px;
  height: 60px;
  background: var(--accent-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  position: relative;
  border: 2px solid var(--accent-dark);
  padding: 0;
}

.region-main-btn:hover {
  transform: scale(1.1);
  background: var(--accent-dark);
}

.region-icon-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  overflow: hidden;
  padding: 10%;
}

.region-icon-img {
  width: 125%;
  height: 125%;
  object-fit: contain;
  transition: all 0.3s ease;
}

.region-label {
  position: absolute;
  right: 70px;
  white-space: nowrap;
  background: var(--bg-secondary);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: var(--border);
}

.region-main-btn:hover .region-label,
.region-selector.active .region-main-btn .region-label {
  opacity: 1;
  right: 75px;
}

.region-icons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.3s ease;
  max-height: 0;
}

.region-selector.active .region-icons {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
  max-height: 500px;
}

.region-icon {
  width: 50px;
  height: 50px;
  background: var(--bg-panel);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  border: 2px solid var(--bg-secondary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  padding: 0;
  text-decoration: none;
}

.region-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.region-icon.selected {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-color);
}

.region-icon.selected::after {
  content: "✓";
  position: absolute;
  bottom: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  background: var(--accent-color);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 10px;
  border: 2px solid var(--bg-panel);
}

/* Element-specific colors */
.region-icon[data-region="mondstadt"]:hover {
  border-color: var(--element-anemo);
}
.region-icon[data-region="liyue"]:hover {
  border-color: var(--element-geo);
}
.region-icon[data-region="inazuma"]:hover {
  border-color: var(--element-electro);
}
.region-icon[data-region="sumeru"]:hover {
  border-color: var(--element-dendro);
}
.region-icon[data-region="fontaine"]:hover {
  border-color: var(--element-hydro);
}
.region-icon[data-region="natlan"]:hover {
  border-color: var(--element-pyro);
}
.region-icon[data-region="snezhnaya"]:hover {
  border-color: var(--element-cryo);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .region-selector {
    right: 20px;
    bottom: 20px;
  }
  
  .region-main-btn {
    width: 50px;
    height: 50px;
  }
  
  .region-icon {
    width: 40px;
    height: 40px;
  }
  
  .region-label {
    font-size: 12px;
    padding: 4px 12px;
    right: 60px;
  }
  
  .region-main-btn:hover .region-label,
  .region-selector.active .region-main-btn .region-label {
    right: 65px;
  }
  
  .region-icon.selected::after {
    width: 15px;
    height: 15px;
    font-size: 8px;
  }
}

@media (max-width: 768px) {
  .character-table,
  .weapon-table {
    flex-direction: column;
  }
  
  .character-column,
  .weapon-column {
    width: 100%;
  }
}

/* Footer styles */
.site-footer {
  background: var(--bg-header);
  color: var(--text-light);
  padding: 40px 0 20px;
  width: 100%;
  margin-top: 50px;
  border-top: var(--border);
}

.site-footer .container {
  display: flex;
  flex-direction: column;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer-description {
  margin-bottom: 20px;
}

.footer-section {
  margin-bottom: 20px;
}

.footer-section h4 {
  font-size: 18px;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 10px;
}

.footer-section h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 2px;
  background: var(--accent-color);
}

.footer-section p {
  font-size: 14px;
  opacity: 0.8;
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul li a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 14px;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.footer-section ul li a:hover {
  opacity: 1;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  font-size: 12px;
  opacity: 0.6;
  margin-bottom: 5px;
}

@media (max-width: 1024px) {
  .icon-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 15px;
  }
  
  .banners {
    grid-template-columns: 1fr 1fr;
  }
  
  .icon-img {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 768px) {
  .banners {
    grid-template-columns: 1fr;
  }
  
  header {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 20px; /* Adjusted for tablet */
  }
  
  .header-right {
    width: 100%;
    justify-content: space-between;
  }
  
  .server-info {
    align-items: flex-start;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .tabs {
    width: 100%;
  }
  
  .icon-grid {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 12px;
  }
  
  .detail-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  header {
    margin: 15px auto 0;
    max-width: calc(100% - 30px);
    width: calc(100% - 30px);
    padding: 15px 15px 20px; /* Matches mobile info-panel spacing */
  }
  
  .container {
    padding: 15px;
  }
  
  .panel {
    padding: 20px 15px;
  }
  
  .icon-grid {
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 10px;
  }
  
  .icon-img {
    width: 50px;
    height: 50px;
  }
  
  .icon-name {
    font-size: 11px;
  }
}