/* Tema sama dengan rubymc.id: warna ruby, font Pixelify Sans + Plus Jakarta Sans, blok ala Minecraft. */
:root {
  --ruby-50: #fff1f5;
  --ruby-100: #ffe1ea;
  --ruby-200: #ffc2d5;
  --ruby-300: #ff8fb1;
  --ruby-400: #f54d83;
  --ruby-500: #e0115f;
  --ruby-600: #c00a50;
  --ruby-700: #9c0942;
  --ruby-800: #7a0b37;
  --ruby-900: #4a0621;
  --ink: #2b0c18;
  --muted: #6e5560;
  --line: #f1dbe3;
  --paper: #fffafc;
  --discord: #5865f2;
  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --font-pixel: "Pixelify Sans", "Plus Jakarta Sans", sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

img,
svg {
  display: block;
}

::selection {
  background: var(--ruby-200);
  color: var(--ruby-900);
}

::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-track {
  background: var(--ruby-50);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--ruby-400), var(--ruby-600));
  border: 3px solid var(--ruby-50);
  border-radius: 999px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.pixel {
  font-family: var(--font-pixel);
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 2.75rem 1rem 3.75rem;
  text-align: center;
  color: #fff;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 70%;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgb(74 6 33 / 0.55), rgb(74 6 33 / 0.8));
}
.hero-compact {
  padding: 1.75rem 1rem 3rem;
}

.logo {
  width: 104px;
  height: 104px;
  margin: 0 auto;
  filter: drop-shadow(0 8px 0 rgb(74 6 33 / 0.45));
  animation: float 5s ease-in-out infinite;
}
.hero-compact .logo {
  width: 72px;
  height: 72px;
}

.hero h1 {
  margin: 0.9rem 0 0;
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1.1;
  text-shadow: 0 3px 0 rgb(74 6 33 / 0.6);
}
.hero p {
  margin: 0.5rem auto 0;
  max-width: 28rem;
  color: rgb(255 241 245 / 0.92);
}

.eyebrow-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 0.4rem;
  background: rgb(255 255 255 / 0.15);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.25);
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ruby-100);
}

/* Chip IP: klik untuk salin */
.ip {
  margin: 1.25rem auto 0;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.6rem 0.55rem 0.9rem;
  border: 2px solid rgb(255 255 255 / 0.35);
  border-radius: 0.5rem;
  background: rgb(43 12 24 / 0.45);
  backdrop-filter: blur(6px);
  color: #fff;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 4px 0 rgb(43 12 24 / 0.5);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.ip:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgb(43 12 24 / 0.5);
}
.ip:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgb(43 12 24 / 0.5);
}
.ip code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  font-size: 0.95rem;
}
.ip-tag {
  padding: 0.25rem 0.5rem;
  border-radius: 0.3rem;
  background: var(--ruby-500);
  font-family: var(--font-pixel);
  font-size: 0.8rem;
}
.ip-note {
  margin-top: 0.5rem !important;
  font-size: 0.8rem;
}

.grass-edge {
  height: 20px;
  background:
    linear-gradient(90deg, #5cb83a 0 25%, #6fd14a 25% 50%, #4fa333 50% 75%, #66c843 75%) 0 0 / 32px 8px repeat-x,
    linear-gradient(90deg, #4a9c30 0 50%, transparent 50%) 0 8px / 16px 4px repeat-x,
    linear-gradient(90deg, #8b5a2b 0 25%, #7a4e24 25% 50%, #96622f 50% 75%, #74481f 75%) 0 8px / 32px 12px repeat-x;
}

/* ---------- Isi ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.section + .section {
  margin-top: 2rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ruby-600);
}

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

/* Tombol link = blok 3D: sisi bawah tebal, turun saat ditekan */
.link {
  --edge: var(--line);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 1rem 0.8rem 0.8rem;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 0.6rem;
  box-shadow: 0 5px 0 var(--edge);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.15s ease, background-color 0.15s ease;
}
a.link:hover {
  --edge: var(--ruby-200);
  transform: translateY(-2px);
  border-color: var(--ruby-200);
  box-shadow: 0 7px 0 var(--edge), 0 18px 26px -18px rgb(224 17 95 / 0.45);
}
a.link:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--edge);
}
a.link:focus-visible {
  outline: 3px solid var(--ruby-300);
  outline-offset: 3px;
}

.link-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 0.45rem;
  background: var(--ruby-500);
  color: #fff;
  box-shadow: 0 4px 0 var(--ruby-800);
}
.link-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}
.link-text {
  flex: 1;
  min-width: 0;
}
.link-title {
  display: block;
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.25;
}
.link-desc {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.link-arrow {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  color: var(--ruby-300);
  transition: transform 0.15s ease, color 0.15s ease;
}
a.link:hover .link-arrow {
  color: var(--ruby-500);
  transform: translate(2px, -2px);
}

/* Varian */
.link-featured {
  --edge: var(--ruby-800);
  background: var(--ruby-500);
  border-color: var(--ruby-600);
  color: #fff;
}
.link-featured .link-desc {
  color: rgb(255 241 245 / 0.85);
}
.link-featured .link-icon {
  background: #fff;
  color: var(--ruby-500);
  box-shadow: 0 4px 0 var(--ruby-200);
}
.link-featured .link-arrow {
  color: rgb(255 255 255 / 0.75);
}
a.link-featured:hover {
  --edge: var(--ruby-800);
  background: var(--ruby-400);
  border-color: var(--ruby-600);
}
a.link-featured:hover .link-arrow {
  color: #fff;
}

.icon-discord {
  background: var(--discord);
  box-shadow: 0 4px 0 #333b9c;
}
.icon-tiktok {
  background: #111;
  box-shadow: 0 4px 0 #000;
}
.icon-facebook {
  background: #1877f2;
  box-shadow: 0 4px 0 #0c4fa8;
}

/* Belum ada link */
.link-soon {
  opacity: 0.6;
  cursor: not-allowed;
  border-style: dashed;
  box-shadow: none;
}
.link-soon .link-icon {
  background: #b9a7af;
  box-shadow: 0 4px 0 #8e7a83;
}
.badge-soon {
  flex: none;
  padding: 0.2rem 0.5rem;
  border-radius: 0.3rem;
  background: var(--ruby-50);
  color: var(--ruby-700);
  font-family: var(--font-pixel);
  font-size: 0.75rem;
}

/* Pengingat vote 24 jam */
.vote-status {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #047857;
}
.vote-status.wait {
  color: var(--ruby-700);
}
.vote-status b {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.note {
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 0.6rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.note strong {
  color: var(--ink);
}
.note ol {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-family: var(--font-pixel);
  font-weight: 700;
  color: var(--ruby-600);
}
.back:hover {
  color: var(--ruby-800);
}

/* ---------- Footer ---------- */
footer {
  padding: 1.5rem 1rem 2rem;
  border-top: 2px solid var(--line);
  background: #fff;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}
footer a {
  color: var(--ruby-600);
  font-weight: 600;
}

/* Toast "IP disalin" */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.1rem;
  background: #fff;
  border: 2px solid var(--ruby-200);
  border-radius: 0.5rem;
  box-shadow: 0 4px 0 var(--ruby-200), 0 14px 32px -14px rgb(224 17 95 / 0.4);
  font-family: var(--font-pixel);
  font-weight: 700;
  color: var(--ruby-700);
  transform: translate(-50%, 1.5rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Animasi ---------- */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.rise {
  animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--d, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  .logo,
  .rise {
    animation: none;
  }
  .link,
  .ip,
  .toast {
    transition: none;
  }
}
