:root {
  --font-family: "Prompt", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --card-bg: rgba(20, 22, 30, 0.9);
  --card-border: rgba(255, 255, 255, 0.14);
  --btn-green: #2e7d32;
  --btn-green-hover: #388e3c;
  --btn-green-active: #256628;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
}

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

html, body {
  max-width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  color: var(--text-primary);
  font-family: var(--font-family);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* พื้นหลังมายคราฟ */
body {
  background-color: #11141c;
  background-image:
    linear-gradient(rgba(10, 12, 16, 0.55), rgba(10, 12, 16, 0.72)),
    url("images/minecraft-bg.webp");
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  position: relative;
}

/* แอนิเมชันบล็อกหญ้ามายคราฟร่วงลงมา */
@keyframes fallAndTumble {
  0% { transform: translateY(-80px) rotate(0deg); opacity: 0; }
  6% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(calc(100vh + 120px)) rotate(360deg); opacity: 0; }
}

#falling-blocks {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.falling-block {
  position: absolute;
  top: 0;
  animation-name: fallAndTumble;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
  will-change: transform, opacity;
}

/* Matte Clean Card */
.clean-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
  width: 100%;
  max-width: 360px;
  padding: 32px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 10;
}

.server-header { display: flex; flex-direction: column; align-items: center; gap: 8px; }

.server-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background-color: #16181f;
  border: 1px solid #282b37;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

.server-header h1 { font-size: 20px; font-weight: 600; color: #f8fafc; letter-spacing: -0.2px; }

.copy-rows { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

.badge-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: #64748b;
  background: #232630;
  border-radius: 4px;
  padding: 2px 6px;
  text-transform: uppercase;
}

.ip-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: #94a3b8;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 6px;
  background: #15171d;
  border: 1px solid #232630;
  transition: border-color 0.15s ease;
  user-select: none;
}
.ip-badge:hover { border-color: #3a3f52; }

.status-bar {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  background: #14151a;
  border: 1px solid #232631;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.status-left { display: flex; align-items: center; gap: 8px; }
.status-left span.label { font-size: 14px; color: #94a3b8; }
.status-right { display: flex; align-items: baseline; gap: 4px; }
.status-right .count { font-size: 17px; font-weight: 600; color: #e2e8f0; }
.status-right .unit { font-size: 13px; color: #64748b; }

/* Matte Flat Button */
.clean-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
  background-color: var(--btn-green);
  border: 1px solid #3c8d41;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
  text-decoration: none;
  user-select: none;
}
.clean-button:hover { background-color: var(--btn-green-hover); }
.clean-button:active { background-color: var(--btn-green-active); transform: translateY(1px); }

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #4ade80;
  border-radius: 50%;
  display: inline-block;
}

.feedback {
  font-size: 13px;
  color: #94a3b8;
  background: #171a22;
  border: 1px solid #2c3140;
  padding: 9px 12px;
  border-radius: 6px;
  width: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.feedback.show { display: flex; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0d0f14; }
::-webkit-scrollbar-thumb { background: #27272a; border-radius: 3px; }
