:root {
  --ink: #f5f0e6;
  --ink-dim: #c9c0b0;
  --black: #0b0b0b;
  --dirt: #5a3d28;
  --dirt-dark: #3a2618;
  --grass: #507a32;
  --grass-top: #6b9a3e;
  --cobble: #7a7a7a;
  --cobble-dark: #4a4a4a;
  --stone: #585858;
  --gold: #f0c23a;
  --gold-deep: #c48912;
  --lava: #ff6a1a;
  --slot: #8b8b8b;
  --font-mc: "Pixelify Sans", system-ui, sans-serif;
  --font-ui: "Rubik", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.05rem;
  line-height: 1.5;
  background: #1a1a1a;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* —— Top bar (hotbar vibe) —— */
.bar {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(0.9rem, 3vw, 2rem);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.15));
}

.bar-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mc);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--gold);
  text-shadow: 2px 2px 0 #3a2200;
}

.bar-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  image-rendering: auto;
}

.bar-nav {
  display: flex;
  gap: 1.1rem;
  font-family: var(--font-mc);
  font-size: 0.95rem;
  color: #eee;
  text-shadow: 1px 1px 0 #000;
}

.bar-nav a:hover {
  color: var(--gold);
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  z-index: -2;
  transform: scale(1.04);
  animation: pan 18s ease-in-out infinite alternate;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.72) 70%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.55) 55%, #121212 100%);
}

.hero-inner {
  width: min(920px, 100%);
  padding: 6.5rem 1.25rem 3.5rem;
  text-align: center;
  animation: pop-in 0.85s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.hero-logo {
  width: min(280px, 58vw);
  margin: 0 auto 0.25rem;
  filter: drop-shadow(0 10px 0 rgba(0, 0, 0, 0.45));
  animation: float-logo 5s ease-in-out infinite;
}

.hero-tag {
  margin: 0 0 0.65rem;
  font-family: var(--font-mc);
  font-weight: 700;
  font-size: clamp(1.4rem, 4vw, 2rem);
  letter-spacing: 0.28em;
  color: #fff;
  text-shadow:
    3px 3px 0 #000,
    -1px -1px 0 #000;
}

.hero h1 {
  margin: 0 0 0.65rem;
  font-family: var(--font-mc);
  font-weight: 700;
  font-size: clamp(1.45rem, 3.8vw, 2.35rem);
  line-height: 1.2;
  color: var(--gold);
  text-shadow:
    3px 3px 0 #3a2200,
    0 0 18px rgba(255, 106, 26, 0.35);
}

.hero-lede {
  margin: 0 auto 1.6rem;
  max-width: 28rem;
  color: #e8e2d6;
  text-shadow: 1px 1px 0 #000;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

.toast {
  margin: 1rem 0 0;
  font-family: var(--font-mc);
  color: #7dffa0;
  text-shadow: 1px 1px 0 #003;
}

/* —— Minecraft buttons —— */
.mc-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  padding: 0.7rem 1.4rem 0.75rem;
  border: 3px solid #000;
  font-family: var(--font-mc);
  cursor: pointer;
  color: #fff;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.55);
  box-shadow:
    inset 3px 3px 0 rgba(255, 255, 255, 0.28),
    inset -3px -3px 0 rgba(0, 0, 0, 0.35),
    0 4px 0 #000;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.mc-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.mc-btn:active {
  transform: translateY(2px);
  box-shadow:
    inset 3px 3px 0 rgba(0, 0, 0, 0.35),
    inset -2px -2px 0 rgba(255, 255, 255, 0.15),
    0 1px 0 #000;
}

.mc-btn-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.1;
}

.mc-btn-sub {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.9;
  margin-top: 0.15rem;
}

.mc-btn-green {
  background: linear-gradient(180deg, #62b339 0%, #3d8a22 45%, #2f6b1a 100%);
}

.mc-btn-stone {
  background: linear-gradient(180deg, #9a9a9a 0%, #6e6e6e 50%, #555 100%);
}

.mc-btn-gold {
  background: linear-gradient(180deg, #ffd24a 0%, #e0a820 45%, #b87a10 100%);
  color: #2a1800;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.25);
}

.mc-btn-blurple {
  background: linear-gradient(180deg, #7289da 0%, #5865f2 45%, #3c45a5 100%);
}

/* —— Block strips —— */
.grass-strip {
  height: 28px;
  background:
    linear-gradient(180deg, var(--grass-top) 0 10px, var(--grass) 10px 18px, var(--dirt) 18px),
    repeating-linear-gradient(
      90deg,
      #5f8f3a 0 16px,
      #4e7a30 16px 32px
    );
  background-blend-mode: multiply;
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.15);
}

.stone-strip {
  height: 22px;
  background:
    repeating-linear-gradient(90deg, #8a8a8a 0 20px, #6f6f6f 20px 40px),
    repeating-linear-gradient(0deg, transparent 0 10px, rgba(0, 0, 0, 0.12) 10px 11px);
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
}

/* —— Sections —— */
.block-section {
  padding: clamp(2.75rem, 6vh, 4.5rem) 1.25rem;
}

.section-wrap {
  width: min(960px, 100%);
  margin: 0 auto;
}

.dirt {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.04), transparent 40%),
    repeating-linear-gradient(0deg, #4a3220 0 32px, #3f2a1b 32px 64px),
    repeating-linear-gradient(90deg, #523826 0 32px, #46301f 32px 64px);
  background-blend-mode: soft-light, normal, normal;
}

.stone {
  background:
    repeating-linear-gradient(0deg, #3f3f3f 0 36px, #353535 36px 72px),
    repeating-linear-gradient(90deg, #484848 0 36px, #3a3a3a 36px 72px);
}

.netherrack {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 80, 20, 0.22), transparent 55%),
    repeating-linear-gradient(0deg, #5a2424 0 28px, #4a1c1c 28px 56px),
    repeating-linear-gradient(90deg, #6a2c2c 0 28px, #3f1616 28px 56px);
}

.mc-title {
  margin: 0 0 0.4rem;
  font-family: var(--font-mc);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  color: var(--gold);
  text-shadow: 3px 3px 0 #000;
}

.mc-sub {
  margin: 0 0 1.75rem;
  color: var(--ink-dim);
  text-shadow: 1px 1px 0 #000;
  max-width: 34rem;
}

/* Crafting-table style slots */
.craft-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 760px) {
  .craft-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .craft-row-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.slot {
  padding: 1.1rem 1rem 1.2rem;
  background: linear-gradient(180deg, #c6c6c6 0%, #8b8b8b 100%);
  border: 4px solid #373737;
  box-shadow:
    inset 4px 4px 0 #fff,
    inset -4px -4px 0 #555,
    0 6px 0 #111;
  color: #1a1a1a;
  text-shadow: none;
}

.slot h3 {
  margin: 0.55rem 0 0.3rem;
  font-family: var(--font-mc);
  font-size: 1.15rem;
  color: #111;
}

.slot p {
  margin: 0;
  color: #2d2d2d;
  font-size: 0.95rem;
}

.slot-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-family: var(--font-mc);
  font-weight: 700;
  font-size: 0.9rem;
  color: #1a4a8a;
  text-decoration: underline;
}

.slot-link:hover {
  color: #000;
}

.slot-icon {
  width: 48px;
  height: 48px;
  border: 3px solid #111;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.35), inset -2px -2px 0 rgba(0, 0, 0, 0.35);
  image-rendering: pixelated;
}

.slot-icon.grass {
  background:
    linear-gradient(180deg, #6b9a3e 0 14px, #5a3d28 14px);
}

.slot-icon.cobble {
  background:
    repeating-linear-gradient(90deg, #9a9a9a 0 12px, #6e6e6e 12px 24px),
    repeating-linear-gradient(0deg, #8a8a8a 0 12px, #5a5a5a 12px 24px);
}

.slot-icon.gold {
  background: linear-gradient(135deg, #ffe566, #d4a017 55%, #a86b00);
}

.slot-icon.emerald {
  background: linear-gradient(135deg, #6dffb0, #1f9a55 55%, #0d5c32);
}

.slot-icon.nametag {
  background: linear-gradient(180deg, #f0e6c8 0 18px, #c4a574 18px);
}

.inline-ip {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: #6b3a00;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.inline-ip:hover {
  color: #000;
}

.modos-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.modos-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 0 #000);
}

.inv {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.inv li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.85rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
  background: rgba(0, 0, 0, 0.35);
  border: 3px solid #1a1a1a;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.08);
}

.inv-key {
  font-family: var(--font-mc);
  font-weight: 700;
  color: var(--gold);
  text-shadow: 2px 2px 0 #000;
}

.inv-val {
  color: #ddd;
  text-shadow: 1px 1px 0 #000;
}

.store-wrap {
  text-align: center;
}

.store-wrap .mc-sub {
  margin-left: auto;
  margin-right: auto;
}

.store-wrap .mc-btn {
  margin-top: 0.25rem;
}

.store-actions {
  margin-top: 0.5rem;
}

.gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 760px) {
  .gallery {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.gallery figure {
  margin: 0;
  border: 4px solid #111;
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.12),
    0 6px 0 #000;
  background: #1a1a1a;
  overflow: hidden;
  min-height: 140px;
}

.gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center;
}

.gallery figure:nth-child(2) img,
.gallery figure:nth-child(3) img {
  object-fit: contain;
  padding: 1.25rem;
  background:
    radial-gradient(circle at 50% 40%, rgba(240, 194, 58, 0.15), transparent 55%),
    #161616;
}

.foot {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem clamp(0.9rem, 3vw, 2rem);
  background: #0a0a0a;
  border-top: 3px solid #000;
  font-size: 0.92rem;
}

.foot strong {
  display: block;
  font-family: var(--font-mc);
  color: var(--gold);
  text-shadow: 1px 1px 0 #000;
}

.foot span {
  color: #999;
}

@keyframes pan {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.08) translate3d(-1.5%, -1%, 0);
  }
}

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

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 640px) {
  .bar-nav a:nth-child(1) {
    display: none;
  }

  .inv li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .modos-head {
    flex-direction: column;
    text-align: center;
  }

  .modos-head .mc-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions .mc-btn {
    min-width: min(100%, 240px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
