:root {
  color: #e8edf2;
  background: #0c1117;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(115deg, #0c1117 0%, #111a1e 52%, #101817 100%);
}

.panel-message { flex-basis: 100%; min-height: 1.25rem; margin: 0; color: #82df95; font-size: .82rem; font-weight: 650; text-align: right; }
.panel-message.error { color: #f6a3a3; }

button { font: inherit; }

.dashboard { width: min(1120px, calc(100% - 3rem)); margin: 0 auto; padding: 2rem 0 4rem; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding-bottom: 4rem; }

.panel-name { margin: 0; color: #f7fafc; font-size: .87rem; font-weight: 750; letter-spacing: .04em; }

.connection-status { display: flex; align-items: center; gap: .5rem; color: #98a6ad; font-size: .83rem; }
.status-dot { width: .5rem; height: .5rem; border-radius: 50%; background: #62d879; box-shadow: 0 0 0 .25rem rgb(98 216 121 / 12%); }
.status-dot.unknown { background: #718087; box-shadow: 0 0 0 .25rem rgb(113 128 135 / 12%); }

.server-overview { display: flex; align-items: end; justify-content: flex-end; flex-wrap: wrap; gap: .75rem 2rem; padding-bottom: 3.25rem; }
.server-indicator { margin-right: auto; }
.server-indicator .eyebrow { margin-bottom: .4rem; }
.server-state { display: flex; align-items: center; gap: .65rem; margin: 0; color: #89989e; font-size: clamp(1.7rem, 3vw, 2.35rem); font-weight: 760; letter-spacing: -.045em; line-height: 1; }
.server-state-dot { width: .62rem; height: .62rem; border-radius: 50%; background: #718087; box-shadow: 0 0 0 .3rem rgb(113 128 135 / 12%); }
.server-indicator[data-state="online"] .server-state { color: #80e396; }.server-indicator[data-state="online"] .server-state-dot { background: #6fe08a; box-shadow: 0 0 0 .3rem rgb(111 224 138 / 12%); }
.server-indicator[data-state="offline"] .server-state { color: #f2a1a1; }.server-indicator[data-state="offline"] .server-state-dot { background: #e27373; box-shadow: 0 0 0 .3rem rgb(226 115 115 / 12%); }
.server-indicator[data-state="restarting"] .server-state { color: #f3cf72; }.server-indicator[data-state="restarting"] .server-state-dot { background: #f0bd44; box-shadow: 0 0 0 .3rem rgb(240 189 68 / 12%); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }
.eyebrow { margin: 0 0 .65rem; color: #6bde85; font-size: .68rem; font-weight: 800; letter-spacing: .14em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: .6rem; color: #f4f7f8; font-size: clamp(2.3rem, 5vw, 4rem); letter-spacing: -.055em; line-height: 1; }
.server-address { display: flex; align-items: center; gap: .45rem; margin-bottom: 0; color: #87959d; font-size: .9rem; }

.controls { display: flex; flex-wrap: wrap; gap: .65rem; }
.control { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-width: 102px; border: 1px solid transparent; border-radius: .5rem; padding: .78rem 1rem; cursor: pointer; font-size: .86rem; font-weight: 750; transition: transform .15s ease, background .15s ease; }
.control:hover { transform: translateY(-2px); }
.start { color: #09220f; background: #6fe08a; }
.stop { color: #ffc4c4; border-color: #4c3035; background: #271b20; }
.restart { color: #d7e0e4; border-color: #304047; background: #172329; }
.autosleep { color: #ffe6a3; border-color: #5f5335; background: #2c2a1d; }

.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.metric-card, .players-card { border: 1px solid #253239; border-radius: .85rem; background: rgb(22 31 36 / 78%); box-shadow: 0 14px 35px rgb(0 0 0 / 12%); }
.metric-card { padding: 1.5rem; }
.card-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.card-heading p { margin-bottom: 1.65rem; color: #a9b5b9; font-size: .88rem; font-weight: 650; }
.card-heading strong { color: #f2f5f4; font-size: 1.55rem; letter-spacing: -.04em; }
.card-heading strong span { color: #839198; font-size: .75rem; font-weight: 600; letter-spacing: 0; }
.meter { overflow: hidden; height: .5rem; border-radius: 99px; background: #27353a; }
.meter span { display: block; height: 100%; border-radius: inherit; }
.cpu-meter { background: #6edc87; }
.ram-meter { background: #76b4ff; }
.metric-detail { margin: .7rem 0 0; color: #788990; font-size: .78rem; }

.players-card { margin-top: 1rem; padding: 1.5rem; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 1.35rem; }
.section-heading .eyebrow { margin-bottom: .4rem; }
h2 { margin-bottom: 0; color: #f0f4f5; font-size: 1.25rem; letter-spacing: -.03em; }
h2 span { margin-left: .3rem; color: #819097; font-size: .85rem; font-weight: 500; letter-spacing: 0; }
.view-all { border: 0; padding: 0; color: #76d98c; background: none; cursor: pointer; font-size: .8rem; font-weight: 700; }
.view-all span { margin-left: .25rem; font-size: 1rem; }
.view-all:disabled { color: #65747a; cursor: not-allowed; }

.player-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem .8rem; }
.empty-players { display: grid; min-height: 3.4rem; place-items: center; grid-column: 1 / -1; border: 1px dashed #334349; border-radius: .55rem; color: #718087; }
.player { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto auto; align-items: center; gap: .7rem; min-width: 0; padding: .7rem .8rem; border-radius: .55rem; background: #1a252a; }
.player strong { overflow: hidden; color: #dce4e5; font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: .35rem; color: #fff; font-size: .8rem; font-weight: 800; }
.player-head { image-rendering: pixelated; object-fit: cover; background: #26343a; }
.emerald { background: #34724d; }.gold { background: #8b6d32; }.violet { background: #67508e; }.blue { background: #356f87; }
.dimension { display: inline-flex; align-items: center; gap: .25rem; padding: .22rem .45rem; border-radius: .25rem; color: #95a3a9; background: #273338; font-size: .68rem; font-weight: 750; white-space: nowrap; }
.dimension-icon { font-size: .75rem; line-height: 1; }
.overworld { color: #8fe9a1; background: #1d422a; }.nether { color: #ff9e9e; background: #482326; }.end { color: #cfadff; background: #37264e; }
.kick-button { border: 1px solid #63353a; border-radius: .3rem; padding: .28rem .48rem; color: #f5a7a7; background: #302024; cursor: pointer; font-size: .7rem; font-weight: 750; }
.kick-button:hover { background: #44252b; }
.kick-button:disabled, .control:disabled { cursor: wait; opacity: .55; transform: none; }

@media (max-width: 700px) {
  .dashboard { width: min(100% - 2rem, 1120px); padding-top: 1.25rem; }
  .topbar { padding-bottom: 3rem; }
  .server-overview { align-items: start; flex-direction: column; padding-bottom: 2.5rem; }
  .server-indicator { margin-right: 0; }
  .controls, .control { width: 100%; }.controls { gap: .5rem; }.control { flex: 1; }
  .metrics, .player-list { grid-template-columns: 1fr; }
  .section-heading { align-items: start; gap: 1rem; flex-direction: column; }
}
