:root {
  --cream: #f3e9d7;
  --cream-soft: #fbf5ea;
  --purple-dark: #5b4d79;
  --purple: #7b6a9e;
  --purple-deep: #3a2e4d;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100vh;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-color: var(--cream);
  background-image: url("assets/bookshelf-pattern.svg");
  background-repeat: repeat;
  background-size: 128px 128px;
  font-family: "Pixelify Sans", monospace;
  animation: drift 40s linear infinite;
}

@keyframes drift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 256px 256px;
  }
}

body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(251, 245, 234, 0.55);
  pointer-events: none;
}

.card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 90vw;
  padding: 2.5rem 3rem;
  background: var(--cream-soft);
  border: 4px solid var(--purple-dark);
  box-shadow: 6px 6px 0 var(--purple-deep);
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.logo-wrap {
  position: relative;
}

.logo {
  display: block;
  width: min(300px, 65vw);
  height: auto;
  image-rendering: auto;
}

h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(1.3rem, 4vw, 2rem);
  letter-spacing: 1px;
  color: var(--purple-dark);
  text-shadow: 2px 2px 0 var(--purple);
}

@media (prefers-reduced-motion: reduce) {
  body,
  .card {
    animation: none;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 1.75rem 1.5rem;
    gap: 1rem;
  }
}

.music-toggle {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  font-family: "Pixelify Sans", monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cream-soft);
  background: var(--purple-dark);
  border: 3px solid var(--purple-deep);
  box-shadow: 3px 3px 0 var(--purple-deep);
  cursor: pointer;
}

.music-toggle:hover {
  background: var(--purple);
}

.music-toggle:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--purple-deep);
}

@media (max-width: 480px) {
  .music-toggle {
    right: 0.75rem;
    bottom: 0.75rem;
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
  }
}

.support-link {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 10;
  font-family: "Pixelify Sans", monospace;
  font-size: 0.85rem;
  color: var(--purple-dark);
  text-decoration: none;
  opacity: 0.8;
}

.support-link:hover {
  opacity: 1;
  text-decoration: underline;
}

@media (max-width: 480px) {
  .support-link {
    left: 0.75rem;
    bottom: 0.75rem;
    font-size: 0.75rem;
  }
}
