:root {
  --space-dark: #0a0f2c;
  --space-medium: #121a3b;
  --space-light: #1a2340;
  --highlight: #4a90e2;
  --text-light: #ffffff;
  --text-muted: #b0c6e0;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 50%, var(--space-dark), var(--space-medium), var(--space-light));
  overflow-x: hidden;
  position: relative;
  font-family: 'Inter', 'Segoe UI', 'Noto Sans', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-light);
}

header {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  height: 80px;
  padding: 0 20px;
  box-sizing: border-box;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-light);
  position: relative;
  left: -25px;
}

.logo-subtext {
  font-size: 0.7em;
  color: #aaa;
  font-style: italic;
  line-height: 1;
  position: relative;
  top: 4px;
  left: -8px;
}

.logo {
  height: 64px;
  margin-right: -15px;
  display: flex;
  align-self: center;
}

.logo-text {
  font-size: 1.5em;
  font-weight: bold;
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1;
  position: relative;
  top: -2px;
  left: -5px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 1200px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}

/* card */
.item {
  position: relative;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 350px;
}

.item:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.background {
  width: 100%;
  height: 150px;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

.background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.icon-and-name {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  top: -25px;
}

.pack-icon-container {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pack-icon {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
  background: #fff;
  transition: transform 0.3s ease;
  position: relative;
  top: -17px;
}

.icon-and-name .title {
  font-size: 1.2em;
  font-weight: bold;
  color: #fff;
  margin: 0;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}

.description-and-type {
  padding: 10px;
}

.description {
  font-size: 0.9em;
  color: #ccc;
  margin: 0 0 5px;
  position: relative;
  top: -50px;
}

.type {
  position: absolute;
  bottom: -5px;
  left: 10px;
  font-size: 0.8em;
  color: #aaa;
}

#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease;
}

#loader-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  background: #000;
}

#pixel-spinner {
  width: 64px;
  height: 64px;
  background: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

#star-canvas,
#light-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

#star-canvas {
  z-index: -1;
  filter: blur(10px);
  transition: filter 2s linear;
}

#light-canvas {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.5));
  filter: blur(10px);
  transition: filter 1.5s ease;
}

a {
  text-decoration: none;
  color: inherit;
}