.search-bar {
    display: flex;
    align-items: center;
    background: var(--zzz-bg-dark);
    border-radius: 25px;
    border: 2px solid var(--zzz-border);
    padding: 4px 14px;
    margin-left: 30px;
}

.search-bar input[type="text"] {
    background: transparent;
    border: none;
    color: var(--zzz-grey);
    outline: none;
    font-size: 1em;
    padding: 7px 10px;
    width: 100%;
}

.search-bar button {
    background: none;
    border: none;
    color: var(--zzz-orange);
    font-size: 1.2em;
    cursor: pointer;
    padding: 0 5px;
}



@font-face {
  font-family: 'yinpin';
  src: url('font/yinpin.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.main-container {
  display: flex;
  flex-direction: row;
  gap: 36px;
  padding: 40px 5%;
}

.content-layout {
  display: flex;
  flex-direction: row;
  width: 100%;
}

.filters-panel {
  font-family: "Orbitron", sans-serif;;
  background: var(--zzz-bg-dark);
  border-radius: 18px;
  padding: 28px 18px;
  min-width: 220px;
  box-shadow: var(--zzz-shadow);
  border: 1.5px solid var(--zzz-card);
  margin-right: 34px;
  height: fit-content;
}

.filters-panel h3 {
  color: var(--zzz-orange);
  font-size: 1.2em;
  margin-bottom: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.filter-group {
  margin-bottom: 20px;
}

.filter-title {
  color: #FF8C00;;
  font-size: 0.9em;
  margin-bottom: 7px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
}

.filters-panel label {
  display: block;
  margin-bottom: 6px;
  color: var(--zzz-grey);
  font-size: 0.98em;
  cursor: pointer;
  padding-left: 2px;
}

.gallery-section,
.gallery-section * {
  font-family: 'yinpin', 'Orbitron', sans-serif !important;
}

h3 {
  margin: 0;
}

.gallery-section {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section-title {
  margin: 0;
  font-size: 2em;
  font-weight: 700;
  color: var(--zzz-orange);
}

.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 16px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 26px;
  width: 100%;
}

.character-card {
  background: var(--zzz-card);
  border-radius: 22px;
  box-shadow: 0 6px 28px rgba(255,140,0,0.08);
  border: 2px solid var(--zzz-bg-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 18px 26px 18px; 
  transition: transform 0.13s, box-shadow 0.13s;
  position: relative;
  height: 100%;
  font-family: 'yinpin', sans-serif ;
}

.character-card:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 8px 36px rgba(255,140,0,0.14);
  border-color: var(--zzz-orange);
}

.character-img {
  width: 170px;
  height: 232px; 
  object-fit: cover;
  object-position: center top;
  border-radius: 22px;
  background: var(--zzz-bg-dark);
  margin-bottom: 18px;
  border: 2.5px solid var(--zzz-orange-light);
  box-shadow: 0 2px 12px rgba(255,140,0,0.10);
  aspect-ratio: 374/512;
  transition: box-shadow 0.18s, border-color 0.18s;
}

.card-content {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}


.card-title-row {
  font-size: 1.08em;
  font-weight: 700;
  color: var(--zzz-grey);
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.character-realname {
  color: var(--zzz-grey-light);
  font-size: 0.98em;
  font-weight: 400;
}

.card-meta {
  font-size: 0.96em;
  color: var(--zzz-grey-light);
  margin-top: 7px;
  text-align: center;
}

.view-more-btn {
  margin-top: auto;
  align-self: center;
  background: var(--zzz-orange);
  color: #232323;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  padding: 7px 18px;
}

.view-more-btn:hover{
  background: #ff9800;
  color: #fff;
  outline: none;
}


.meta-label {
  color: var(--zzz-orange-light);
  font-weight: 700;
  font-size: 0.93em;
}

.rank-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--zzz-orange);
  color: #fff;
  border-radius: 50%;
  font-size: 1em;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(255,140,0,0.15);
  border: 2px solid var(--zzz-bg);
}

.rank-s {
  background: #FEFA7A;
  color: #232323;
  border-color: #FEFA7A;
}

.rank-a {
  background: #F993FC;
  color: #232323;
  border-color: #F993FC;
}

.gallery-toolbar {
  display: flex;
  gap: 8px;
}

.view-toggle,
.sort-toggle,
.new-toggle {
  background: var(--zzz-bg-dark);
  color: var(--zzz-grey-light);
  border: none;
  border-radius: 8px;
  padding: 7px 18px;
  font-size: 1em;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: background 0.18s, color 0.18s;
  box-shadow: 0 2px 8px rgba(255,140,0,0.07);
}

.view-toggle.active,
.sort-toggle.active,
.new-toggle.active {
  background-color: var(--zzz-card);
  color: var(--zzz-orange);
}

.view-toggle .icon,
.sort-toggle .icon,
.new-toggle .icon {
  font-size: 1.1em;
}

.sort-toggle,
.new-toggle {
  margin-left: 16px;
  border: 1.5px solid var(--zzz-card);
  background-color: transparent;
  color: inherit;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}


.gallery-grid.list-view {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.gallery-grid.list-view .character-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  text-align: left;
  padding: 18px 24px;
  min-height: 140px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.gallery-grid.list-view .character-img {
  width: auto;
  height: 100%;
  aspect-ratio: 374/512;
  max-width: 130px;
  margin-right: 24px;
  margin-bottom: 0;
  border-radius: 14px;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.gallery-grid.list-view .card-content {
  text-align: left;
  padding-left: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  height: 100%;
}

.gallery-grid.list-view .card-title-row,
.gallery-grid.list-view .character-realname {
  width: 100%;
  text-align: center;
  align-self: center;
}

.gallery-grid.list-view .card-title-row {
  font-size: 1.15em;
  font-weight: 800;
  color: var(--zzz-grey);
  margin: 0;
  letter-spacing: 0.5px;
}

.gallery-grid.list-view .character-realname {
  font-size: 1em;
  font-weight: 500;
  color: var(--zzz-grey-light);
  margin: 0;
}

.gallery-grid.list-view .rank-badge {
  position: static;
  margin-right: 24px;
  margin-left: 0;
  align-self: flex-start;
}

.gallery-grid.list-view .card-meta {
  display: table;
  width: 100%;
  font-size: 0.99em;
  color: var(--zzz-grey-light);
  margin-top: 0;
  line-height: 1.4;
}
.gallery-grid.list-view .card-meta-row {
  display: table-row;
}
.gallery-grid.list-view .meta-label {
  display: table-cell;
  font-weight: 700;
  color: var(--zzz-orange-light);
  min-width: 110px;
  text-align: right;
  padding-right: 8px;
  vertical-align: top;
}
.gallery-grid.list-view .meta-value {
  display: table-cell;
  font-weight: 400;
  color: var(--zzz-grey-light);
  text-align: left;
  vertical-align: top;
  padding-bottom: 2px;
}

.banner-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 220px;
  margin-bottom: 30px;
  border-radius: 18px;
  overflow: hidden;
}

.banner-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.8;
}

.banner-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
  text-shadow: 0 0 10px rgba(0,0,0,0.7);
  padding: 0 10px; 
}

.banner-text h2 {
  margin: 0;
}

.banner-text .section-title {
  margin-top: 8px;
  font-size: 1.8em;
}

.back {
  width: 100%;
  display: flex;
  justify-content: flex-end; 
  margin-bottom: 30px;
  padding-right: 5%;
}

.btn-retour, .add_agent{
  padding: 15px;
  color: #ff9900;
  background-color: #121212;
  border: 4px solid #ff9900;
  border-radius: 10px;
  font-family: 'yinpin', sans-serif;
  font-size: 1rem;
  z-index: 101;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}
.btn-retour:hover, .add_agent:hover, #backToTopBtn:hover {
  background-color: #ff9900;
  color: #121212;
}

.details {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'yinpin', sans-serif ;
}

.details img {
  box-shadow: 0 8px 36px rgba(255,140,0,0.14);
  border-color: var(--zzz-orange);
  border: solid;
  color: var(--zzz-orange);
}

.add-character-section {
    max-width: 500px;
    margin: 40px auto;
    background: #232323;
    padding: 32px;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(255, 140, 0, 0.08);
}

.add-character-section h2 {
    text-align: center;
    color: var(--zzz-orange);
    font-family: 'yinpin', sans-serif;
    margin-bottom: 24px;
}

.success-message {
    color: limegreen;
    text-align: center;
    margin-bottom: 16px;
}

.error-message {
    color: red;
    text-align: center;
    margin-bottom: 16px;
}

.add-character-section label {
    display: block;
    font-weight: bold;
    color: #f0f0f0;
    margin-bottom: 8px;
}

.add-character-section input[type="text"],
.add-character-section select,
.add-character-section input[type="file"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #444;
    border-radius: 8px;
    background-color: #1e1e1e;
    color: #fff;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.add-character-section input[type="text"]:focus,
.add-character-section select:focus,
.add-character-section input[type="file"]:focus {
    border-color: var(--zzz-orange, orange);
    outline: none;
}

.add_agent {
    width: 100%;
    padding: 12px 0;
    background: var(--zzz-orange, orange);
    color: #232323;
    font-weight: bold;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin-top: 8px;
}

.add_agent:hover,
.add_agent:focus {
    background: #ff9800;
    color: #fff;
}

.add-character-section input[type="file"] {
    background-color: #232323;
    color: #fff;
    border: none;
    padding: 0;
    margin-bottom: 20px;
}
.add {
    width: 100%;
    padding: 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--zzz-bg-dark);
    border-radius: 25px;
    border: 2px solid var(--zzz-orange);
    font-family: 'yinpin', sans-serif;
    font-size: 1.5em;
    color: #ff6a00;
}

.add:hover, .add:focus {
  background: linear-gradient(90deg, orange 0%, #ff6a00 100%);
  border: #ff6a00;
  color: var(--zzz-bg-dark);
  box-shadow: 0 6px 20px 0 rgba(200, 139, 78, 0.25);
  outline: none;
}


#backToTopBtn {
  opacity: 0.45;
  position: fixed;
  bottom: 40px;
  right: 15px;
  z-index: 100;
  padding: 15px;
  border-radius: 8px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #ff9900;
  background-color: #121212;
  border: 4px solid #ff9900;
  transition: all 0.3s ease;
  text-decoration: none;
}

#backToTopBtn:hover {
  background-color: #ffa500;
  opacity: 1;
}


@media (max-width: 768px) {
    body {
        width: 100%;
    }

    main {
      font-size: 0.5em;
    }
}