:root {
  --bg: #0a0d0b;
  --bg-elevated: #121712;
  --bg-elevated-2: #171d17;
  --border: rgba(57, 255, 20, 0.16);
  --border-strong: rgba(57, 255, 20, 0.32);
  --text: #e9ede9;
  --text-dim: #97a49a;
  --text-dimmer: #6d786f;
  --accent-1: #39ff14;
  --accent-2: #4d4d4d;
  --accent-bedrock: #55a8ff;
  --radius: 14px;
  --wrap: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Sarabun', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .wordmark {
  font-family: 'Kanit', 'Sarabun', system-ui, sans-serif;
  margin: 0;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 16px;
}

a { color: inherit; }

code {
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  background: var(--bg-elevated-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.45em;
  font-size: 0.92em;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 13, 11, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.wordmark {
  font-weight: 800;
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.01em;
}

.wordmark.small { font-size: 1.1rem; display: block; margin-bottom: 8px; }

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  text-decoration: none;
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.nav a:hover { color: var(--text); }

/* Hero */

.hero {
  padding: 96px 16px 72px;
  text-align: center;
}

.eyebrow {
  color: var(--accent-1);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 18px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.25;
  text-wrap: balance;
  margin-bottom: 20px;
}

.hero-sub {
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 36px;
  font-size: 1.05rem;
}

.hero-actions { display: flex; justify-content: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-1), #2fd60f);
  color: #05170a;
  box-shadow: 0 8px 24px rgba(57, 255, 20, 0.22);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(57, 255, 20, 0.3); }

/* Section titles */

section h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
}

section { padding: 64px 16px; }

/* Connect */

.connect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.connect-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.connect-card-head { margin-bottom: 16px; }

.platform-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
}

.platform-java {
  background: rgba(57, 255, 20, 0.14);
  color: var(--accent-1);
  border: 1px solid var(--border-strong);
}

.platform-bedrock {
  background: rgba(85, 168, 255, 0.14);
  color: var(--accent-bedrock);
  border: 1px solid rgba(85, 168, 255, 0.32);
}

.address-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-elevated-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--text);
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  font-size: 1.05rem;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.address-row:hover { border-color: var(--border-strong); }

.copy-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 1.5px solid var(--text-dim);
  border-radius: 3px;
  position: relative;
  margin-left: 12px;
}

.copy-icon::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--text-dimmer);
  border-radius: 3px;
  background: var(--bg-elevated-2);
}

.connect-note {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 12px 0 0;
}

.fallback-note {
  text-align: center;
  color: var(--text-dimmer);
  font-size: 0.9rem;
}

.ip-fallback {
  background: none;
  border: none;
  border-bottom: 1px dashed var(--text-dimmer);
  color: var(--text-dim);
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  cursor: pointer;
  padding: 0;
  font-size: 0.9rem;
}

.ip-fallback:hover { color: var(--text); border-color: var(--text-dim); }

/* Features */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--accent-1);
}

.feature-card p {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin: 0;
}

/* Steps */

.steps {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.steps li {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #05170a;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Kanit', sans-serif;
}

.steps h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.steps p { color: var(--text-dim); margin: 0; font-size: 0.92rem; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 16px;
  text-align: center;
}

.site-footer p {
  color: var(--text-dimmer);
  font-size: 0.85rem;
  margin: 0;
}

/* Toast */

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 12px);
  background: var(--bg-elevated-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 560px) {
  .nav { display: none; }
  .hero { padding: 64px 16px 48px; }
  section { padding: 48px 16px; }
}
