/* Minecraft.net inspired — https://www.minecraft.net/zh-hans/login */
:root {
  --mc-bg: #111111;
  --mc-bg-panel: #1d1d1d;
  --mc-bg-card: #262626;
  --mc-ink: #ffffff;
  --mc-muted: #b0b0b0;
  --mc-quiet: #737373;
  --mc-green: #62b047;
  --mc-green-hover: #7bcc5e;
  --mc-green-dark: #3d7a2e;
  --mc-line: rgba(255,255,255,0.08);
  --mc-gold: #ffc845;
  --mc-red: #ff5555;
  --mc-font: "Noto Sans", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mc-pixel: "Minecraft", "Minecraftia", "Fusion Pixel 12px Monospaced SC", monospace;
  --mc-max: 1080px;
  --mc-build: "20260814-v5";
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--mc-font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--mc-ink);
  background: var(--mc-bg);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(98,176,71,0.12), transparent),
    linear-gradient(180deg, #111 0%, #0a0a0a 100%);
  pointer-events: none;
}

a { color: var(--mc-green); text-decoration: none; }
a:hover { color: var(--mc-green-hover); text-decoration: underline; }

.wrap { width: min(var(--mc-max), calc(100% - 40px)); margin: 0 auto; }

/* Header */
.mc-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(17,17,17,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--mc-line);
}

.mc-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  gap: 16px;
}

.mc-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mc-pixel);
  font-size: 18px;
  color: var(--mc-ink);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.mc-logo:hover { text-decoration: none; color: var(--mc-ink); }

.mc-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.mc-nav { display: flex; gap: 4px; }

.mc-nav a {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--mc-muted);
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.mc-nav a:hover, .mc-nav a.active {
  color: var(--mc-ink);
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}

.mc-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--mc-muted);
  border: 1px solid var(--mc-line);
  border-radius: 4px;
}

.mc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mc-quiet); }
.mc-dot.on { background: var(--mc-green); box-shadow: 0 0 8px rgba(98,176,71,0.6); }
.mc-dot.off { background: var(--mc-red); }

/* Hero + carousel */
.mc-hero {
  padding: 0 0 48px;
  text-align: center;
}

.mc-carousel {
  position: relative;
  width: 100%;
  height: clamp(200px, 36vw, 380px);
  overflow: hidden;
  border-bottom: 1px solid var(--mc-line);
  background: #0a0a0a;
}

.mc-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.mc-carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.mc-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.mc-carousel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}

.mc-carousel-caption {
  position: absolute;
  left: 24px;
  bottom: 20px;
  z-index: 2;
  text-align: left;
  font-family: var(--mc-pixel);
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  text-shadow: 2px 2px 0 #000;
  pointer-events: none;
}

.mc-carousel-dots {
  position: absolute;
  right: 20px;
  bottom: 16px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.mc-carousel-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 2px solid rgba(255,255,255,0.6);
  background: transparent;
  cursor: pointer;
}

.mc-carousel-dot.active {
  background: var(--mc-green);
  border-color: var(--mc-green);
}

.mc-hero-body {
  padding-top: 40px;
}

.mc-hero-panel {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 40px;
  background: var(--mc-bg-panel);
  border: 1px solid var(--mc-line);
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.mc-hero h1 {
  margin: 0 0 8px;
  font-family: var(--mc-pixel);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.mc-hero-sub {
  margin: 0 0 28px;
  font-size: 15px;
  color: var(--mc-muted);
  line-height: 1.65;
}

.mc-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* Buttons — MC green */
.mc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: none;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}

.mc-btn:hover { text-decoration: none; transform: translateY(-1px); }

.mc-btn-primary {
  background: var(--mc-green);
  color: #fff;
  box-shadow: inset 0 -4px 0 var(--mc-green-dark);
}

.mc-btn-primary:hover { background: var(--mc-green-hover); color: #fff; }

.mc-btn-secondary {
  background: transparent;
  color: var(--mc-ink);
  border: 2px solid var(--mc-line);
  box-shadow: none;
}

.mc-btn-secondary:hover { border-color: var(--mc-muted); color: var(--mc-ink); }

.mc-btn-sm { min-height: 36px; padding: 0 16px; font-size: 12px; }

.mc-spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid var(--mc-line);
  border-top-color: var(--mc-green);
  border-radius: 50%;
  animation: mc-spin 0.7s linear infinite;
  vertical-align: middle;
}

@keyframes mc-spin { to { transform: rotate(360deg); } }

/* Cookie banner */
.mc-cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 9999;
  max-width: 520px; margin: 0 auto;
  padding: 20px 24px;
  background: var(--mc-bg-panel);
  border: 1px solid var(--mc-line);
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
}

.mc-cookie.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.mc-cookie .mc-cookie-actions button {
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.mc-cookie p { margin: 0 0 16px; font-size: 13px; color: var(--mc-muted); line-height: 1.55; }
.mc-cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Legal */
.mc-legal { padding: 48px 0 80px; }
.mc-legal h1 { font-family: var(--mc-pixel); font-size: 28px; margin: 0 0 8px; letter-spacing: 0.04em; }
.mc-legal-meta { color: var(--mc-muted); font-size: 14px; margin-bottom: 32px; }
.mc-legal h2 { font-size: 18px; font-weight: 700; margin: 32px 0 12px; }
.mc-legal p, .mc-legal li { color: var(--mc-muted); line-height: 1.7; font-size: 15px; }
.mc-legal ul { padding-left: 20px; }

.mc-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 8px; }
.mc-footer-links a { color: var(--mc-quiet); font-size: 12px; }

/* Stats row */
.mc-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--mc-line);
  border: 1px solid var(--mc-line);
  margin: 48px 0;
  border-radius: 4px;
  overflow: hidden;
}

.mc-stat {
  padding: 24px 16px;
  text-align: center;
  background: var(--mc-bg-card);
}

.mc-stat strong {
  display: block;
  font-family: var(--mc-pixel);
  font-size: 28px;
  color: var(--mc-green);
  margin-bottom: 4px;
}

.mc-stat span { font-size: 12px; color: var(--mc-quiet); text-transform: uppercase; letter-spacing: 0.08em; }

/* Cards section */
.mc-section { padding: 48px 0; }

.mc-section-title {
  margin: 0 0 32px;
  text-align: center;
  font-family: var(--mc-pixel);
  font-size: 22px;
  letter-spacing: 0.04em;
}

.mc-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.mc-card {
  padding: 28px 24px;
  background: var(--mc-bg-card);
  border: 1px solid var(--mc-line);
  border-radius: 4px;
}

.mc-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
}

.mc-card p {
  margin: 0;
  font-size: 14px;
  color: var(--mc-muted);
  line-height: 1.6;
}

/* Join box */
.mc-join {
  max-width: 480px;
  margin: 0 auto;
  padding: 32px;
  background: var(--mc-bg-panel);
  border: 1px solid var(--mc-line);
  border-radius: 4px;
  text-align: center;
}

.mc-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--mc-bg);
  border: 1px solid var(--mc-line);
  text-align: left;
}

.mc-field-label { font-size: 11px; color: var(--mc-quiet); text-transform: uppercase; letter-spacing: 0.06em; }
.mc-field-val { font-family: var(--mc-mono, monospace); font-size: 14px; word-break: break-all; }

.mc-copy {
  width: 36px; height: 36px;
  border: 1px solid var(--mc-line);
  background: var(--mc-bg-card);
  color: var(--mc-muted);
  cursor: pointer;
  border-radius: 2px;
}

.hidden { display: none !important; }

/* Modal */
.mc-modal-bg {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 20px;
  background: rgba(0,0,0,0.75);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}

.mc-modal-bg.open { opacity: 1; pointer-events: auto; }

.mc-modal {
  width: min(400px, 100%);
  padding: 32px;
  background: var(--mc-bg-panel);
  border: 1px solid var(--mc-line);
  border-radius: 4px;
}

.mc-modal h2 { margin: 0 0 8px; font-family: var(--mc-pixel); font-size: 20px; }
.mc-modal p { margin: 0 0 16px; font-size: 14px; color: var(--mc-muted); }
.mc-modal-prompt {
  font-family: var(--mc-mono, ui-monospace, Consolas, monospace);
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  color: var(--mc-green);
  margin: 20px 0;
  min-height: 48px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}
.mc-modal-input {
  width: 100%; min-height: 44px; padding: 0 14px; margin-bottom: 12px;
  background: var(--mc-bg); border: 1px solid var(--mc-line); color: var(--mc-ink);
  font-size: 16px; border-radius: 2px;
}

.mc-modal-input:focus { outline: none; border-color: var(--mc-green); }
.mc-modal-err { min-height: 18px; font-size: 13px; color: var(--mc-red); margin-bottom: 8px; }
.mc-modal-foot { display: flex; gap: 8px; justify-content: flex-end; }

/* Status page */
.mc-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mc-panel { padding: 24px; background: var(--mc-bg-card); border: 1px solid var(--mc-line); border-radius: 4px; }
.mc-panel h3 { margin: 0 0 16px; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mc-muted); }
.mc-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--mc-line); font-size: 14px; }
.mc-row:last-child { border-bottom: 0; }
.mc-row span { color: var(--mc-muted); }

.mc-badge { padding: 3px 8px; border-radius: 2px; font-size: 11px; font-weight: 700; }
.mc-badge.ok { background: rgba(98,176,71,0.2); color: var(--mc-green); }
.mc-badge.err { background: rgba(255,85,85,0.2); color: var(--mc-red); }

.mc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mc-chip { padding: 5px 10px; font-size: 12px; background: var(--mc-bg); border: 1px solid var(--mc-line); border-radius: 2px; }

.mc-progress { height: 6px; background: var(--mc-bg); border-radius: 2px; overflow: hidden; margin-top: 12px; }
.mc-progress span { display: block; height: 100%; width: 0%; background: var(--mc-green); transition: width 0.4s; }

.mc-footer {
  padding: 32px 0;
  text-align: center;
  font-size: 12px;
  color: var(--mc-quiet);
  border-top: 1px solid var(--mc-line);
}

.mc-toast {
  position: fixed; left: 50%; bottom: 24px;
  transform: translateX(-50%) translateY(100px);
  padding: 10px 20px; background: var(--mc-bg-panel);
  border: 1px solid var(--mc-line); font-size: 13px;
  opacity: 0; transition: all 0.25s; z-index: 300;
}

.mc-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

@media (max-width: 768px) {
  .mc-grid-3, .mc-stats, .mc-metrics { grid-template-columns: 1fr 1fr; }
  .mc-nav { display: none; }
  .mc-hero-panel { padding: 32px 20px; }
}

@media (max-width: 480px) {
  .mc-grid-3, .mc-stats, .mc-metrics { grid-template-columns: 1fr; }
}

/* monospace helper */
:root { --mc-mono: ui-monospace, Consolas, monospace; }
