:root{
  --bg0:#0b0611;
  --bg1:#16071e;

  --panel: rgba(22, 10, 32, 0.62);
  --panel2: rgba(16, 7, 24, 0.50);

  --stroke: rgba(255,255,255,0.14);
  --stroke2: rgba(255,255,255,0.22);

  --text:#fff3fb;
  --muted: rgba(255,255,255,0.78);

  --accent:#ff59c8;
  --accent2:#b56bff;
  --accent3:#6be4ff;

  --warn:#ff4d6d;

  --radius: 18px;
  --radiusSm: 14px;

  --shadow: 0 22px 70px rgba(0,0,0,0.60);
  --shadow2: 0 14px 34px rgba(0,0,0,0.50);

  --font: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  --heroImg: url("/images/voxel-home-bg.jpg");
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: var(--font);
  color: var(--text);
  overflow-x:hidden;
  position:relative;
  background: linear-gradient(180deg, var(--bg0), var(--bg1));
}

body::before{
  content:"";
  position:fixed;
  inset:-24px;
  z-index:-2;
  background:
    radial-gradient(1200px 800px at 35% 10%, rgba(181,107,255,0.35), transparent 60%),
    radial-gradient(1000px 700px at 80% 20%, rgba(255,89,200,0.25), transparent 60%),
    radial-gradient(900px 700px at 50% 110%, rgba(107,228,255,0.18), transparent 55%),
    var(--heroImg) center / cover no-repeat;
  filter: blur(8px) saturate(1.25) brightness(0.92);
  opacity:0.78;
  transform: scale(1.05);
}

body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  background:
    radial-gradient(900px 520px at 50% 20%, rgba(0,0,0,0.10), transparent 70%),
    radial-gradient(1200px 700px at 50% 110%, rgba(0,0,0,0.45), transparent 65%),
    linear-gradient(180deg, rgba(40,10,60,0.60), rgba(12,6,18,0.86));
  pointer-events:none;
}

.wrap::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  opacity:0.18;
  background-image: radial-gradient(rgba(255,255,255,0.20) 1px, transparent 1px);
  background-size: 22px 22px;
  mix-blend-mode: overlay;
  mask-image: radial-gradient(circle at 50% 20%, black 0%, transparent 70%);
}

.wrap{
  min-height:100%;
  padding: 22px clamp(12px, 2.2vw, 28px) 34px;
}

.shell{
  width: min(1700px, calc(100vw - 2*clamp(12px, 2.2vw, 28px)));
  margin: 0 auto;
  display:grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(620px, 1.7fr) minmax(320px, 1fr);
  gap: 18px;
  align-items:start;
}

@media (min-width: 901px){
  .brand{ grid-column: 1 / -1; grid-row: 1; }
  .updatesCol{ grid-column: 1; grid-row: 2; }
  .mpCol{ grid-column: 2; grid-row: 2; }
  .soloCol{ grid-column: 3; grid-row: 2; }
  .controlsCol{ grid-column: 1 / -1; grid-row: 3; }
  .foot{ grid-column: 1 / -1; grid-row: 4; }
}

@media (max-width: 1100px){
  .shell{ grid-template-columns: 1fr 1fr; }
  .updatesCol{ grid-column: 1 / -1; }
  .controlsCol{ grid-column: 1 / -1; }
}

@media (max-width: 900px){
  .shell{ grid-template-columns: 1fr; }
  .mpCol, .soloCol, .updatesCol, .controlsCol{ grid-column: 1 / -1; }
}

.brand{
  grid-column: 1 / -1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 12px;
  padding: clamp(26px, 5vw, 54px) 6px 10px;
  text-align:center;
}

.title{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 10px;
  min-width: 0;
}

.logoCube{
  width: min(900px, 96vw);
  height: clamp(160px, 24vw, 300px);
  border-radius: 0;
  border: none;
  box-shadow: none;
  overflow: visible;
  background: url("/images/voxel-logo.png") center / contain no-repeat;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,0.55));
  position: relative;
}

h1{
  margin:0;
  font-size: 18px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  line-height: 1.05;
  opacity: 0.92;
}

.subtitle{
  margin: 0;
  font-size: 14px;
  color: rgba(255,255,255,0.82);
  letter-spacing: 0.2px;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0,0,0,0.30);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.82);
  font-size: 12px;
  white-space:nowrap;
  box-shadow: 0 10px 26px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
}

.pill strong{ color: rgba(255,255,255,0.95); font-weight: 750; }

.statusDot{
  display:inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background:#666;
  vertical-align: middle;
  box-shadow: 0 0 14px rgba(0,0,0,0.55);
  flex: 0 0 auto;
}

.panel{
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
  position:relative;
  min-width: 0;
  backdrop-filter: blur(12px) saturate(1.25);
}

.panel::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(900px 240px at 10% 0%, rgba(255,89,200,0.20), transparent 60%),
    radial-gradient(900px 240px at 90% 0%, rgba(181,107,255,0.22), transparent 60%);
  opacity:0.9;
}

.panelHeader{
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  position:relative;
  min-width: 0;
}

.panelHeader h2{
  margin:0;
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
  white-space: nowrap;
}

.hint{
  font-size: 12px;
  color: rgba(255,255,255,0.76);
  white-space: nowrap;
}

.panelBody{
  padding: 14px 16px 16px;
  position:relative;
  min-width: 0;
}

.row{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap:wrap;
}

input, select{
  appearance:none;
  -webkit-appearance:none;
  font-family: var(--font);
  color: rgba(255,255,255,0.92);
  background: rgba(0,0,0,0.30);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 14px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s ease, transform .08s ease, background .15s ease;
  min-width: 0;
}

input::placeholder{ color: rgba(255,255,255,0.45); }

input:focus, select:focus{
  border-color: rgba(255,89,200,0.55);
  background: rgba(0,0,0,0.36);
}

a{
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  font-weight: 800;
}

a:hover{ text-decoration: underline; }

button{
  font-family: var(--font);
  border: none;
  border-radius: 14px;
  padding: 10px 14px;
  cursor:pointer;
  font-weight: 850;
  letter-spacing: 0.2px;
  color: #120614;
  background: linear-gradient(180deg, rgba(255, 134, 221, 1), rgba(181, 107, 255, 1));
  box-shadow: 0 12px 22px rgba(0,0,0,0.38);
  transition: transform .08s ease, filter .15s ease, box-shadow .15s ease;
}

button:hover{
  filter: brightness(1.03);
  box-shadow: 0 16px 28px rgba(0,0,0,0.42);
}

button:active{ transform: translateY(1px) scale(0.99); }

.btnSecondary{
  background: rgba(0,0,0,0.28) !important;
  color: rgba(255,255,255,0.92) !important;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 10px 18px rgba(0,0,0,0.32);
}

.btnSecondary:hover{
  background: rgba(0,0,0,0.34) !important;
  border-color: rgba(255,255,255,0.26);
}

.btnDanger{
  background: linear-gradient(180deg, rgba(255, 110, 140, 1), rgba(255, 77, 109, 1)) !important;
  color: #16060c !important;
}

#worldList .world-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 12px 12px;
  margin: 10px 0;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.22);
}

#worldList .world-row:hover{
  border-color: rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.28);
}

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

.ctrlLine{
  display:flex;
  justify-content:space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.20);
  font-size: 13px;
}

.ctrlKey{
  font-weight: 900;
  color: rgba(255,255,255,0.92);
  white-space: nowrap;
}

.ctrlVal{
  color: rgba(255,255,255,0.75);
  text-align:right;
  white-space: nowrap;
}

.note{
  margin-top: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
  color: rgba(255,255,255,0.78);
  font-size: 12px;
  line-height: 1.4;
}

.note strong{ color: rgba(255,255,255,0.95); }

.subhead{
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.84);
}

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

.chip{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.20);
  color: rgba(255,255,255,0.78);
  font-size: 12px;
  white-space: nowrap;
}

.chipDot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(107,228,255,0.95);
  box-shadow: 0 0 14px rgba(107,228,255,0.35);
}

.updatesList{
  display:flex;
  flex-direction:column;
  gap: 10px;
  margin-top: 2px;
}

.updateItem{
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.20);
  border-radius: 16px;
  padding: 12px 12px;
}

.updateTop{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.updateTitle{
  font-weight: 900;
  letter-spacing: 0.2px;
  color: rgba(255,255,255,0.93);
  font-size: 13px;
  line-height: 1.15;
}

.updateDate{
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  white-space:nowrap;
}

.updateBody{
  font-size: 12px;
  color: rgba(255,255,255,0.78);
  line-height: 1.4;
  overflow-wrap: break-word;
}

.foot{
  grid-column: 1 / -1;
  text-align:center;
  font-size: 12px;
  color: rgba(255,255,255,0.62);
  padding: 10px 0 0;
}

label{
  color: rgba(255,255,255,0.88);
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.mpTopRow{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap:wrap;
  margin-bottom: 12px;
}

#mpName{ flex: 1 1 260px; min-width: 240px; }

.liveMapLink{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.24);
  color: rgba(255,255,255,0.92);
  font-weight: 900;
  text-decoration:none;
  white-space: nowrap;
  box-shadow: 0 10px 18px rgba(0,0,0,0.28);
}

.liveMapLink:hover{
  border-color: rgba(255,255,255,0.26);
  background: rgba(0,0,0,0.30);
  text-decoration:none;
}

.serverTableContainer{
  margin: 16px 0;
  border-radius: var(--radiusSm);
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.18);
  overflow: hidden;
  max-width: 100%;
}

.serverTable{
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.serverTableHeader{
  background: rgba(0, 0, 0, 0.28);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.serverTableHeader th{
  padding: 14px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
}

.serverTableRow{
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background-color 0.15s ease;
}

.serverTableRow:hover{ background: rgba(255, 255, 255, 0.03); }
.serverTableRow:last-child{ border-bottom: none; }

.serverTableRow td{
  padding: 14px 16px;
  vertical-align: middle;
  word-break: normal;
  overflow-wrap: normal;
}

.serverName{
  font-weight: 950;
  font-size: 14px;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
}

.serverDesc{
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.4;
  overflow-wrap: break-word;
}

.statusIndicator{
  display:flex;
  align-items:center;
  gap: 10px;
  white-space: nowrap;
}

.statusText{
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
}

.connectBtn{
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.4px;
  border: none;
  border-radius: 12px;
  color: #120614;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  max-width: 170px;
  white-space: nowrap;
  background: linear-gradient(180deg, rgba(255, 134, 221, 1), rgba(181, 107, 255, 1));
  box-shadow: 0 12px 22px rgba(0,0,0,0.38);
}

.connectBtn:hover{
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(0,0,0,0.42);
}

.connectBtn:active{
  transform: translateY(0);
  filter: brightness(0.98);
}

@media (max-width: 720px){
  .serverTableHeader{ display:none; }

  .serverTable,
  .serverTable tbody,
  .serverTable tr,
  .serverTable td{
    display:block;
    width:100%;
  }

  .serverTableRow{
    padding: 12px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .serverTableRow td{
    padding: 8px 0;
    border: none;
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap: 12px;
  }

  .serverTableRow td::before{
    content: attr(data-label);
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.70);
    flex: 0 0 auto;
    max-width: 40%;
  }

  .serverTableRow td > *{
    min-width: 0;
    text-align: right;
  }

  .serverTableRow td[data-label="Server"],
  .serverTableRow td[data-label="Description"]{
    display:block;
  }

  .serverTableRow td[data-label="Server"]::before,
  .serverTableRow td[data-label="Description"]::before{
    display:none;
  }

  .serverTableRow td[data-label="Action"]{
    display:block;
    padding-top: 10px;
  }

  .serverTableRow td[data-label="Action"]::before{ display:none; }

  .connectBtn{
    max-width:none;
    width:100%;
  }

  .statusIndicator{ justify-content:flex-end; }
  .serverName{ white-space: normal; }
}

.skinSection{
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.skinContainer{
  display:flex;
  flex-wrap:wrap;
  gap: 20px;
  align-items:flex-start;
  margin-top: 10px;
}

.skinInputContainer{
  flex: 1 1 380px;
  min-width: 280px;
}

.skinPreviewContainer{
  flex: 0 0 auto;
  width: 220px;
  height: 260px;
  border-radius: var(--radiusSm);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.18);
  overflow:hidden;
  position:relative;
}

#mpSkinPreview{
  width: 100%;
  height: 100%;
  display:block;
}

.skinPreviewLabel{
  position:absolute;
  top:10px;
  left:10px;
  font-size:12px;
  color: rgba(255,255,255,0.78);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  pointer-events:none;
}

.heroRow{
  width: 100%;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(360px, 920px) minmax(260px, 1fr);
  gap: 18px;
  align-items: center;
  justify-items: center;
}

.heroStat{
  width: 100%;
  max-width: 560px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  min-width: 0;
}

.heroStatMain{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.heroStatSide{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.heroStatLeft{ justify-self: start; }
.heroStatRight{ justify-self: end; }

.heroStatIcon{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  flex: 0 0 auto;
}

.heroStatText{ min-width: 0; }
.heroStatTextRight{ text-align: right; }

.heroStatLabel{
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.88);
  line-height: 1.1;
}

.heroStatSub{
  margin-top: 3px;
  font-size: 12px;
  color: rgba(255,255,255,0.70);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.heroStatValue{
  font-size: 28px;
  font-weight: 1000;
  letter-spacing: 0.6px;
  line-height: 1;
  padding-left: 8px;
  flex: 0 0 auto;
  text-align: right;
}

.heroStatValuePlayers{ color: var(--accent); }
.heroStatValueDiscord{ color: var(--accent2); }

.discordJoinBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.22);
  color: rgba(255,255,255,0.92);
  font-weight: 950;
  letter-spacing: 0.2px;
  text-decoration:none;
  white-space: nowrap;
  box-shadow: 0 10px 18px rgba(0,0,0,0.26);
}

.discordJoinBtn:hover{
  border-color: rgba(255,255,255,0.28);
  background: rgba(0,0,0,0.28);
  text-decoration:none;
}

.heroRow .title{ width: 100%; }
.heroRow .logoCube{
  width: 100%;
  height: clamp(160px, 22vw, 280px);
}

@media (max-width: 900px){
  .heroRow{
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .heroStat{
    max-width: 680px;
    justify-content: space-between;
  }
  .heroStatRight,
  .heroStatLeft{
    justify-self: center;
  }
  .heroStatTextRight{ text-align: center; }
  .heroStatSide{ align-items:center; }
  .heroStatSub{ max-width: 420px; }
}

.heroIconImg{
  width: 22px;
  height: 22px;
  display:block;
  object-fit: contain;
  image-rendering: pixelated;
}

.heroStatRight .heroIconImg{
  image-rendering: auto;
}

.heroStatRight .heroStatIcon{
  padding: 6px;
}

.installBtn{
  margin-left: 10px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.installBtn:hover{
  background: rgba(255,255,255,.10);
}
