:root {
  --background: #080808;
  --background-light: #0f0f0f;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-hover: rgba(255, 255, 255, 0.09);
  --purple: #870087;
  --purple-bright: #a800a8;
  --purple-dark: #220022;
  --text: #e0e0e0;
  --text-muted: #999;
  --border: rgba(135, 0, 135, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(
      circle at 50% -10%,
      rgba(135, 0, 135, 0.16),
      transparent 35%
    ),
    linear-gradient(to bottom, #0d0d0d, #000);
  color: var(--text);
  font-family: "Poppins", sans-serif;
  min-height: 100vh;
}

header {
  background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.75)),
    url("https://abnormal-alt-hosting.netlify.app/abnormal.png") center / cover
      no-repeat;

  min-height: 230px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.header-text {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);

  padding: 20px 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;

  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 600;
  letter-spacing: 1px;

  color: white;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.75);

  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8), 0 0 40px rgba(135, 0, 135, 0.12);
}

.header-text .ab {
  color: var(--purple-bright);
  text-shadow: 0 0 10px rgba(135, 0, 135, 0.9), 0 0 25px rgba(135, 0, 135, 0.65);
}

.header-text .web {
  color: #9b7cff;
  text-shadow: 0 0 10px rgba(155, 124, 255, 0.9),
    0 0 25px rgba(155, 124, 255, 0.65);
}

nav {
  position: sticky;
  top: 0;
  z-index: 100;

  display: flex;
  justify-content: center;
  gap: 10px;

  padding: 12px 20px;

  background: rgba(20, 0, 20, 0.88);
  backdrop-filter: blur(12px);

  border-bottom: 1px solid rgba(135, 0, 135, 0.35);
}

nav a {
  color: #ddd;
  text-decoration: none;

  padding: 10px 22px;
  border-radius: 8px;

  font-size: 0.95rem;
  font-weight: 600;

  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
}

nav a:hover {
  color: white;
  background: rgba(135, 0, 135, 0.3);

  transform: translateY(-2px);

  box-shadow: 0 0 14px rgba(135, 0, 135, 0.35);
}

nav a.active {
  background: rgba(135, 0, 135, 0.25);
  color: white;
}

main {
  width: min(1400px, calc(100% - 80px));
  margin: 45px auto 70px;
}

.announcement {
  display: flex;
  align-items: flex-start;
  gap: 20px;

  padding: 25px 30px;
  margin-bottom: 30px;

  background: linear-gradient(
    135deg,
    rgba(135, 0, 135, 0.16),
    rgba(255, 255, 255, 0.04)
  );

  border: 1px solid var(--border);
  border-radius: 14px;

  box-shadow: 0 0 25px rgba(135, 0, 135, 0.12);
}

.announcement-icon {
  flex-shrink: 0;

  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: var(--purple);
  color: white;

  font-size: 1.3rem;
  font-weight: 700;

  box-shadow: 0 0 18px rgba(135, 0, 135, 0.65);
}

.announcement-content h2 {
  margin: 0 0 6px;

  font-size: 1.25rem;
  color: white;
}

.announcement-content p {
  margin: 0;

  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.game-library {
  padding: 30px;

  background: linear-gradient(
    to bottom,
    rgba(34, 0, 34, 0.72),
    rgba(0, 0, 0, 0.75)
  );

  border: 1px solid var(--border);
  border-radius: 16px;

  box-shadow: 0 0 25px rgba(135, 0, 135, 0.2),
    inset 0 0 40px rgba(135, 0, 135, 0.025);
}

.library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 25px;
}

.library-title {
  display: flex;
  align-items: center;
  gap: 15px;
}

.library-icon {
  font-size: 2rem;
}

.library-title h1 {
  margin: 0;

  color: white;
  font-size: 1.65rem;
}

.library-title p {
  margin: 2px 0 0;

  color: var(--text-muted);
  font-size: 0.9rem;
}

.legacy-link {
  padding: 10px 16px;

  color: #c77cff;
  text-decoration: none;

  border: 1px solid rgba(135, 0, 135, 0.45);
  border-radius: 8px;

  background: rgba(135, 0, 135, 0.1);

  font-size: 0.9rem;
  font-weight: 600;

  transition: 0.2s ease;
}

.legacy-link:hover {
  color: white;
  background: rgba(135, 0, 135, 0.3);
  border-color: var(--purple);
}

.game-controls {
  display: flex;
  gap: 15px;

  margin-bottom: 12px;
}

.search-container {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;

  transform: translateY(-50%);

  color: #aaa;
  font-size: 1.35rem;

  pointer-events: none;
}

#game-search {
  width: 100%;
  height: 46px;

  padding: 0 15px 0 45px;

  background: rgba(0, 0, 0, 0.45);
  color: white;

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;

  outline: none;

  font-family: inherit;
  font-size: 0.95rem;

  transition: 0.2s ease;
}

#game-search:focus {
  border-color: var(--purple);
  box-shadow: 0 0 12px rgba(135, 0, 135, 0.3);
}

#game-search::placeholder {
  color: #777;
}

.sort-container {
  display: flex;
  align-items: center;
  gap: 8px;

  color: var(--text-muted);
  font-size: 0.9rem;
}

#game-sort {
  height: 46px;

  padding: 0 35px 0 12px;

  color: white;
  background: rgba(0, 0, 0, 0.45);

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;

  outline: none;

  font-family: inherit;
  font-size: 0.9rem;

  cursor: pointer;
}

#game-sort:focus {
  border-color: var(--purple);
}

#game-sort option {
  background: #111;
  color: white;
}

.game-status {
  margin: 10px 2px 18px;

  color: #777;
  font-size: 0.8rem;
}

.button-box {
  display: grid;

  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.game-card {
  position: relative;

  aspect-ratio: 1 / 1;

  overflow: hidden;

  background: #111;

  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;

  cursor: pointer;

  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);

  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.game-card:hover {
  transform: translateY(-5px);

  border-color: rgba(135, 0, 135, 0.85);

  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 18px rgba(135, 0, 135, 0.45);
}

.game-image {
  position: absolute;
  inset: 0;

  background-size: cover;
  background-position: center;

  transition: transform 0.35s ease;
}

.game-card:hover .game-image {
  transform: scale(1.05);
}

.game-overlay {
  position: absolute;
  inset: 0;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  padding: 18px;

  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.55) 35%,
    transparent 70%
  );
}

.game-overlay h3 {
  margin: 0;

  color: white;

  font-size: 1rem;
  font-weight: 600;

  text-shadow: 0 2px 5px black;
}

.game-overlay span {
  margin-top: 3px;

  color: #c77cff;

  font-size: 0.78rem;
  font-weight: 600;

  opacity: 0;

  transform: translateY(5px);

  transition: opacity 0.2s ease, transform 0.2s ease;
}

.game-card:hover .game-overlay span {
  opacity: 1;
  transform: translateY(0);
}

.no-results {
  padding: 60px 20px;

  text-align: center;

  color: var(--text-muted);
}

.no-results h2 {
  margin: 0 0 5px;

  color: white;
  font-size: 1.2rem;
}

.no-results p {
  margin: 0;

  font-size: 0.9rem;
}

footer {
  padding: 25px;

  text-align: center;

  color: #555;

  border-top: 1px solid rgba(135, 0, 135, 0.15);

  font-size: 0.8rem;
}

@media (max-width: 1200px) {
  .button-box {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  main {
    width: min(95%, 750px);
  }

  .button-box {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.game-card.broken {
  filter: grayscale(0.55);
  opacity: 0.72;
  cursor: not-allowed;
}

.game-card.broken:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
}

.broken-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;

  padding: 5px 8px;

  background: rgba(120, 0, 0, 0.85);
  color: white;

  border-radius: 5px;

  font-size: 0.65rem;
  font-weight: 700;

  letter-spacing: 0.5px;
}

.broken-label {
  color: #ff7777 !important;
}
