:root{
  --bg: #0B1220;
  --bg2:#070C16;

  --text: #E9EEF8;
  --muted: rgba(233,238,248,0.70);

  --panel: rgba(0,0,0,0.22);
  --border: rgba(255,255,255,0.10);
  --border2: rgba(255,255,255,0.08);

  --good: #22C55E;
  --bad:  #EF4444;
  --warn: #F59E0B;

  --radius: 16px;
  --shadow: 0 16px 55px rgba(0,0,0,0.55);
}

*{ box-sizing:border-box; }
html, body{ height:100%; }

body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 700px at 15% 15%, rgba(34,197,94,0.10), transparent 60%),
    radial-gradient(900px 700px at 85% 45%, rgba(14,165,233,0.06), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2));
}

#particles-container{
  position: fixed;
  inset: 0;
  z-index: -1;
}

/* center */
.shell{
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px 16px;
}

.panel{
  width: min(980px, 100%);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 16px 16px 14px;
}

/* header */
.top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 6px 4px 14px;
  border-bottom: 1px solid var(--border2);
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width:0;
}

.logo{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
}

.titles{ min-width:0; }

.name{
  font-weight: 800;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}

.sub{
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}

/* overall status */
.status{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 999px;
  background: rgba(0,0,0,0.18);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.35);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.08);
}
.dot.ok{ background: var(--good); box-shadow: 0 0 0 4px rgba(34,197,94,0.18); }
.dot.bad{ background: var(--bad);  box-shadow: 0 0 0 4px rgba(239,68,68,0.18); }

/* MOTD compact */
.motd{
  margin-top: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,0.03);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 14px;
}

.motd-left{ min-width:0; }
.motd-title{
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.1px;
  margin-bottom: 4px;
  color: rgba(233,238,248,0.90);
}
.motd-message{
  font-size: 13px;
  line-height: 1.5;
  color: rgba(233,238,248,0.72);
  overflow:hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.motd-right{
  display:flex;
  flex-direction: column;
  align-items:flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.motd-date{
  font-size: 12px;
  color: rgba(233,238,248,0.55);
  white-space: nowrap;
}

.motd-badge{
  display:none;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .35px;
  color: rgba(233,238,248,0.78);
}

.motd.is-loading{ opacity: .92; }
.motd.is-error{ border-color: rgba(239,68,68,0.18); }

/* metrics */
.grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 4px 8px;
}

@media (max-width: 860px){
  .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px){
  .grid{ grid-template-columns: 1fr; }
  .status{ display:none; }
  .motd{ flex-direction: column; }
  .motd-right{ align-items:flex-start; }
}

.item{
  border: 1px solid var(--border2);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  padding: 12px 12px;
}

.k{
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.v{
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}

/* section title */
.section-title{
  margin-top: 10px;
  padding: 10px 4px 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .35px;
  text-transform: uppercase;
  color: rgba(233,238,248,0.78);
}

/* services: flatter + more readable */
.services{
  padding: 0 4px 2px;
  display:flex;
  flex-direction: column;
  gap: 8px;
}

.service{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,0.03);
}

.service-left{ min-width:0; }
.service-name{
  font-size: 13px;
  font-weight: 700;
  color: rgba(233,238,248,0.88);
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}
.service-desc{
  margin-top: 2px;
  font-size: 12px;
  color: rgba(233,238,248,0.56);
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}

.service-right{
  display:flex;
  align-items:center;
  gap: 10px;
}

.svc-meta{
  font-size: 12px;
  color: rgba(233,238,248,0.55);
  min-width: 56px;
  text-align: right;
}

.badge{
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
  color: rgba(233,238,248,0.70);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.ok{ border-color: rgba(34,197,94,0.25); color: rgba(233,238,248,0.85); }
.badge.bad{ border-color: rgba(239,68,68,0.25); color: rgba(233,238,248,0.85); }
.badge.warn{ border-color: rgba(245,158,11,0.30); color: rgba(233,238,248,0.85); }
.badge.unknown{ opacity: .85; }

/* footer */
.foot{
  display:flex;
  justify-content:space-between;
  gap: 10px;
  padding: 12px 4px 2px;
  color: rgba(233,238,248,0.55);
  font-size: 12px;
}
.muted{ color: rgba(233,238,248,0.55); }

/* right side header grouping */
.top-right{
  display:flex;
  align-items:center;
  gap: 10px;
}

/* actions pills */
.actions{
  display:flex;
  align-items:center;
  gap: 8px;
}

/* custom pill button (matches status pill) */
.action-btn{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
  color: rgba(233,238,248,0.78);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
}

.action-btn i{ font-size: 14px; opacity: .95; }

.action-btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.18);
  color: rgba(233,238,248,0.92);
  text-decoration: none;
}

.action-btn:active{ transform: translateY(0); }

/* subtle colored accents (not ugly neon) */
.action-btn.rockstar{
  border-color: rgba(245,158,11,0.28);
}
.action-btn.rockstar i{
  color: rgba(245,158,11,0.95);
}

.action-btn.discord{
  border-color: rgba(99,102,241,0.28);
}
.action-btn.discord i{
  color: rgba(99,102,241,0.95);
}

/* responsive: hide text on small screens, keep icons */
@media (max-width: 560px){
  .action-btn span{ display:none; }
  .action-btn{ padding: 0 10px; }
}

/* ======================================================
   Active action button (clean + safe)
====================================================== */

.action-btn.is-active{
  background: rgba(0,170,37,0.18);
  border-color: rgba(0,170,37,0.85);
  color: rgba(255,255,255,0.95);
  box-shadow:
    0 0 0 4px rgba(0,170,37,0.18),
    0 12px 32px rgba(0,170,37,0.22);
}

.action-btn.is-active i{
  color: rgba(255,255,255,0.95);
}

/* active hover bleibt grün, aber nicht aggressiv */
.action-btn.is-active:hover{
  background: rgba(0,170,37,0.22);
  border-color: rgba(0,170,37,1);
  color: rgba(255,255,255,0.98);
  transform: translateY(-1px);
}



/* ======================================================
   Action Button: Changelog
====================================================== */

.action-btn.changelog{
  --accent: 0, 170, 37; /* zmt green */
}

/* Hover */
.action-btn.changelog:hover{
  border-color: rgba(var(--accent), .55);
  background: rgba(var(--accent), .12);
}

/* Active (current page) */
.action-btn.changelog.is-active{
  border-color: rgba(var(--accent), .75);
  background: rgba(var(--accent), .18);
  color: #eaffef;
  box-shadow: 0 0 0 4px rgba(var(--accent), .08);
}

/* =========================================
   HEADER STACKED (fix positioning)
========================================= */
.top.top-stacked{
  display:flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 8px 4px 14px; /* etwas mehr luft oben */
  border-bottom: 1px solid var(--border2);
}

/* row 1: brand + badge */
.top.top-stacked .top-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  min-width: 0;
}

.top.top-stacked .brand{
  flex: 1 1 auto;
  min-width: 0;
}

/* badge darf niemals schrumpfen */
.top.top-stacked .zmt-badge{
  flex: 0 0 auto;
  align-self: center;
}

/* row 2: actions */
.top.top-stacked .actions.actions-under{
  display:flex;
  align-items:center;
  gap: 8px;
  flex-wrap: wrap;

  padding-top: 10px;                 /* klare 2te reihe */
  border-top: 1px solid var(--border2);
}

/* mobile layout */
@media (max-width: 680px){
  .top.top-stacked .top-row{
    align-items: flex-start;
  }
  .top.top-stacked .zmt-badge{
    display:none; /* du wolltest das eh auf klein */
  }
  .top.top-stacked .actions.actions-under{
    padding-top: 8px;
  }
}

/* =========================================
   ZMT BADGE (cleaner + better centered)
========================================= */
.zmt-badge{
  width: 240px;
  height: 54px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;

  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.10);

  box-shadow:
    0 14px 40px rgba(0,0,0,0.45),
    inset 0 0 0 1px rgba(0,170,37,0.07);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  transform: translateZ(0); /* fixes shimmer */
}

.zmt-badge-inner{
  position:absolute;
  inset: 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 0 14px;
}

.zmt-badge-text{
  position: relative;
  z-index: 3;
  line-height: 1.05;
}

.zmt-badge-top{
  font-weight: 950;
  letter-spacing: .18em;
  font-size: 12px;
  color: rgba(233,238,248,0.92);
}

.zmt-badge-sub{
  margin-top: 6px;
  font-weight: 800;
  font-size: 12px;
  color: rgba(233,238,248,0.62);
}

/* animated grid (slower + less noisy) */
.zmt-badge::before{
  content:"";
  position:absolute;
  inset:-35%;
  background:
    linear-gradient(rgba(0,170,37,0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,170,37,0.09) 1px, transparent 1px);
  background-size: 18px 18px;
  transform: rotate(12deg);
  animation: zmtGrid 9s linear infinite;
  opacity: .45;
}

@keyframes zmtGrid{
  from { transform: translate3d(0,0,0) rotate(12deg); }
  to   { transform: translate3d(140px,80px,0) rotate(12deg); }
}

/* edge sweep (shorter + cleaner) */
.zmt-badge::after{
  content:"";
  position:absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 0%,
    rgba(0,170,37,0.00) 38%,
    rgba(0,170,37,0.28) 50%,
    rgba(0,170,37,0.00) 62%,
    transparent 100%
  );
  transform: translateX(-140%);
  animation: zmtSweep 3.2s ease-in-out infinite;
  opacity: .95;
}

@keyframes zmtSweep{
  0%   { transform: translateX(-140%); }
  40%  { transform: translateX(140%); }
  100% { transform: translateX(140%); }
}

/* spark (smaller + subtle) */
.zmt-badge-spark{
  position:absolute;
  right: -18px;
  top: -18px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,170,37,0.22), transparent 62%);
  animation: zmtSpark 5.5s ease-in-out infinite;
  opacity: .85;
}

@keyframes zmtSpark{
  0%,100% { transform: translate(0,0); }
  50%     { transform: translate(-18px, 10px); }
}

/* tiny hover parallax (optional but cool) */
@media (hover:hover){
  .zmt-badge{
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  }
  .zmt-badge:hover{
    transform: translateY(-1px);
    border-color: rgba(0,170,37,0.22);
    box-shadow:
      0 18px 55px rgba(0,0,0,0.55),
      inset 0 0 0 1px rgba(0,170,37,0.10);
  }
}

/* ======================================================
   Admin button accent (Header)
   ====================================================== */

.action-btn.admin{
  border-color: rgba(239,68,68,0.28);
}

.action-btn.admin i{
  color: rgba(239,68,68,0.95);
}

.action-btn.admin:hover{
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.40);
}
