:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

.sky-grid {
  background:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px),
    radial-gradient(circle at 20% 20%, rgba(34, 211, 238, .2), transparent 34%),
    radial-gradient(circle at 80% 30%, rgba(239, 68, 68, .18), transparent 36%),
    #101114;
  background-size: 48px 48px, 48px 48px, auto, auto;
  transform: translateZ(0);
  will-change: transform;
  transition: transform .05s linear;
}

.floating-blocks .block,
.island,
.bed,
.bridge,
.crystal,
.runner {
  position: absolute;
}

.floating-blocks .block {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  opacity: .84;
  animation: floatBlock 6s ease-in-out infinite;
}

.block-red {
  left: 8%;
  top: 34%;
  background: #ef4444;
}

.block-blue {
  right: 11%;
  top: 18%;
  background: #22d3ee;
  animation-delay: -2s;
}

.block-green {
  right: 18%;
  bottom: 18%;
  background: #22c55e;
  animation-delay: -3.5s;
}

.block-yellow {
  left: 45%;
  bottom: 10%;
  background: #eab308;
  animation-delay: -1s;
}

.copy-button:hover,
.copy-button:focus-visible {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 22px 46px rgba(239, 68, 68, .45);
}

.island-scene {
  perspective: 900px;
}

.island {
  left: 50%;
  transform: translateX(-50%) rotateX(58deg) rotateZ(-12deg);
  border-radius: 8px;
  box-shadow: 0 34px 80px rgba(0, 0, 0, .42);
}

.island-main {
  top: 160px;
  width: min(76vw, 430px);
  height: min(76vw, 430px);
  background:
    linear-gradient(90deg, rgba(255,255,255,.08), transparent),
    repeating-linear-gradient(0deg, #2f8e3e 0 34px, #257833 34px 68px);
  animation: floatIsland 5s ease-in-out infinite;
}

.island-back {
  top: 72px;
  width: min(48vw, 260px);
  height: min(48vw, 260px);
  background: repeating-linear-gradient(90deg, #3f7ddc 0 30px, #2462bf 30px 60px);
  opacity: .72;
  animation: floatIsland 6s ease-in-out infinite reverse;
}

.bed {
  left: 38%;
  top: 38%;
  width: 104px;
  height: 52px;
  border-radius: 6px;
  background: linear-gradient(90deg, #ef4444 0 62%, #f8fafc 62%);
  box-shadow: 0 16px 24px rgba(0, 0, 0, .25);
}

.bridge {
  height: 34px;
  border-radius: 6px;
}

.bridge-red {
  left: -44px;
  top: 214px;
  width: 160px;
  background: #ef4444;
}

.bridge-blue {
  right: -38px;
  top: 126px;
  width: 150px;
  background: #22d3ee;
  transform: rotate(90deg);
}

.crystal {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: #facc15;
  box-shadow: 0 0 22px rgba(250, 204, 21, .7);
}

.crystal-one {
  left: 78px;
  top: 86px;
}

.crystal-two {
  right: 70px;
  bottom: 82px;
  background: #22c55e;
  box-shadow: 0 0 22px rgba(34, 197, 94, .7);
}

.feature-card {
  min-height: 230px;
  border: 1px solid rgba(23, 25, 29, .1);
  border-radius: 8px;
  background: #fff;
  padding: 28px;
  box-shadow: 0 18px 45px rgba(23, 25, 29, .08);
}

.feature-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
}

.feature-card h3 {
  margin: 24px 0 10px;
  font-size: 1.35rem;
  font-weight: 900;
}

.feature-card p {
  color: #4b5563;
  line-height: 1.7;
}

/* --- Game preview arena --- */
.game-preview {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 50%, rgba(34, 211, 238, .12), transparent 60%),
    linear-gradient(145deg, #16181d, #1e2128);
  border: 1px solid rgba(255, 255, 255, .07);
}

.game-preview__label {
  position: absolute;
  top: 14px;
  left: 18px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .35);
}

.game-preview__arena {
  position: absolute;
  inset: 0;
}

/* Team islands (corners) */
.arena-island {
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arena-island--red    { top: 18%; left: 10%;  background: rgba(239, 68,  68, .22); border: 2px solid rgba(239, 68,  68, .5); }
.arena-island--blue   { top: 18%; right: 10%; background: rgba(34, 211, 238, .22); border: 2px solid rgba(34, 211, 238, .5); }
.arena-island--green  { bottom: 18%; left: 10%;  background: rgba(34, 197, 94, .22);  border: 2px solid rgba(34, 197, 94, .5); }
.arena-island--yellow { bottom: 18%; right: 10%; background: rgba(234, 179, 8,  .22); border: 2px solid rgba(234, 179, 8,  .5); }

/* Beds on islands */
.arena-bed {
  width: 26px;
  height: 14px;
  border-radius: 3px;
}

.arena-bed--red    { background: linear-gradient(90deg, #ef4444 55%, #f8fafc 55%); }
.arena-bed--blue   { background: linear-gradient(90deg, #22d3ee 55%, #f8fafc 55%); }
.arena-bed--green  { background: linear-gradient(90deg, #22c55e 55%, #f8fafc 55%); }
.arena-bed--yellow { background: linear-gradient(90deg, #eab308 55%, #f8fafc 55%); }

/* Bridges (center crosshair) */
.arena-bridge {
  position: absolute;
  background: rgba(255, 255, 255, .12);
  border-radius: 4px;
}

.arena-bridge--h {
  top: 50%;
  left: 18%;
  right: 18%;
  height: 8px;
  transform: translateY(-50%);
}

.arena-bridge--v {
  left: 50%;
  top: 18%;
  bottom: 18%;
  width: 8px;
  transform: translateX(-50%);
}

/* Center diamond generator */
.arena-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(34, 211, 238, .18);
  border: 2px solid rgba(34, 211, 238, .5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.arena-diamond {
  width: 18px;
  height: 18px;
  background: #22d3ee;
  border-radius: 3px;
  box-shadow: 0 0 14px rgba(34, 211, 238, .8);
  animation: pulseDiamond 1.8s ease-in-out infinite;
}

/* Moving players */
.arena-player {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.arena-player--1 {
  background: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, .8);
  top: 26%;
  left: 18%;
  animation: playerMove1 5s linear infinite;
}

.arena-player--2 {
  background: #22d3ee;
  box-shadow: 0 0 10px rgba(34, 211, 238, .8);
  top: 26%;
  right: 18%;
  animation: playerMove2 6s linear infinite;
}

.perk,
.rule {
  min-height: 88px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
  padding: 24px;
  font-size: 1.05rem;
  font-weight: 800;
}

.discord-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #22c55e;
  padding: 16px 22px;
  color: #07130a;
  font-weight: 900;
  transition: transform .2s ease, background .2s ease;
}

.discord-link:hover,
.discord-link:focus-visible {
  transform: translateY(-4px);
  background: #86efac;
}

@keyframes floatBlock {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-18px) rotate(8deg);
  }
}

@keyframes floatIsland {
  0%,
  100% {
    margin-top: 0;
  }
  50% {
    margin-top: -14px;
  }
}

@keyframes pulseDiamond {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.3); opacity: .7; }
}

@keyframes playerMove1 {
  0%   { top: 26%; left: 18%; }
  25%  { top: 50%; left: 50%; }
  50%  { top: 74%; right: 18%; left: auto; }
  75%  { top: 50%; left: 50%; }
  100% { top: 26%; left: 18%; }
}

@keyframes playerMove2 {
  0%   { top: 26%; right: 18%; }
  30%  { top: 50%; right: 50%; }
  60%  { top: 74%; left: 18%; right: auto; }
  80%  { top: 50%; right: 50%; left: auto; }
  100% { top: 26%; right: 18%; left: auto; }
}

@media (max-width: 720px) {
  .floating-blocks .block {
    width: 30px;
    height: 30px;
  }

  .island-main {
    top: 118px;
  }

  .island-back {
    top: 54px;
  }

  .bed {
    width: 72px;
    height: 38px;
  }
}
