:root{
  --bg-0:#0c1016;
  --bg-1:#12181f;
  --panel:rgba(26,34,44,0.82);
  --stone:#2b3038;
  --stone-dark:#171b20;
  --ink:#eef2f5;
  --ink-dim:#8b96a3;
  --pro:#55c8ff;
  --legend:#ff4d4d;
  --gold:#f0c14b;
  --ok:#8fff66;
  --off:#ff6b6b;
  --lava:#ff5a1f;
  --lava-hot:#ffb347;
  --ember:#ff7a3a;
  --end-void:#0b0614;
  --end-mist:#2a1a3a;
  --end-glow:#c9b3ff;
  --end-stone:#d9c98c;
  --chorus:#9b6cff;
  --twitch:#9146ff;
  --youtube:#ff3b3b;
  --discord:#5865f2;
}

*{box-sizing:border-box;margin:0;padding:0;}

html{scroll-behavior:smooth;}

body{
  min-height:100vh;
  color:var(--ink);
  font-family:'VT323', monospace;
  font-size:22px;
  background:var(--bg-0);
  overflow-x:hidden;
}

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

.pixel{font-family:'Press Start 2P', monospace;}

.brand{
  font-family:'Press Start 2P', monospace;
  font-size:clamp(16px, 3vw, 24px);
  letter-spacing:1px;
  line-height:1.7;
  text-align:center;
}
.home-center .brand{
  font-size:clamp(28px, 5.2vw, 48px);
  letter-spacing:2px;
  line-height:1.25;
  margin:0;
}
.brand .borrel{color:var(--pro);}
.brand .buurt{color:var(--legend);}

.wrap{
  position:relative;
  z-index:2;
  width:min(920px, 100%);
  margin:0 auto;
  padding:48px 20px 72px;
}
.home-center{text-align:center;}

.fade-up{animation:fadeUp 0.85s ease both;}
.fade-up-delay{animation:fadeUp 0.9s 0.12s ease both;}
.fade-up-delay-2{animation:fadeUp 0.95s 0.24s ease both;}

@keyframes fadeUp{
  from{opacity:0;transform:translateY(16px);}
  to{opacity:1;transform:translateY(0);}
}

/* atmosphere base */
.sky{
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:
    radial-gradient(ellipse 900px 500px at 50% 0%, rgba(85,200,255,0.08), transparent 60%),
    radial-gradient(ellipse 700px 450px at 100% 100%, rgba(255,77,77,0.07), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0 2px, transparent 2px 4px),
    var(--bg-0);
}

.back-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--ink-dim);
  font-size:20px;
  margin-bottom:28px;
  transition:color 0.15s ease;
}
.back-link:hover{color:var(--ink);}
.back-link::before{content:"←";color:var(--gold);}
.back-link::after{
  content:"Esc";
  margin-left:8px;
  padding:1px 6px;
  border:2px solid var(--stone);
  background:rgba(0,0,0,0.25);
  color:var(--ink-dim);
  font-family:'VT323', monospace;
  font-size:15px;
  letter-spacing:0.5px;
}

/* buttons */
.nav-row{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:14px;
  margin-top:28px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-width:160px;
  padding:16px 22px;
  font-family:'Press Start 2P', monospace;
  font-size:11px;
  line-height:1.4;
  letter-spacing:0.5px;
  color:var(--ink);
  background:var(--panel);
  border:3px solid var(--stone-dark);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.06),
    0 5px 0 rgba(0,0,0,0.35);
  transition:transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.btn:hover{
  transform:translateY(-2px);
  border-color:var(--gold);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.08),
    0 7px 0 rgba(0,0,0,0.35);
}
.btn:active{
  transform:translateY(2px);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.04),
    0 2px 0 rgba(0,0,0,0.35);
}
.btn.is-selected,
.btn:focus-visible{
  border-color:var(--gold);
  color:var(--gold);
  outline:none;
  transform:translateY(-2px);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.08),
    0 0 0 2px rgba(240,193,75,0.2),
    0 7px 0 rgba(0,0,0,0.35);
}
.btn .btn-icon{
  width:16px;
  height:16px;
  flex-shrink:0;
}
.btn-discord{min-width:220px;}

.menu-hint{
  margin-top:14px;
  text-align:center;
  color:var(--ink-dim);
  font-size:17px;
}
.menu-hint kbd{
  display:inline-block;
  padding:1px 6px;
  margin:0 2px;
  border:2px solid var(--stone);
  background:rgba(0,0,0,0.25);
  color:var(--ink);
  font:inherit;
  font-size:16px;
}

/* status */
.status-block{
  display:flex;
  justify-content:center;
  margin:12px 0 2px;
}

.status-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 14px;
  background:var(--panel);
  border:3px solid var(--stone-dark);
  box-shadow:0 4px 0 rgba(0,0,0,0.3);
  font-size:20px;
  color:var(--ink-dim);
}

.status-dot{
  width:10px;
  height:10px;
  background:var(--ink-dim);
  box-shadow:2px 2px 0 rgba(0,0,0,0.4);
  flex-shrink:0;
}
.status-pill.is-online .status-dot{background:var(--ok);}
.status-pill.is-offline .status-dot{background:var(--off);}
.status-pill.is-online{color:var(--ink);}
.status-sep{color:var(--ink-dim);}
.status-count{color:var(--ink);}
.status-count b{color:var(--gold);font-weight:400;}

/* IP blocks */
.ip-stack{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-top:28px;
  width:100%;
  max-width:720px;
  margin-left:auto;
  margin-right:auto;
}

.ip-card{
  width:100%;
  text-align:center;
  background:var(--panel);
  border:3px solid var(--stone-dark);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.05),
    0 5px 0 rgba(0,0,0,0.35);
  padding:20px 14px 16px;
  cursor:pointer;
  transition:border-color 0.15s ease, transform 0.12s ease;
  font:inherit;
  color:inherit;
}
.ip-card:hover{
  border-color:var(--pro);
  transform:translateY(-1px);
}
.ip-card:focus-visible,
.ip-card.is-selected{
  outline:none;
  border-color:var(--gold);
  transform:translateY(-1px);
}
.ip-card.is-copied{border-color:var(--ok);}

.ip-label{
  font-family:'Press Start 2P', monospace;
  font-size:10px;
  color:var(--gold);
  letter-spacing:1px;
  margin-bottom:12px;
}

.ip-value{
  font-family:'Press Start 2P', monospace;
  font-size:clamp(10px, 2.2vw, 14px);
  line-height:1.55;
  color:var(--ink);
  word-break:break-all;
}

.ip-hint{
  margin-top:10px;
  font-size:17px;
  color:var(--ink-dim);
}
.ip-card.is-copied .ip-hint{color:var(--ok);}

.ip-card.secondary .ip-value{color:var(--ink-dim);}
.ip-card.secondary:hover{border-color:var(--ink-dim);}

.panel{
  background:var(--panel);
  border:3px solid var(--stone-dark);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.05),
    0 5px 0 rgba(0,0,0,0.35);
  padding:28px 26px;
}

.page-title{
  font-family:'Press Start 2P', monospace;
  font-size:clamp(18px, 4vw, 28px);
  line-height:1.55;
  text-align:center;
  margin:12px 0 16px;
}

.lead{
  text-align:center;
  color:var(--ink-dim);
  font-size:clamp(20px, 3vw, 26px);
  line-height:1.35;
  max-width:520px;
  margin:0 auto;
}
.lead b{color:var(--ink);font-weight:400;}

/* creators */
.home-shell{
  position:relative;
  z-index:2;
  min-height:100vh;
  display:grid;
  grid-template-columns:minmax(160px, 220px) minmax(0, 760px) minmax(160px, 220px);
  gap:18px;
  align-items:center;
  width:min(1280px, 100%);
  margin:0 auto;
  padding:20px 16px 28px;
}

.home-shell .wrap{
  width:100%;
  padding:8px 12px 12px;
}

.creator{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  text-align:center;
  animation:fadeUp 0.95s 0.18s ease both;
}

.creator-skin{
  width:min(160px, 100%);
  height:auto;
  image-rendering:pixelated;
  filter:drop-shadow(0 10px 0 rgba(0,0,0,0.35));
  animation:idleBob 3s ease-in-out infinite;
}

.creator.right .creator-skin{animation-delay:0.4s;}

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

.creator-name{
  font-family:'Press Start 2P', monospace;
  font-size:11px;
  line-height:1.5;
  color:var(--ink);
}

.creator-role{
  font-size:17px;
  color:var(--ink-dim);
  margin-top:-4px;
}

.live-badges{
  display:flex;
  flex-direction:column;
  gap:6px;
  width:100%;
  min-height:0;
}
.live-badges[hidden]{display:none !important;}

.live-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
  padding:8px 10px;
  border:3px solid #7a1414;
  background:rgba(255,77,77,0.12);
  box-shadow:0 4px 0 rgba(0,0,0,0.3);
  font-family:'Press Start 2P', monospace;
  font-size:8px;
  letter-spacing:0.3px;
  color:#ffb4b4;
  animation:livePulse 1.6s ease-in-out infinite;
}
.live-pill.twitch{border-color:var(--twitch);color:#d2b6ff;background:rgba(145,70,255,0.14);}
.live-pill.youtube{border-color:var(--youtube);color:#ffb0b0;background:rgba(255,59,59,0.12);}
.live-pill:hover,
.live-pill.is-selected,
.live-pill:focus-visible{
  outline:none;
  transform:translateY(-1px);
  color:var(--ink);
}
.live-dot{
  width:8px;height:8px;
  background:var(--off);
  box-shadow:0 0 8px rgba(255,77,77,0.7);
}
.live-pill.twitch .live-dot{background:var(--twitch);box-shadow:0 0 8px rgba(145,70,255,0.7);}
.live-pill.youtube .live-dot{background:var(--youtube);}

@keyframes livePulse{
  0%,100%{filter:brightness(1);}
  50%{filter:brightness(1.15);}
}

.creator.is-live .creator-skin{
  filter:drop-shadow(0 10px 0 rgba(0,0,0,0.35)) drop-shadow(0 0 12px rgba(255,77,77,0.35));
}

.live-debug{
  position:fixed;
  left:12px;
  bottom:12px;
  z-index:20;
  width:min(280px, calc(100vw - 24px));
  padding:12px;
  background:rgba(12,16,22,0.92);
  border:3px solid var(--stone-dark);
  box-shadow:0 6px 0 rgba(0,0,0,0.35);
  text-align:left;
}
.live-debug[hidden]{display:none !important;}
.live-debug-title{
  font-family:'Press Start 2P', monospace;
  font-size:9px;
  color:var(--gold);
  margin-bottom:10px;
}
.live-debug-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
}
.live-debug-btn{
  padding:8px 6px;
  border:2px solid var(--stone);
  background:var(--panel);
  color:var(--ink-dim);
  font-family:'Press Start 2P', monospace;
  font-size:7px;
  line-height:1.35;
  cursor:pointer;
}
.live-debug-btn.is-on{
  border-color:var(--ok);
  color:var(--ok);
}
.live-debug-reset{
  width:100%;
  margin-top:8px;
  padding:8px;
  border:2px solid var(--stone);
  background:transparent;
  color:var(--ink-dim);
  font-family:'Press Start 2P', monospace;
  font-size:8px;
  cursor:pointer;
}
.live-debug-reset:hover{border-color:var(--gold);color:var(--gold);}

.socials{
  display:flex;
  flex-direction:column;
  gap:8px;
  width:100%;
  margin-top:4px;
}

.social-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
  padding:10px 12px;
  background:var(--panel);
  border:3px solid var(--stone-dark);
  box-shadow:0 4px 0 rgba(0,0,0,0.3);
  font-family:'Press Start 2P', monospace;
  font-size:9px;
  letter-spacing:0.3px;
  color:var(--ink);
  transition:transform 0.12s ease, border-color 0.12s ease;
}
.social-btn:hover,
.social-btn.is-selected,
.social-btn:focus-visible{
  transform:translateY(-1px);
  border-color:var(--gold);
  outline:none;
  color:var(--gold);
}
.social-btn svg{
  width:15px;
  height:15px;
  flex-shrink:0;
}
.social-btn.twitch:hover,
.social-btn.twitch.is-selected{border-color:var(--twitch);color:#c4a6ff;}
.social-btn.youtube:hover,
.social-btn.youtube.is-selected{border-color:var(--youtube);color:#ff8b8b;}
.social-btn.discord:hover,
.social-btn.discord.is-selected{border-color:var(--discord);color:#aab1ff;}

/* villager shop stall */
.shop-stall{
  --emerald:#3dcf6a;
  --awning:#c41e2a;
  --wood:#8b5a2b;
  --wood-dark:#5c3a1a;
  display:block;
  width:100%;
  max-width:420px;
  margin:22px auto 0;
  padding:18px 16px 14px;
  text-align:center;
  background:linear-gradient(180deg, rgba(40,28,18,0.55), rgba(20,16,12,0.7));
  border:3px solid var(--wood-dark);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.05),
    0 6px 0 rgba(0,0,0,0.35);
  cursor:pointer;
  transition:border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  animation:fadeUp 1s 0.28s ease both;
}
.shop-stall:hover,
.shop-stall.is-selected,
.shop-stall:focus-visible{
  border-color:var(--emerald);
  outline:none;
  transform:translateY(-3px);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.07),
    0 0 0 2px rgba(61,207,106,0.18),
    0 9px 0 rgba(0,0,0,0.35);
}

.shop-speech{
  position:relative;
  display:inline-block;
  margin-bottom:10px;
  padding:8px 12px;
  background:#1a1410;
  border:2px solid var(--wood);
  color:var(--ink);
  font-size:18px;
  opacity:0;
  transform:translateY(6px) scale(0.96);
  transition:opacity 0.2s ease, transform 0.2s ease;
}
.shop-speech::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-8px;
  width:10px;height:10px;
  background:#1a1410;
  border-right:2px solid var(--wood);
  border-bottom:2px solid var(--wood);
  transform:translateX(-50%) rotate(45deg);
}
.shop-stall:hover .shop-speech,
.shop-stall.is-selected .shop-speech,
.shop-stall:focus-visible .shop-speech{
  opacity:1;
  transform:translateY(0) scale(1);
}

.shop-stage{
  position:relative;
  height:120px;
  margin:0 auto 8px;
  display:flex;
  align-items:flex-end;
  justify-content:center;
}

.shop-art{
  width:168px;
  height:112px;
  image-rendering:pixelated;
}
.shop-art svg{width:100%;height:100%;display:block;}

.shop-villager{
  animation:villagerBob 2.4s ease-in-out infinite;
  transform-origin:center bottom;
}
.shop-stall:hover .shop-villager,
.shop-stall.is-selected .shop-villager{
  animation-duration:1.2s;
}

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

.shop-emeralds{
  position:absolute;
  inset:0;
  pointer-events:none;
  overflow:hidden;
}
.shop-emerald{
  position:absolute;
  width:6px;height:6px;
  background:var(--emerald);
  box-shadow:0 0 6px rgba(61,207,106,0.7);
  opacity:0;
}
.shop-stall:hover .shop-emerald,
.shop-stall.is-selected .shop-emerald{
  animation:emeraldPop 1.6s ease-in-out infinite;
}
.shop-emerald:nth-child(1){left:18%;bottom:30%;animation-delay:0s;}
.shop-emerald:nth-child(2){left:72%;bottom:38%;animation-delay:0.35s;}
.shop-emerald:nth-child(3){left:50%;bottom:55%;animation-delay:0.7s;}

@keyframes emeraldPop{
  0%{opacity:0;transform:translateY(8px) scale(0.6);}
  30%{opacity:1;}
  100%{opacity:0;transform:translateY(-28px) scale(1);}
}

.shop-cta{
  font-family:'Press Start 2P', monospace;
  font-size:11px;
  letter-spacing:0.5px;
  color:var(--emerald);
  margin-top:4px;
}
.shop-sub{
  margin-top:6px;
  font-size:17px;
  color:var(--ink-dim);
}
.shop-sub kbd{
  display:inline-block;
  padding:1px 6px;
  margin:0 2px;
  border:2px solid var(--stone);
  background:rgba(0,0,0,0.25);
  color:var(--ink);
  font:inherit;
  font-size:15px;
}

@media (max-width:980px){
  .home-shell{
    grid-template-columns:1fr 1fr;
    gap:20px 16px;
    padding-top:28px;
  }
  .home-center{
    grid-column:1 / -1;
    order:-1;
  }
  .ip-stack{grid-template-columns:1fr;}
  .btn{min-width:140px;}
  .nav-row .btn{flex:1 1 140px;}
}

@media (max-width:700px){
  .wrap{padding:20px 8px 40px;}
  .home-shell{
    grid-template-columns:1fr;
    padding:24px 12px 40px;
  }
  .btn{width:100%;}
}
