/* ==========================================================
   Mineccu — Landing page Minecraft-themed
   Palette inspirée des blocs vanilla : grass top, dirt, stone.
   ========================================================== */

:root {
  --bg: #1d1f22;
  --bg-deep: #131517;
  --grass: #5d943c;
  --grass-dark: #3f6b27;
  --dirt: #6b3f1d;
  --dirt-dark: #4a2c14;
  --stone: #6e6e6e;
  --stone-light: #9e9e9e;
  --stone-dark: #3c3c3c;
  --text: #f1efe5;
  --text-dim: #b8b6ac;
  --accent: #5acb53;
  --accent-dark: #2e7a2a;
  --danger: #d04848;
  --shadow: rgba(0, 0, 0, 0.6);
}

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

html,
body {
  height: 100%;
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 22px;
  line-height: 1.5;
  background: var(--bg-deep);
  color: var(--text);
  image-rendering: pixelated;
}

body {
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}

/* --- Background : ciel + horizon herbe/terre --- */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    /* nuages très subtils */
    radial-gradient(ellipse 200px 40px at 20% 25%, rgba(255, 255, 255, 0.05), transparent),
    radial-gradient(ellipse 300px 50px at 70% 35%, rgba(255, 255, 255, 0.04), transparent),
    radial-gradient(ellipse 180px 30px at 45% 15%, rgba(255, 255, 255, 0.06), transparent),
    /* horizon : herbe -> terre -> stone */
    linear-gradient(
      to bottom,
      #4a78b3 0%,
      #6f9bd1 35%,
      #8eb6df 50%,
      var(--grass) 50%,
      var(--grass) 53%,
      var(--grass-dark) 53%,
      var(--grass-dark) 56%,
      var(--dirt) 56%,
      var(--dirt) 78%,
      var(--dirt-dark) 78%,
      var(--dirt-dark) 88%,
      var(--stone-dark) 88%,
      var(--bg-deep) 100%
    );
}

/* --- Layout --- */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* --- Hero --- */
.hero {
  text-align: center;
  margin-bottom: 8px;
}

.title {
  font-family: 'Press Start 2P', 'VT323', monospace;
  font-size: 56px;
  color: var(--text);
  text-shadow:
    4px 4px 0 #2a2a2a,
    8px 8px 0 var(--shadow);
  letter-spacing: 2px;
  margin-bottom: 16px;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.subtitle {
  font-size: 28px;
  color: var(--text-dim);
  text-shadow: 2px 2px 0 var(--shadow);
  margin-bottom: 24px;
}

/* --- Status pill --- */
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid var(--stone-dark);
  border-radius: 4px;
  font-size: 22px;
}

.status .dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: var(--stone);
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}

.status[data-state="online"]  { color: var(--accent);  }
.status[data-state="online"] .dot  { background: var(--accent); }
.status[data-state="offline"] { color: var(--danger); }
.status[data-state="offline"] .dot { background: var(--danger); }
.status[data-state="loading"] .dot { animation: pulse 1.2s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}

/* --- Cards (style "panneau Minecraft") --- */
.card {
  background: var(--stone-dark);
  border: 4px solid;
  border-color: var(--stone-light) var(--stone-dark) var(--stone-dark) var(--stone-light);
  padding: 18px 22px;
  position: relative;
  box-shadow: 0 6px 0 var(--shadow);
}

.card-label {
  font-size: 18px;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.card-hint {
  font-size: 18px;
  color: var(--text-dim);
  margin-top: 12px;
}

/* --- Address card (la plus visible) --- */
.address-card {
  text-align: center;
}

.address-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  justify-content: center;
  flex-wrap: wrap;
}

#server-address {
  flex: 1;
  min-width: 240px;
  font-family: 'VT323', monospace;
  font-size: 32px;
  background: var(--bg-deep);
  color: var(--accent);
  padding: 12px 18px;
  border: 3px solid var(--stone-dark);
  border-right: none;
  letter-spacing: 1px;
  text-align: center;
  user-select: all;
}

.copy-btn {
  font-size: 22px;
  padding: 12px 24px;
  border-left: none !important;
}

/* --- Stats grid --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat-card {
  text-align: center;
}

.motd-card {
  grid-column: 1 / -1;
}

.stat-value {
  font-size: 36px;
  color: var(--accent);
  font-weight: bold;
  text-shadow: 2px 2px 0 var(--shadow);
}

.motd-card .motd {
  font-size: 24px;
  color: var(--text);
  text-shadow: 2px 2px 0 var(--shadow);
  white-space: pre-line;
}

.player-list {
  list-style: none;
  margin-top: 8px;
  font-size: 18px;
  color: var(--text-dim);
}

.player-list li::before {
  content: '➤ ';
  color: var(--accent);
}

/* --- Plugin list --- */
.plugin-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px 18px;
  margin-top: 4px;
}

.plugin-list li {
  font-size: 18px;
  color: var(--text-dim);
  padding-left: 14px;
  position: relative;
}

.plugin-list li::before {
  content: '■';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
  top: 4px;
}

.plugin-list strong {
  color: var(--text);
}

/* --- Boutons "Minecraft" --- */
.mc-button {
  font-family: 'VT323', monospace;
  font-size: 22px;
  background: var(--stone);
  color: var(--text);
  border: 3px solid;
  border-color: var(--stone-light) var(--stone-dark) var(--stone-dark) var(--stone-light);
  padding: 10px 22px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: filter 0.1s, transform 0.05s;
  text-shadow: 2px 2px 0 var(--shadow);
}

.mc-button:hover {
  filter: brightness(1.15);
}

.mc-button:active {
  border-color: var(--stone-dark) var(--stone-light) var(--stone-light) var(--stone-dark);
  transform: translateY(1px);
}

.mc-button.primary {
  background: var(--accent-dark);
}

.mc-button.primary:hover {
  background: var(--accent);
}

.mc-button.copied {
  background: var(--accent-dark);
}

/* --- Actions --- */
.actions {
  text-align: center;
  margin-top: 8px;
}

.actions .mc-button {
  font-size: 24px;
  padding: 14px 32px;
}

/* --- Footer --- */
.footer {
  margin-top: 32px;
  text-align: center;
  font-size: 20px;
  color: var(--text-dim);
  text-shadow: 1px 1px 0 var(--shadow);
}

.footer a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent);
  transition: color 0.15s, border-color 0.15s;
}

.footer a:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* --- Responsive --- */
@media (max-width: 540px) {
  .title    { font-size: 36px; }
  .subtitle { font-size: 22px; }
  #server-address { font-size: 22px; min-width: 100%; border-right: 3px solid var(--stone-dark); }
  .copy-btn { width: 100%; border-left: 3px solid var(--stone-light) !important; margin-top: 0; }
  .address-row { flex-direction: column; }
}
