:root {
  --bg: #0d1117;
  --card: #161b22;
  --card-border: #2a3240;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #3fb950;
  --accent-hover: #2ea043;
  --primary: #58a6ff;
  --danger: #f85149;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top, #151e2e 0%, #0d1117 60%);
  color: var(--text);
  min-height: 100vh;
}

.container {
  max-width: 1020px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

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

.logo {
  font-size: 2.2rem;
  background: #1f2937;
  border: 1px solid var(--card-border);
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}

h1 {
  margin: 0;
  font-size: 1.45rem;
}

.subtitle {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.badge-row {
  display: flex;
  gap: 8px;
}

.pill {
  background: #21262d;
  border: 1px solid var(--card-border);
  color: var(--text);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.pill.accent {
  background: rgba(63, 185, 80, 0.14);
  border-color: rgba(63, 185, 80, 0.45);
  color: #7ee787;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

h2 {
  margin: 0;
  font-size: 1.05rem;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
}

/* Minecraft Server List Screen */
.mc-screen {
  border-radius: 10px;
  padding: 24px 20px;
  border: 2px solid #2b2b2b;
  background: #141414;
  overflow-x: auto;
}

.mc-screen.mc-bg {
  background-color: #19130f;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.62)),
    repeating-linear-gradient(45deg, #2d1f16 0, #2d1f16 12px, #241811 12px, #241811 24px);
}

.mc-server-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 680px;
  margin: 0 auto;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mc-icon-wrap {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  background: #101010;
  border: 1px solid #333;
}

.mc-icon-wrap img {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  display: block;
}

.mc-info {
  flex: 1;
  min-width: 0;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
}

.mc-top-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.mc-server-name {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  text-shadow: 2px 2px 0 #3f3f3f;
}

.mc-right-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mc-players {
  color: #aaaaaa;
  font-size: 14px;
  text-shadow: 2px 2px 0 #2a2a2a;
}

.mc-ping {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.mc-ping span {
  width: 3px;
  background: #55ff55;
  box-shadow: 1px 1px 0 #153f15;
}
.mc-ping span:nth-child(1) { height: 4px; }
.mc-ping span:nth-child(2) { height: 6px; }
.mc-ping span:nth-child(3) { height: 9px; }
.mc-ping span:nth-child(4) { height: 11px; }
.mc-ping span:nth-child(5) { height: 14px; }

.mc-motd {
  font-size: 14.5px;
  line-height: 1.4;
  min-height: 42px;
  white-space: pre;
  overflow: hidden;
}

.mc-line {
  min-height: 20px;
  white-space: pre;
}

.meta-inputs {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

input[type="text"],
input[type="number"],
select,
textarea {
  background: #0d1117;
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
}

textarea {
  font-family: 'JetBrains Mono', monospace;
  resize: vertical;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
}

.inline-pair {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inline-pair input[type="number"] {
  width: 90px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  margin-bottom: 14px;
}

.format-select-wrap {
  flex: 1 1 300px;
}

.preset-wrap {
  flex: 0 1 240px;
}

.detected-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
}

.detected-label {
  font-size: 0.82rem;
  color: var(--muted);
}

.palette-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #0d1117;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  margin-bottom: 14px;
}

.palette-title {
  font-size: 0.8rem;
  color: var(--muted);
  margin-right: 4px;
}

.color-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.color-swatch:hover {
  transform: scale(1.14);
}

.style-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.muted {
  color: var(--muted);
  font-size: 0.8rem;
}

.action-bar {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.btn {
  background: #21262d;
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  background: #30363d;
}

.btn.small {
  padding: 5px 10px;
  font-size: 0.78rem;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #08130a;
}
.btn.primary:hover {
  background: var(--accent-hover);
}

.btn.accent {
  background: rgba(88, 166, 255, 0.16);
  border-color: rgba(88, 166, 255, 0.5);
  color: #9ecbff;
}

.btn.danger {
  background: rgba(248, 81, 73, 0.14);
  border-color: rgba(248, 81, 73, 0.4);
  color: #ff9492;
}

.toast {
  color: #7ee787;
  font-size: 0.85rem;
  font-weight: 600;
}

.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  padding-top: 4px;
}
