/* ==========================================================================
   mazpl.net — dark Minecraft theme
   ========================================================================== */

:root {
  --bg: #0a0d08;
  --bg2: #11170e;
  --panel: rgba(18, 26, 15, 0.82);
  --border: #2c3b22;
  --border-lit: #46603a;
  --text: #e6f0dd;
  --muted: #8fa483;
  --green: #57c94d;
  --green-bright: #7ce06f;
  --amber: #e6b93c;
  --red: #d65545;
  --font-pixel: "Press Start 2P", monospace;
  --font-body: "Inter", system-ui, sans-serif;
}

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

html, body { height: 100%; }

body {
  background: radial-gradient(1200px 700px at 50% -10%, #17220f 0%, var(--bg) 55%) fixed;
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Floating-blocks canvas sits behind everything */
#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.55;
}

main {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(2rem, 8vh, 5rem) 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

/* ---- Hero ---- */
.hero { text-align: center; }

.title {
  font-family: var(--font-pixel);
  font-size: clamp(2rem, 7vw, 3.4rem);
  letter-spacing: 0.06em;
  color: #d44848; /* MAZ — rich dark red */
  text-shadow:
    0 4px 0 #4e1616,
    0 8px 24px rgba(185, 55, 55, 0.45);
  animation: drop-in 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.title span {
  color: #2f77c2; /* SMP — rich dark blue */
  display: block;
  font-size: 0.62em;
  margin-top: 0.35em;
  text-shadow: 0 4px 0 #122e4d, 0 8px 24px rgba(55, 120, 195, 0.45);
}

.tagline {
  margin-top: 1.1rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: 0.8rem;
  animation: fade-in 0.8s 0.25s both;
}

@keyframes drop-in {
  from { opacity: 0; transform: translateY(-26px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---- Server card ---- */
.card {
  width: 100%;
  background: var(--panel);
  border: 2px solid var(--border);
  /* blocky, Minecraft-ish corner highlights */
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.03),
    0 10px 0 rgba(0, 0, 0, 0.35),
    0 22px 50px rgba(0, 0, 0, 0.5);
  padding: 1.6rem 1.5rem 1.5rem;
  backdrop-filter: blur(6px);
  animation: fade-in 0.8s 0.35s both;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Status pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  padding: 0.7rem 0.9rem 0.65rem;
  border: 2px solid var(--border-lit);
  background: rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}
.pill .dot {
  width: 10px; height: 10px;
  background: var(--muted);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.4);
  flex: none;
}
.pill.online   { color: var(--green-bright); border-color: var(--green); }
.pill.online .dot { background: var(--green-bright); animation: pulse 1.6s ease-out infinite; }
.pill.starting { color: var(--amber); border-color: var(--amber); }
.pill.starting .dot { background: var(--amber); animation: blink 0.9s steps(2) infinite; }
.pill.offline  { color: var(--muted); }
.pill.offline .dot { background: var(--red); }
.pill.error    { color: var(--red); border-color: var(--red); }
.pill.error .dot { background: var(--red); }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(124, 224, 111, 0.7); }
  70%  { box-shadow: 0 0 0 9px rgba(124, 224, 111, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124, 224, 111, 0); }
}
@keyframes blink { 50% { opacity: 0.25; } }

.players {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Info rows */
.info {
  margin: 1.4rem 0 1.5rem;
  display: grid;
  gap: 0.7rem;
}
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.92rem;
}
.label {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  font-weight: 600;
}
.value { font-weight: 600; }

.copy {
  font: inherit;
  color: var(--text);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.copy:hover { border-color: var(--green); background: rgba(87, 201, 77, 0.08); }
.copy-icon { color: var(--muted); font-size: 0.8em; }

/* ---- Start button ---- */
.start-btn {
  width: 100%;
  font-family: var(--font-pixel);
  font-size: clamp(0.8rem, 2.6vw, 1rem);
  color: #0c1908;
  background: linear-gradient(180deg, var(--green-bright) 0%, var(--green) 55%, #3f9c37 100%);
  border: 2px solid #2f5c26;
  box-shadow:
    inset 0 -4px 0 rgba(0, 0, 0, 0.25),
    inset 0 3px 0 rgba(255, 255, 255, 0.35),
    0 6px 0 #234a1c;
  padding: 1.05rem 1rem 0.95rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.08s, box-shadow 0.2s, filter 0.2s;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* light sweep that dashes across the button on hover */
.start-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 55%;
  height: 100%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
  transform: skewX(-20deg);
  pointer-events: none;
}

.start-btn:hover:not(:disabled) {
  filter: brightness(1.12);
  transform: translateY(-3px);
  box-shadow:
    inset 0 -4px 0 rgba(0, 0, 0, 0.25),
    inset 0 3px 0 rgba(255, 255, 255, 0.35),
    0 9px 0 #234a1c,
    0 10px 26px rgba(87, 201, 77, 0.45);
}
.start-btn:hover:not(:disabled)::after {
  left: 135%;
  transition: left 0.55s ease;
}

.start-btn:active:not(:disabled) {
  transform: translateY(5px);
  box-shadow:
    inset 0 -4px 0 rgba(0, 0, 0, 0.25),
    inset 0 3px 0 rgba(255, 255, 255, 0.35),
    0 1px 0 #234a1c;
}
.start-btn:disabled {
  background: linear-gradient(180deg, #55604f 0%, #424c40 55%, #353d33 100%);
  border-color: #2a3129;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25), 0 6px 0 #23291f;
  color: #b7c2ae;
  cursor: wait;
}
.start-btn.busy { animation: shimmer 1.1s linear infinite; }

@keyframes shimmer {
  0%   { filter: brightness(1); }
  50%  { filter: brightness(1.25); }
  100% { filter: brightness(1); }
}

.hint {
  margin-top: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
}

/* ---- Feature chips (cracked / premium) ---- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin: 0.2rem 0 1.1rem;
}
.chip {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border-lit);
  background: rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}
.chip-green { color: var(--green-bright); border-color: rgba(87, 201, 77, 0.55); }
.chip-blue  { color: #6db6f5; border-color: rgba(109, 182, 245, 0.55); }
.chip-amber { color: #e6b93c; border-color: rgba(230, 185, 60, 0.55); }

/* ---- YouTube link ---- */
.socials {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  width: 100%;
  align-items: center;
}
.yt, .discord {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  padding: 0.7rem 1.1rem;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  animation: fade-in 0.8s 0.5s both;
}
.discord { animation-delay: 0.6s; }
.yt {
  border: 2px solid #5c2020;
  background: rgba(30, 10, 10, 0.55);
}
.yt:hover {
  border-color: #ff4444;
  background: rgba(60, 12, 12, 0.65);
}
.discord {
  border: 2px solid #36406e;
  background: rgba(18, 22, 44, 0.55);
}
.discord:hover {
  border-color: #5865f2;
  background: rgba(35, 40, 82, 0.65);
}
.yt:active, .discord:active { transform: translateY(2px); }
.yt-play {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: #ff0000;
  color: #fff;
  font-size: 0.65rem;
  border-radius: 6px;
  flex: none;
}
.discord-mark {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: #5865f2;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  border-radius: 6px;
  flex: none;
}

/* ---- Footer ---- */
footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
}
footer a { color: var(--green); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ---- Toast ---- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translate(-50%, 20px);
  max-width: min(92vw, 480px);
  background: rgba(12, 18, 9, 0.95);
  border: 2px solid var(--border-lit);
  color: var(--text);
  padding: 0.85rem 1.1rem;
  font-size: 0.88rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 10;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast.ok   { border-color: var(--green); }
.toast.warn { border-color: var(--amber); }
.toast.err  { border-color: var(--red); }

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
