@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323:wght@400&display=swap');

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

:root {
  --bg:        #1c1c1c;
  --bg2:       #2a2a2a;
  --bg3:       #323232;
  --border:    #555;
  --green:     #5aac44;
  --green-d:   #3d8a2e;
  --stone:     #888;
  --gold:      #f0c040;
  --red:       #c44;
  --text:      #f0f0f0;
  --muted:     #999;
  --pixel:     2px;
}

body {
  font-family: 'VT323', monospace;
  font-size: 20px;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  image-rendering: pixelated;
}

h1, h2, h3, .brand, .pixel-heading {
  font-family: 'Press Start 2P', monospace;
  line-height: 1.6;
}
h1 { font-size: 1rem; color: var(--green); margin-bottom: 1.5rem; text-shadow: 2px 2px #000; }
h2 { font-size: .7rem; color: var(--gold); margin-bottom: 1rem; }
h3 { font-size: .6rem; color: var(--stone); margin-bottom: .5rem; }

a { color: var(--green); }
a:hover { color: var(--gold); }

/* Pixel border mixin — Minecraft UI style */
.card {
  background: var(--bg2);
  border: var(--pixel) solid var(--border);
  box-shadow: inset -2px -4px 0 #0006, inset 2px 2px 0 #fff2;
  padding: 1.25rem;
  margin-bottom: 1rem;
  image-rendering: pixelated;
}

/* Nav */
nav {
  background: #111;
  border-bottom: 4px solid #000;
  box-shadow: 0 4px 0 #333;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.brand {
  font-family: 'Press Start 2P', monospace;
  font-size: .65rem;
  color: var(--green);
  text-decoration: none;
  text-shadow: 2px 2px #000;
}
.brand span { color: var(--gold); }
nav a { color: var(--muted); text-decoration: none; font-size: 18px; transition: color .1s; }
nav a:hover, nav a.active { color: var(--green); }
.spacer { flex: 1; }
.nav-user { color: #666; font-size: 16px; }

/* Layout */
main { max-width: 1100px; margin: 2rem auto; padding: 0 1.5rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin-bottom: 1rem; }

/* Buttons — Minecraft style */
.btn, button[type=submit] {
  font-family: 'VT323', monospace;
  font-size: 20px;
  background: var(--green);
  color: #fff;
  border: none;
  border-bottom: 4px solid var(--green-d);
  border-right: 4px solid var(--green-d);
  padding: .35rem 1rem .15rem;
  cursor: pointer;
  white-space: nowrap;
  image-rendering: pixelated;
  transition: filter .1s;
}
.btn:hover, button[type=submit]:hover { filter: brightness(1.15); }
.btn:active, button[type=submit]:active { border-bottom-width: 2px; border-right-width: 2px; transform: translate(1px,1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-outline {
  background: var(--bg3);
  color: var(--text);
  border: 2px solid var(--border);
  border-bottom: 4px solid #000;
  font-family: 'VT323', monospace;
  font-size: 20px;
  padding: .35rem 1rem .15rem;
  cursor: pointer;
}
.btn-outline:hover { background: var(--bg2); color: var(--green); border-color: var(--green); }

.btn-sm {
  font-family: 'VT323', monospace;
  font-size: 16px;
  background: var(--bg3);
  color: var(--muted);
  border: 1px solid var(--border);
  border-bottom: 3px solid #000;
  padding: .1rem .5rem;
  cursor: pointer;
  margin: .1rem;
}
.btn-sm:hover { color: var(--text); border-color: var(--stone); }
.btn-danger { background: #6b1a1a; color: #ff8888; border-color: #400; }
.btn-danger:hover { background: #8b2020; }
.btn-gold {
  background: #886600;
  color: var(--gold);
  border-bottom-color: #554400;
  border-right-color: #554400;
}
.btn-gold:hover { filter: brightness(1.2); }

/* Inputs */
input[type=text], input[type=password], select, textarea {
  font-family: 'VT323', monospace;
  font-size: 20px;
  background: #111;
  border: 2px solid var(--border);
  box-shadow: inset 2px 2px 0 #0008;
  color: var(--text);
  padding: .3rem .6rem;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: inset 2px 2px 0 #0008, 0 0 0 2px #5aac4440;
}
input[readonly] { opacity: .6; cursor: default; }
label { display: block; font-size: 16px; color: var(--muted); margin: .6rem 0 .2rem; }

.row { display: flex; gap: .5rem; align-items: center; }
.row input { flex: 1; }

/* Tags */
.tag {
  display: inline-block;
  background: #1a3a1a;
  color: var(--green);
  border: 1px solid #2d6b2d;
  padding: .05rem .4rem;
  font-size: 16px;
  margin: .1rem;
}
.tag.gold { background: #2a2000; color: var(--gold); border-color: #665500; }
.tag.red  { background: #2a0000; color: #ff8888;     border-color: #660000; }

/* Server status */
.server-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 0;
  border-bottom: 2px solid var(--bg3);
  font-size: 18px;
}
.server-row:last-child { border-bottom: none; }
.status-dot { width: 12px; height: 12px; flex-shrink: 0; image-rendering: pixelated; }
.status-dot.online  { background: var(--green); box-shadow: 0 0 8px var(--green); }
.status-dot.offline { background: var(--red); }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 18px; }
th {
  text-align: left;
  color: var(--muted);
  font-size: 14px;
  font-family: 'Press Start 2P', monospace;
  padding: .5rem;
  border-bottom: 2px solid var(--bg3);
}
td { padding: .5rem; border-bottom: 1px solid var(--bg3); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg3); }
.muted { color: var(--muted); }
.mono { font-family: monospace; font-size: 14px; }

/* Invite result */
.invite-result {
  margin-top: 1rem;
  background: #111;
  border: 2px solid var(--green);
  box-shadow: 0 0 12px #5aac4430;
  padding: 1rem;
}
.invite-result p { margin-bottom: .5rem; font-size: 18px; }
.copy-row { display: flex; gap: .5rem; }
.copy-row input { flex: 1; font-size: 14px; font-family: monospace; }

/* Console */
.console {
  background: #000;
  border: 2px solid var(--border);
  box-shadow: inset 2px 2px 0 #0008;
  font-family: monospace;
  font-size: 14px;
  padding: .75rem;
  min-height: 180px;
  max-height: 300px;
  overflow-y: auto;
  color: #0f0;
  white-space: pre-wrap;
  word-break: break-all;
}
.console .cmd  { color: #fff; }
.console .err  { color: #f88; }
.console .info { color: #88f; }
.console-row { display: flex; gap: .5rem; margin-top: .5rem; align-items: center; }
.console-row select { width: 110px; flex-shrink: 0; font-size: 16px; }
.console-row input  { flex: 1; font-family: monospace; font-size: 14px; }

/* Manifest */
.manifest-section { margin-bottom: 1.5rem; }
.manifest-section h3 { margin-bottom: .5rem; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; font-size: 18px; }
.info-grid .key { color: var(--muted); }
.pill {
  display: inline-block;
  background: #1a3a1a;
  color: var(--green);
  border: 1px solid #2d6b2d;
  padding: .1rem .5rem;
  font-size: 16px;
}
.pill.no { background: #1a1a3a; color: #88aaff; border-color: #334477; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #111; }
::-webkit-scrollbar-thumb { background: var(--border); }
