* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  font-family: "Segoe UI", sans-serif;
  color: white;
  background:
    radial-gradient(circle at top right, rgba(91, 75, 255, 0.35), transparent 35%),
    radial-gradient(circle at bottom left, rgba(0, 174, 255, 0.2), transparent 35%),
    linear-gradient(180deg, #020712, #050b1f 45%, #02040d);
  overflow-x: hidden;
}

/* étoiles */
.stars {
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient white 1px, transparent 1px;
  background-size: 80px 80px;
  opacity: 0.16;
  animation: moveStars 40s linear infinite;
  pointer-events: none;
}

@keyframes moveStars {
  from { transform: translateY(0); }
  to { transform: translateY(-300px); }
}

/* grande carte constellation */
.orbital-map {
  position: fixed;
  width: 650px;
  height: 650px;
  border: 1px solid rgba(140, 180, 255, 0.12);
  border-radius: 50%;
  top: 110px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.35;
  pointer-events: none;
  animation: rotateMap 120s linear infinite;
}

.orbital-map::before,
.orbital-map::after {
  content: "";
  position: absolute;
  inset: 90px;
  border: 1px solid rgba(140, 180, 255, 0.12);
  border-radius: 50%;
}

.orbital-map::after {
  inset: 190px;
}

@keyframes rotateMap {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg); }
}

/* navbar */
.topbar {
  position: relative;
  z-index: 10;
  width: calc(100% - 50px);
  margin: 25px auto 0;
  padding: 22px 38px;
  border: 1px solid rgba(216, 190, 130, 0.55);
  border-radius: 18px;
  background: rgba(4, 10, 28, 0.72);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  gap: 12px;
  align-items: center;
}

.logo-icon {
  color: #f4d78d;
  font-size: 32px;
  text-shadow: 0 0 15px #8cbcff;
}

.logo h1 {
  font-size: 20px;
  letter-spacing: 3px;
  color: #f7df9e;
}

.logo p {
  font-size: 11px;
  letter-spacing: 5px;
  opacity: 0.75;
}

nav {
  display: flex;
  gap: 35px;
}

nav a {
  color: #dce7ff;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 1px;
  opacity: 0.8;
  transition: 0.25s;
}

nav a:hover,
nav a.active {
  color: #ffffff;
  opacity: 1;
  text-shadow: 0 0 15px #83aaff;
}

nav a.active {
  border-bottom: 1px solid #f4d78d;
  padding-bottom: 8px;
}

/* hero */
.hero {
  position: relative;
  z-index: 5;
  overflow: hidden;

  min-height: 430px;
  width: calc(100% - 50px);
  margin: 30px auto 20px;

  border: 1px solid rgba(216, 190, 130, 0.45);
  border-radius: 20px;

  background:
    radial-gradient(circle at 50% 0%, rgba(120,150,255,.28), transparent 45%),
    radial-gradient(circle at 15% 85%, rgba(40,210,255,.18), transparent 35%),
    linear-gradient(135deg, #08101f, #040814 55%, #05091b);

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.hero-bg{
    position:absolute;
    inset:0;

    background:url("hsr_back.png") no-repeat;

    background-size:cover;
    background-position:left center;

    opacity:.22;

    z-index:0;

    transition:.4s;
}
.hero-overlay{

    position:absolute;
    inset:0;

    background:
    linear-gradient(
        90deg,
        rgba(2,8,18,.35),
        rgba(2,6,20,.72) 35%,
        rgba(2,5,18,.92) 100%);

    z-index:1;

}
.hero-logo,
.hero-subtitle,
.hero-text,
.hero-line{

    position:relative;
    z-index:2;

}
.hero-subtitle{

    display:flex;

    align-items:center;

    gap:18px;

    margin-top:10px;

    margin-bottom:35px;

}
.hero-subtitle span{

    width:90px;
    height:1px;

    background:#D8B45A;

    opacity:.6;

}
.hero-subtitle p{

    color:#E8C971;

    letter-spacing:7px;

    font-size:14px;

}
.hero-logo{

    width:720px;

    max-width:90%;

    margin-bottom:15px;

    filter:

    drop-shadow(0 0 18px rgba(180,210,255,.35))
    drop-shadow(0 0 60px rgba(120,170,255,.30));

    animation:logoIntro 1.8s ease;

}
.hero{

    position:relative;

    overflow:hidden;

    min-height:520px;

    width:calc(100% - 50px);

    margin:30px auto;

    border:1px solid rgba(214,183,112,.35);

    border-radius:22px;

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    text-align:center;

    background:

    linear-gradient(
    135deg,
    #071120,
    #050915 60%,
    #050915);

}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, transparent 0%, rgba(255,255,255,0.06) 48%, transparent 52%);
  animation: scan 7s infinite;
}

@keyframes scan {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.train {
  position: absolute;
  left: 7%;
  bottom: 70px;
  width: 230px;
  height: 70px;
  border-radius: 50px 12px 12px 50px;
  background: linear-gradient(90deg, #0f1c40, #253d7a);
  border: 1px solid rgba(180, 210, 255, 0.45);
  box-shadow: 0 0 35px rgba(92, 135, 255, 0.45);
  transform: rotate(-12deg);
}

.train::before {
  content: "";
  position: absolute;
  right: -16px;
  top: 22px;
  width: 32px;
  height: 26px;
  border-radius: 50%;
  background: #dcecff;
  box-shadow: 0 0 30px #7da7ff;
}

.small-title {
  color: #f4d78d;
  letter-spacing: 5px;
  font-size: 14px;
  margin-bottom: 18px;
}

.hero h2 {
  font-family: Georgia, serif;
  font-size: clamp(58px, 8vw, 110px);
  line-height: 0.88;
  letter-spacing: 8px;
  color: #f7fbff;
  text-shadow:
    0 0 18px rgba(130, 170, 255, 0.8),
    0 0 45px rgba(70, 100, 255, 0.45);
}

.hero h2 span {
  font-size: 1.1em;
}

.hero-text {
  margin-top: 28px;
  max-width: 520px;
  color: #c7d6ff;
  line-height: 1.7;
}

/* guide directory */
.hsr-directory {
  position: relative;
  z-index: 5;
  width: calc(100% - 70px);
  margin: 25px auto 0;
  padding: 22px;
  border: 1px solid rgba(202, 213, 239, .36);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(15, 18, 27, .97), rgba(5, 8, 15, .98));
  box-shadow: 0 0 30px rgba(50, 83, 195, .1), inset 0 0 32px rgba(255, 255, 255, .025);
}

.directory-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.directory-heading h2 { color: #eef3ff; font-size: 26px; }
.directory-heading > p { color: #8094ce; font-size: 13px; }

.hsr-menu-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(218, 225, 240, .22);
  border-radius: 12px;
  background: rgba(0, 0, 0, .42);
}

nav.hsr-menu-grid .hsr-menu-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 108px;
  padding: 12px 7px 10px;
  border: 1px solid rgba(226, 231, 242, .18);
  border-radius: 3px;
  background: linear-gradient(145deg, rgba(30, 33, 41, .94), rgba(10, 12, 18, .96));
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  opacity: 1;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
nav.hsr-menu-grid .hsr-menu-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 25%, rgba(255, 255, 255, .06) 50%, transparent 75%);
  transform: translateX(-120%);
  transition: transform .35s ease;
}
nav.hsr-menu-grid .hsr-menu-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 245, 245, .72);
  background: linear-gradient(145deg, rgba(54, 57, 65, .96), rgba(18, 20, 27, .98));
  text-shadow: none;
}
nav.hsr-menu-grid .hsr-menu-card:hover::before { transform: translateX(120%); }
nav.hsr-menu-grid .hsr-menu-card.active {
  padding-bottom: 10px;
  border: 1px solid #f0d891;
  background: linear-gradient(145deg, rgba(67, 65, 59, .98), rgba(25, 25, 27, .98));
  box-shadow: inset 0 0 18px rgba(245, 213, 125, .08), 0 0 12px rgba(229, 211, 160, .1);
}
.menu-icon {
  display: block;
  width: 43px;
  height: 43px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .8));
}
.hsr-menu-card[href="#characters"] .menu-icon {
  width: 57px;
  height: 57px;
  margin: -7px 0;
}
.hsr-menu-card strong { color: #f2f2f0; font-size: 12px; line-height: 1.15; }
.hsr-menu-card small { display: none; }
.hsr-menu-card.endgame::after {
  content: "ENDGAME";
  position: absolute;
  top: 7px;
  right: 7px;
  color: #dfa9ff;
  font-size: 7px;
  letter-spacing: 1px;
}

/* panel */
.archive-panel {
  position: relative;
  z-index: 5;
  width: calc(100% - 70px);
  margin: 25px auto 70px;
  padding: 35px;
  border: 1px solid rgba(114, 150, 255, 0.55);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(5, 12, 32, 0.92), rgba(2, 6, 18, 0.96));
  box-shadow:
    0 0 35px rgba(75, 105, 255, 0.18),
    inset 0 0 45px rgba(73, 104, 255, 0.08);
}

/* filtres */
.filters {
  border-bottom: 1px solid rgba(130, 160, 255, 0.22);
  padding-bottom: 25px;
  margin-bottom: 32px;
}

.filter-line {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.filter-line h3 {
  width: 95px;
  color: #f4d78d;
  font-size: 13px;
  letter-spacing: 2px;
}

button {
  cursor: pointer;
  border: 1px solid rgba(120, 150, 255, 0.35);
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(10, 20, 48, 0.8);
  color: #dce7ff;
  font-size: 12px;
  letter-spacing: 1px;
  transition: 0.25s;
}

button:hover,
button.selected {
  color: white;
  border-color: #cbd8ff;
  box-shadow:
    0 0 16px rgba(110, 145, 255, 0.45),
    inset 0 0 14px rgba(110, 145, 255, 0.16);
}

/* titre archive */
.archive-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.section-kicker {
  color: #8aa6ff;
  font-size: 12px;
  letter-spacing: 3px;
  margin-bottom: 6px;
}

.archive-head h2 {
  color: #dfe8ff;
  font-family: Georgia, serif;
  font-size: 32px;
  letter-spacing: 2px;
  text-shadow: 0 0 18px rgba(116, 148, 255, 0.5);
}

.archive-head input {
  width: 250px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid rgba(130, 160, 255, 0.35);
  outline: none;
  background: rgba(5, 12, 32, 0.85);
  color: white;
}

/* cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 15px;
}

.character-card {
  position: relative;
  min-height: 286px;
  padding: 13px;
  border-radius: 16px;
  border: 1px solid rgba(135, 165, 255, 0.55);
  background:
    linear-gradient(180deg, rgba(11, 21, 52, 0.92), rgba(5, 10, 28, 0.95));
  box-shadow:
    0 0 25px rgba(70, 100, 255, 0.14),
    inset 0 0 25px rgba(100, 130, 255, 0.08);
  overflow: hidden;
  transition: 0.3s;
}

.character-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, transparent, rgba(255,255,255,0.07), transparent);
  transform: translateX(-120%);
  transition: 0.5s;
}

.character-card:hover::before {
  transform: translateX(120%);
}

.character-card:hover {
  transform: translateY(-8px);
  border-color: #e5edff;
  box-shadow:
    0 0 30px rgba(108, 142, 255, 0.45),
    inset 0 0 25px rgba(100, 130, 255, 0.12);
}

.card-symbol {
  color: #dce7ff;
  opacity: 0.8;
}

.card-image {
  height: 145px;
  margin: 10px 0 14px;
  border-radius: 14px;
}
.card-hitbox{position:absolute;z-index:5;inset:0;border-radius:inherit}

.card-image:not(.placeholder) {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  border: 0;
}

.card-image img {
  width: 145px;
  max-width: 100%;
  height: 145px;
  flex: 0 0 auto;
  object-fit: cover;
  object-position: center;
  border-radius: 13px;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .4));
  transition: transform .3s ease;
}

.character-card:hover .card-image img { transform: scale(1.06); }
.character-card.rarity-5 { border-color: rgba(236, 197, 111, .65); }
.character-card.rarity-4 { border-color: rgba(169, 127, 255, .55); }
.character-card.rarity-5 .card-rarity { color: #f7d477; }
.character-card.rarity-4 .card-rarity { color: #c9a3ff; }
.card-separator { display: inline; color: rgba(206, 218, 255, .45); letter-spacing: 0; }

.archive-search {
  display: flex;
  align-items: center;
  gap: 16px;
}

#hsr-count {
  color: #9fb1e8;
  font-size: 13px;
  white-space: nowrap;
}

.placeholder {
  background:
    radial-gradient(circle, rgba(110, 145, 255, 0.25), transparent 45%),
    linear-gradient(135deg, rgba(255,255,255,0.05), transparent);
  border: 1px solid rgba(130, 160, 255, 0.18);
  position: relative;
}

.placeholder::after {
  content: "✦";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 70px;
  color: rgba(160, 185, 255, 0.14);
}

.character-card h3 {
  text-align: center;
  color: #eef3ff;
  font-size: 16px;
  letter-spacing: 1px;
}

.character-card p {
  text-align: center;
  color: #9fb1e8;
  margin: 8px 0;
  font-size: 12px;
}

.character-card span {
  display: block;
  text-align: center;
  color: #f4d78d;
  letter-spacing: 2px;
}

/* responsive */
@media (min-width: 1800px) {
  .cards-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

@media (max-width: 1400px) {
  .cards-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .hsr-menu-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .cards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  nav {
    gap: 18px;
  }
}

@media (max-width: 800px) {
  .topbar {
    flex-direction: column;
    gap: 18px;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .train {
    opacity: 0.35;
  }

  .archive-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .archive-head input {
    width: 100%;
  }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hsr-menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .directory-heading { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 520px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .hero h2 {
    font-size: 52px;
  }

  .archive-panel,
  .hsr-directory,
  .hero,
  .topbar {
    width: calc(100% - 25px);
  }

  .archive-panel {
    padding: 22px;
  }

  .hsr-directory { padding: 20px 14px; }
}
.hero-logo {
  width: 770px;
  max-width: 90%;
  margin-bottom: 10px;
  filter:
    drop-shadow(0 0 25px rgba(170,210,255,.55))
    drop-shadow(0 0 60px rgba(110,150,255,.35));
  animation: logoIntro 2s ease-out;
}
@keyframes logoIntro{

    0%{
        transform:scale(.95);
        opacity:0;
    }

    100%{
        transform:scale(1);
        opacity:1;
    }

}
.small-title{

    letter-spacing:7px;
    color:#f0d88b;

    margin-top:5px;
    margin-bottom:18px;

}
.hero-text{

    width:600px;
    max-width:90%;

    font-size:18px;

    line-height:1.8;

    color:#D8E6FF;

}
.hero-line{

    width:220px;
    height:2px;

    margin-top:40px;

    background:linear-gradient(
    90deg,
    transparent,
    #8bbcff,
    transparent);

    box-shadow:0 0 18px #7faeff;

    animation:pulseLine 2.8s infinite;

}
@keyframes pulseLine{

    0%{

        opacity:.35;
        width:160px;

    }

    50%{

        opacity:1;
        width:240px;

    }

    100%{

        opacity:.35;
        width:160px;

    }

}
.hero-logo {
  width: 700px;
  max-width: 90%;
  margin-bottom: 10px;

  mix-blend-mode: screen;

  filter:
    drop-shadow(0 0 25px rgba(170,210,255,.55))
    drop-shadow(0 0 60px rgba(110,150,255,.35));

  animation: logoIntro 2s ease-out;
}
