:root{
  --bg:#0a0f0a;

  --card:rgba(255,255,255,.06);
  --stroke:rgba(255,255,255,.12);

  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.70);

  --leaf:#55d24a;
  --leaf2:#9dff5a;

  --gold:#ffd45a;
  --gold2:#ffb800;

  --orange:#ff8a2a;
  --brown:#6a3a16;
}

.logoimg{
  width:54px;
  height:54px;
  border-radius:16px;
  display:grid;
  place-items:center;
  background:rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.12);
  overflow:hidden;
}

.logoimg img{
  width:100%;
  height:100%;
  object-fit:contain;
  padding:6px;
  image-rendering:auto;
}


*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial;
  color:var(--text);
  background:var(--bg);
}

.bg{
  position:fixed;
  inset:-40vh -40vw;
  background:
    radial-gradient(700px 500px at 22% 22%, rgba(85,210,74,.22), transparent 58%),
    radial-gradient(700px 500px at 78% 28%, rgba(255,212,90,.18), transparent 58%),
    radial-gradient(900px 700px at 50% 90%, rgba(255,138,42,.12), transparent 62%);
  pointer-events:none;
}

.wrap{
  max-width:980px;
  margin:0 auto;
  padding:28px 18px 22px;
  position:relative;
}

.top{
  display:flex;
  gap:14px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  padding:14px 14px 18px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.logo{
  width:44px;
  height:44px;
  border-radius:14px;
  display:grid;
  place-items:center;
  font-weight:800;
  letter-spacing:.5px;
  background:linear-gradient(135deg, rgba(124,92,255,.95), rgba(0,215,255,.85));
  color:#07101a;
}

.brandtext h1{
  margin:0;
  font-size:22px;
  line-height:1.1;
}

.brandtext p{
  margin:3px 0 0;
  color:var(--muted);
  font-size:13px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.04);
  color:var(--text);
  text-decoration:none;
  font-weight:650;
  font-size:13px;
  transition:transform .12s ease, background .12s ease, border-color .12s ease;
}

.btn:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.18);
}

.btn.primary{
  border-color:transparent;
  background:linear-gradient(135deg, rgba(255,212,90,.95), rgba(255,138,42,.90));
  color:#1a1208;
}

.platforms{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  margin-top:10px;
}

@media (min-width:780px){
  .platforms{grid-template-columns:repeat(4, 1fr)}
}

.osbtn{
  width:100%;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.04);
  border-radius:18px;
  padding:14px;
  color:var(--text);
  cursor:pointer;
  text-align:left;
  display:flex;
  flex-direction:column;
  gap:10px;
  transition:transform .14s ease, background .14s ease, border-color .14s ease;
  backdrop-filter: blur(10px);
}

.osbtn:hover{
  transform:translateY(-2px);
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.18);
}

.osicon{
  width:38px;
  height:38px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.10);
}

.osicon svg{
  width:22px;
  height:22px;
  color:rgba(255,255,255,.92);
}

.osname{
  font-weight:800;
  font-size:15px;
  letter-spacing:.2px;
}

.oshint{
  font-size:12.5px;
  color:rgba(255,255,255,.66);
}

.overlay{
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: flex-start; /* tärkeä: ei keskelle */
  padding:
    max(16px, env(safe-area-inset-top))
    12px
    max(16px, env(safe-area-inset-bottom));
  pointer-events: none;
}

.overlay.show{
  display: flex;
  pointer-events: auto;
}

.modal{
  width:min(860px, 100%);
  max-height: 90vh;
  display: flex;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(12,14,25,.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
  transform: translateY(16px) scale(.98);
  opacity:0;
  transition: transform .18s ease, opacity .18s ease;
  flex-direction: column;
  max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom)));
}

.overlay.show .modal{
  transform: translateY(0) scale(1);
  opacity:1;
}

.modalhead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 14px 10px;
}

.modaltitle{
  font-weight:850;
  letter-spacing:.2px;
  font-size:15px;
}

.close{
  width:40px;
  height:40px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:rgba(255,255,255,.85);
  cursor:pointer;
  display:grid;
  place-items:center;
  transition:transform .12s ease, background .12s ease, border-color .12s ease;
}

.close:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.18);
}

.close svg{
  width:18px;
  height:18px;
}

.modalbody {
  padding: 6px 14px 16px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

.modalbody{
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
}

.modalbody::-webkit-scrollbar{
  width: 10px;
}

.modalbody::-webkit-scrollbar-track{
  background: transparent;
}

.modalbody::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.14);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

.modalbody::-webkit-scrollbar-thumb:hover{
  background: rgba(255,255,255,.22);
  border: 3px solid transparent;
  background-clip: padding-box;
}

.section{
  background:rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.10);
  border-radius:18px;
  padding:14px;
  margin-top:12px;
}

.section h3{
  margin:0 0 10px;
  font-size:13px;
  letter-spacing:.3px;
  text-transform:uppercase;
  color:rgba(255,255,255,.86);
}

.steps{
  display:grid;
  gap:10px;
}

.step{
  display:grid;
  grid-template-columns:34px 1fr;
  gap:10px;
  align-items:flex-start;
  padding:10px 10px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.03);
}

.num{
  width:34px;
  height:34px;
  border-radius:14px;
  display:grid;
  place-items:center;
  font-weight:850;
  color:#1a1208;
  background:linear-gradient(135deg, rgba(255,212,90,.95), rgba(85,210,74,.90));
}

.step b{
  display:block;
  font-size:13px;
  margin-bottom:2px;
}

.step span{
  display:block;
  font-size:13px;
  color:rgba(255,255,255,.80);
  line-height:1.45;
}

.mono{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}

.code{
  margin:10px 0 0;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.28);
  overflow:auto;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:12.5px;
  line-height:1.5;
  color:rgba(255,255,255,.92);
}

.note{
  margin-top:12px;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.03);
  color:rgba(255,255,255,.82);
  font-size:13px;
  line-height:1.5;
}

.linkrow{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:10px;
}

.smallbtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:rgba(255,255,255,.90);
  text-decoration:none;
  font-weight:700;
  font-size:13px;
  transition:transform .12s ease, background .12s ease, border-color .12s ease;
}

.smallbtn:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.18);
}

.floatzone{
  margin-top: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  border-radius: 22px;
  padding: 16px;
  overflow: hidden;
}

.floatzone-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  padding: 6px 6px 12px;
}

.floatzone-head h2{
  margin:0;
  font-size:14px;
  letter-spacing:.35px;
  text-transform:uppercase;
  color: rgba(255,255,255,.86);
}

.floatzone-head p{
  margin:0;
  font-size:12.5px;
  color: rgba(255,255,255,.60);
}

.floatfield{
  position: relative;
  height: 520px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(900px 400px at 50% 30%, rgba(255,255,255,.05), transparent 60%),
    radial-gradient(700px 500px at 20% 80%, rgba(85,210,74,.10), transparent 60%),
    radial-gradient(700px 500px at 80% 80%, rgba(255,212,90,.10), transparent 60%),
    rgba(0,0,0,.22);
  overflow: hidden;
}

/* Growtopia-ish item slot (CSS frame, no image needed) */
.gt-slot{
  width: 84px;
  height: 84px;
  border-radius: 12px;
  position: absolute;
  display: grid;
  place-items: center;

  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.18);

  box-shadow:
    0 18px 40px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.20),
    inset 0 -1px 0 rgba(0,0,0,.35);
}

/* inner bevel */
.gt-slot::before{
  content:"";
  position:absolute;
  inset: 7px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    inset 0 -1px 0 rgba(0,0,0,.35);
}

/* subtle top-left highlight + bottom-right shadow like game UI */
.gt-slot::after{
  content:"";
  position:absolute;
  inset: 0;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.18), transparent 40%),
    linear-gradient(315deg, rgba(0,0,0,.25), transparent 45%);
  pointer-events:none;
  mix-blend-mode: normal;
}

.gt-slot img{
  position: relative;
  z-index: 1;
  width: 70px;
  height: 70px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.35));
}

/* Floating behavior */
.float-item{
  transform: translate3d(0,0,0);
  animation:
  will-change: transform;
  position: absolute;
}

/* make it responsive */
@media (max-width: 520px){
  .floatfield{ height: 560px; }
  .gt-slot{ width: 76px; height: 76px; }
  .gt-slot img{ width: 64px; height: 64px; }
}

.floatfield, .floatfield *{
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.gt-slot img{
  pointer-events: none;
}

/* JS moves items with translate, so disable margin-drift animation */
.float-item{
  will-change: transform;
}

.floatfield{ position: relative; }

.floatfield .gt-slot.float-item{
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
}

/* JS controls position via transform on the SLOT */
.float-item{
  position: absolute;
  will-change: transform;
}

/* Float effect on the IMAGE so it doesn’t override JS transform */
.float-item img{
  animation: imgFloat 5.5s ease-in-out infinite;
  will-change: transform;
}

@keyframes imgFloat{
  0%,100%{ transform: translate3d(0,0,0); }
  50%{ transform: translate3d(0,-10px,0); }
}

