:root {
  color-scheme: light;
  --bg-1: #130f2f;
  --bg-2: #251a5d;
  --bg-3: #071f53;
  --panel: #fff6d7;
  --panel-border: #18124a;
  --panel-shadow: #ff3cac;
  --headline: #ffe95e;
  --headline-shadow: #ff3cac;
  --body-text: #16225c;
  --accent-a: #00dbff;
  --accent-b: #ff7f50;
  --accent-c: #7cff76;
  --accent-d: #ff5bf2;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 15% 18%, rgba(255, 255, 255, 0.17) 0 7%, transparent 7.5%),
    radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.22) 0 5%, transparent 5.5%),
    linear-gradient(180deg, rgba(19, 15, 47, 0.25), rgba(19, 15, 47, 0.25)),
    linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 44%, var(--bg-3) 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 28px;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 100%),
    linear-gradient(rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 100%),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 45%);
  background-size: 38px 38px, 38px 38px, auto;
  color: var(--body-text);
  font-family: "VT323", monospace;
}

body::before {
  content: "";
  position: fixed;
  inset: 16px;
  border: 3px dashed rgba(255, 255, 255, 0.58);
  box-shadow:
    0 0 0 6px rgba(255, 60, 172, 0.26),
    0 0 0 12px rgba(0, 219, 255, 0.16);
  pointer-events: none;
}

.home {
  position: relative;
  min-height: calc(100vh - 56px);
  display: grid;
  place-items: center;
}

.portal {
  position: relative;
  width: min(980px, 100%);
  border: 4px solid var(--panel-border);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 40%),
    repeating-linear-gradient(
      45deg,
      rgba(255, 91, 242, 0.13) 0 10px,
      rgba(0, 219, 255, 0.13) 10px 20px,
      rgba(124, 255, 118, 0.13) 20px 30px,
      rgba(255, 233, 94, 0.15) 30px 40px
    ),
    var(--panel);
  box-shadow:
    0 0 0 6px #ffffff,
    0 0 0 12px var(--panel-border),
    16px 16px 0 var(--panel-shadow);
}

.portal::before,
.portal::after {
  content: "";
  position: absolute;
  width: 94px;
  height: 94px;
  border: 4px solid var(--panel-border);
  background:
    radial-gradient(circle at center, #fff 0 10%, transparent 10% 100%),
    linear-gradient(135deg, #ff5bf2, #00dbff);
  image-rendering: pixelated;
}

.portal::before {
  top: -26px;
  left: -26px;
  transform: rotate(-8deg);
}

.portal::after {
  right: -26px;
  bottom: -26px;
  transform: rotate(8deg);
}

.portal-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 4px solid var(--panel-border);
  background: linear-gradient(90deg, #ff5bf2, #ffe95e, #00dbff);
}

.portal-bar span {
  width: 16px;
  height: 16px;
  border: 3px solid var(--panel-border);
  background: #fff6d7;
}

.portal-body {
  position: relative;
  padding: 36px;
}

.sticker-row {
  position: absolute;
  top: 16px;
  right: 20px;
  display: flex;
  gap: 14px;
}

.sticker {
  display: block;
  width: 28px;
  height: 28px;
  border: 3px solid var(--panel-border);
  box-shadow: 4px 4px 0 rgba(24, 18, 74, 0.2);
}

.sticker-star {
  background:
    conic-gradient(from 45deg, #ffe95e 0 25%, #ff7f50 25% 50%, #ff5bf2 50% 75%, #00dbff 75% 100%);
  transform: rotate(12deg);
}

.sticker-orb {
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #ffffff 0 12%, #00dbff 12% 44%, #2336a2 44% 100%);
}

.sticker-comet {
  background:
    linear-gradient(135deg, #7cff76 0 50%, #16225c 50% 54%, #ff5bf2 54% 100%);
  transform: rotate(-14deg);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(240px, 0.95fr);
  gap: 32px;
  align-items: center;
}

.hero-copy {
  display: grid;
  justify-items: start;
  gap: 18px;
  text-align: left;
  padding: 18px 6px 18px 0;
}

h1,
.subtitle,
.pixel-showcase {
  position: relative;
  z-index: 1;
}

h1 {
  margin: 0;
  font-family: "Monoton", cursive;
  font-size: clamp(3.4rem, 8vw, 6.9rem);
  font-weight: 400;
  line-height: 0.9;
  color: var(--headline);
  text-transform: uppercase;
  text-shadow:
    4px 4px 0 var(--headline-shadow),
    8px 8px 0 #16225c,
    0 0 22px rgba(255, 233, 94, 0.6);
}

.subtitle {
  margin: 0;
  padding: 14px 18px 12px;
  border: 4px solid var(--panel-border);
  background: #fff;
  font-family: "Press Start 2P", cursive;
  font-size: clamp(0.9rem, 1.7vw, 1.2rem);
  line-height: 1.7;
  letter-spacing: 0.08em;
  color: var(--body-text);
  box-shadow:
    8px 8px 0 #00dbff,
    inset 0 0 0 4px #ffe95e;
  animation: blink-frame 1.35s steps(2, jump-none) infinite;
}

.pixel-showcase {
  margin: 0;
  padding: 22px;
  border: 4px solid var(--panel-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.22)),
    linear-gradient(135deg, rgba(0, 219, 255, 0.34), rgba(255, 91, 242, 0.28));
  box-shadow:
    0 0 0 6px #ffffff,
    10px 10px 0 #ff7f50;
  transform: rotate(1.5deg);
}

.pixel-showcase img {
  display: block;
  width: min(100%, 360px);
  height: auto;
  image-rendering: pixelated;
  transform: scaleX(-1);
  filter: drop-shadow(0 10px 12px rgba(22, 34, 92, 0.28));
}

.sparkles {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.sparkle {
  position: absolute;
  width: 22px;
  height: 22px;
  background:
    linear-gradient(90deg, transparent 42%, rgba(255, 255, 255, 0.95) 42% 58%, transparent 58%),
    linear-gradient(transparent 42%, rgba(255, 255, 255, 0.95) 42% 58%, transparent 58%);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.6));
  animation: twinkle 2.8s steps(2, jump-none) infinite;
}

.sparkle-a {
  top: 11%;
  left: 10%;
}

.sparkle-b {
  top: 18%;
  right: 12%;
  animation-delay: 0.8s;
}

.sparkle-c {
  top: 62%;
  left: 7%;
  animation-delay: 1.4s;
}

.sparkle-d {
  top: 72%;
  right: 10%;
  animation-delay: 0.3s;
}

.sparkle-e {
  top: 40%;
  left: 50%;
  animation-delay: 1.1s;
}

.sparkle-f {
  top: 84%;
  left: 35%;
  animation-delay: 1.9s;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.85);
  }

  50% {
    opacity: 1;
    transform: scale(1.3);
  }
}

@keyframes blink-frame {
  0%,
  100% {
    box-shadow:
      8px 8px 0 #00dbff,
      inset 0 0 0 4px #ffe95e;
  }

  50% {
    box-shadow:
      8px 8px 0 #ff5bf2,
      inset 0 0 0 4px #7cff76;
  }
}

@media (max-width: 820px) {
  body {
    padding: 20px;
  }

  body::before {
    inset: 10px;
  }

  .portal-body {
    padding: 24px 20px 28px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-copy {
    justify-items: center;
    text-align: center;
    padding: 22px 0 0;
  }

  .pixel-showcase {
    justify-self: center;
    transform: none;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: clamp(2.5rem, 16vw, 4rem);
  }

  .subtitle {
    width: 100%;
    text-align: center;
    font-size: 0.86rem;
  }

  .portal::before,
  .portal::after {
    width: 64px;
    height: 64px;
  }

  .portal::before {
    top: -18px;
    left: -18px;
  }

  .portal::after {
    right: -18px;
    bottom: -18px;
  }

  .sticker-row {
    top: 12px;
    right: 14px;
    gap: 10px;
  }

  .sticker {
    width: 20px;
    height: 20px;
  }
}
