/* ===== CODES (shared) ===== */

/* Section wrapper (used e.g. on Haikyu index) */
.codes-section {
  margin-top: 30px;
  margin-bottom: 30px;
  padding: 0 10px;
}

/* Optional header wrapper (used on 7k + Bleach) */
.codes-link {
  width: 100%;
}

.codes-link h2,
.codes-section .codes-title {
  color: rgb(230, 230, 230);
  margin: 0 0 20px 0;
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  font-family: "Bricolage Grotesque", sans-serif;
}

/* Container that often wraps the list */
.codes-preview {

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  margin: 0;
}

/* Shared grid list */
.code-list-compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 180px));
  gap: 0.8rem;
  margin: 0;
  flex: 1;
  justify-content: center;
  align-content: start;
}

/* Shared card */
.code-box-compact {
  background-color: #1A1A1D;
  border: 1px solid #1A1A1D;
  border-bottom: 2px solid #7a5af8; /* fallback */
  border-bottom-color: rgba(122, 90, 248, 0.63);
  border-radius: 2px;
  padding: 0.8rem;
  min-width: 150px;
  max-width: 180px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}



/* Highlight variant (replaces inline "NEW" styling) */
.code-box-compact.is-new {
  background-color: rgba(122, 90, 248, 0.63);
  border-bottom-color: #ffffff;
}

.code-key {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  margin-bottom: 0.5rem;
  font-family: "Bricolage Grotesque", sans-serif;
  position: relative;
  z-index: 2;
}

.code-reward {
  font-size: 0.95rem;
  color: #ddd;
  text-align: center;
}

.code-date {
  font-size: 0.85rem;
  font-style: italic;
  color: #bbb;
  text-align: center;
  margin-top: 0.5rem;
  font-family: "Bricolage Grotesque", sans-serif;
  position: relative;
  z-index: 2;
}

/* Mobile codes section - hidden on desktop */
.mobile-codes-section {
  display: none;
}

/* Desktop: show normal codes section */
.codes-section {
  display: block;
}

/* Mobile collapsible (default hidden on desktop) */
.mobile-codes-toggle-btn {
  display: none;
}

.mobile-codes-content {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-codes-content.expanded {
  display: block;
  opacity: 1;
}

.mobile-codes-toggle-icon {
  transition: transform 0.3s ease;
}

.mobile-codes-toggle-icon.rotated {
  transform: rotate(180deg);
}

@media (max-width: 768px) {
  /* Mobile: Hide normal codes-section */
  .codes-section {
    display: none !important;
  }

  /* Mobile: Show mobile-codes-section */
  .mobile-codes-section {
    display: block !important;
    margin-top: 30px;
    padding: 0 10px;
  }

  .mobile-codes-toggle-btn {
    display: flex !important;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(122, 90, 248, 0.63);
    color: #ffffff;
    border: 0;
    padding: 12px 14px;
    border-radius: 2px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  }

  .mobile-codes-toggle-btn:hover {
    background: rgba(90, 78, 168, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(122, 90, 248, 0.35);
  }

  .mobile-codes-content {
    margin-bottom: 10px;
  }

  .codes-preview {
    padding: 10px;
    margin-top: 0;
  }

  .codes-link h2,
  .codes-section .codes-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
  }

  .code-list-compact {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    justify-items: center;
  }

  .code-box-compact {
    padding: 0.6rem;
    width: 100%;
    max-width: 160px;
    min-width: 0;
  }

  .code-key {
    font-size: 0.9rem;
  }

  .code-date {
    font-size: 0.7rem;
  }
}


