/* HarryP Font */
@font-face {
  font-family: "HarryP";
  src: url("../fonts/HARRYP__.TTF") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  color: #e9ecf1;
  background: radial-gradient(
    1200px 800px at 10% -10%,
    #1a1f2e 0%,
    #0d0f14 55%
  );
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(20, 24, 35, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
}

.site-title {
  font-family: "HarryP", serif;
  font-size: 48px;
  color: #ffd166;
  text-align: center;
  padding: 18px 20px 8px;
  text-shadow: 0 3px 14px rgba(255, 209, 102, 0.3);
}

.site-nav {
  display: flex;
  justify-content: center;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 14px;
  padding: 0 20px 16px;
  flex-wrap: wrap;
}

.nav-link {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  color: #e9ecf1;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.16s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: rgba(138, 108, 255, 0.12);
  border-color: rgba(138, 108, 255, 0.5);
  transform: translateY(-1px);
  outline: none;
}

/* Main Layout */

.site-main {
  max-width: 1100px;
  margin: 28px auto;
  padding: 0 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-home,
.section-characters {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-title {
  font-family: "HarryP", serif;
  font-size: 35px;
  letter-spacing: 0.3px;
}

.section-home p {
  color: #b2b8c6;
}

/* Controls */
.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.control-label {
  opacity: 0.9;
}

.house-select {
  appearance: none;
  background: #141823;
  color: #e9ecf1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 38px 10px 12px;
  outline: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  transition: all 0.16s ease;
}

.house-select:focus-visible {
  border-color: rgba(138, 108, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(138, 108, 255, 0.18);
}

/* Character List (Flexbox) */
.character-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  padding: 0;
  margin-top: 6px;
}

/* Card Styles */
.card {
  display: flex;
  flex-direction: column;
  flex: 1 1 220px;
  max-width: 260px;
  background: linear-gradient(180deg, #151a28 0%, #121624 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);

  animation: fade-up 0.42s ease;
  transition: all 0.22s ease;
}

.card:nth-child(2n) {
  animation-delay: 0.06s;
}
.card:nth-child(3n) {
  animation-delay: 0.12s;
}
.card:nth-child(4n) {
  animation-delay: 0.18s;
}

.card__img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: top;
  background: #0f121b;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px 12px;
}

.card__title {
  font-family: "HarryP", serif;
  font-size: 26px;
  color: #ffffff;
}

.card__meta {
  color: #b2b8c6;
  font-size: 15px;
  line-height: 1.35;
}

/* Hover Effects */
.card:hover,
.card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35),
    0 0 22px rgba(138, 108, 255, 0.22);
  border-color: rgba(138, 108, 255, 0.35);
}

.card__img:hover {
  filter: saturate(1.06);
}

/*  Button style */
.load-more-btn {
  margin: 20px auto;
  display: block;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 8px;
  border: none;
  background: #8a6cff;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.load-more-btn:hover {
  background: #7a5be3;
  transform: translateY(-2px);
}

/* Footer */
.site-footer {
  background: #141823;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  color: #b2b8c6;
  padding: 16px 20px 30px;
}

/* Animations */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 520px) {
  .site-title {
    font-size: 32px;
  }
  .card__img {
    height: 200px;
  }
}
