/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0e1117;
  --surface:     #161b22;
  --surface-2:   #1f2937;
  --border:      #30363d;
  --green:       #3fb950;
  --green-dim:   #238636;
  --green-glow:  rgba(63, 185, 80, 0.18);
  --bedrock:     #f78166;
  --java:        #79c0ff;
  --text:        #e6edf3;
  --text-muted:  #8b949e;
  --radius:      10px;
  --radius-lg:   16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ─── Password Gate ─── */
#gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem;
}

#gate-overlay.hidden {
  display: none;
}

.gate-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 60px rgba(63, 185, 80, 0.08);
}

.gate-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
  line-height: 1;
}

.gate-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.9rem;
  color: var(--green);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.gate-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gate-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  width: 100%;
  text-align: center;
  letter-spacing: 0.15em;
  outline: none;
  transition: border-color 0.15s;
}

.gate-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}

.gate-input.error {
  border-color: #f85149;
  animation: shake 0.3s ease;
}

.gate-btn {
  background: var(--green-dim);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  transition: background 0.15s, transform 0.1s;
}

.gate-btn:hover { background: var(--green); }
.gate-btn:active { transform: scale(0.98); }

.gate-error {
  color: #f85149;
  font-size: 0.8rem;
  min-height: 1.2em;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-6px); }
  75%       { transform: translateX(6px); }
}

/* ─── Layout ─── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ─── Header ─── */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  background: var(--surface);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.grass-block { font-size: 2rem; line-height: 1; }

.site-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.1rem;
  color: var(--green);
  line-height: 1.4;
}

.site-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ─── Server Card ─── */
.server-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
  box-shadow: 0 0 40px var(--green-glow);
}

.server-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.server-address-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.server-address {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(0.7rem, 3vw, 1.1rem);
  color: var(--green);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  display: inline-block;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.55rem 0.9rem;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.copy-btn:hover { background: var(--border); border-color: var(--green); color: var(--green); }

.port-pills {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
}

.pill-java    { background: rgba(121, 192, 255, 0.15); color: var(--java);    border: 1px solid rgba(121, 192, 255, 0.3); }
.pill-bedrock { background: rgba(247, 129, 102, 0.15); color: var(--bedrock); border: 1px solid rgba(247, 129, 102, 0.3); }

.server-note {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ─── Platform Section ─── */
.platform-section { margin-bottom: 3rem; }

.section-heading {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.tab-bar {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.tab {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.55rem 1rem;
  transition: all 0.15s;
}

.tab:hover { color: var(--text); border-color: var(--green); }
.tab.active {
  background: var(--green-glow);
  border-color: var(--green);
  color: var(--green);
  font-weight: 600;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── Steps ─── */
.steps {
  list-style: none;
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.steps li {
  counter-increment: steps;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.92rem;
}

.steps li::before {
  content: counter(steps);
  background: var(--green-dim);
  color: #fff;
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.steps-sm li { font-size: 0.84rem; }

.inline-code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.88em;
  padding: 0.1em 0.4em;
  color: var(--green);
}

.tip-box {
  background: rgba(121, 192, 255, 0.07);
  border: 1px solid rgba(121, 192, 255, 0.2);
  border-radius: var(--radius);
  font-size: 0.84rem;
  padding: 0.85rem 1rem;
  color: var(--text-muted);
}

/* ─── Console Grid ─── */
.console-intro {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.console-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.console-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.console-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.console-icon {
  font-style: normal;
  font-size: 1.1em;
}

.watch-video-prompt {
  margin-top: 0.85rem;
  font-size: 0.78rem;
  color: var(--green);
  font-weight: 500;
}

/* ─── BedrockConnect DNS Box ─── */
.bedrock-dns-box {
  background: rgba(247, 129, 102, 0.06);
  border: 1px solid rgba(247, 129, 102, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.bedrock-dns-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--bedrock);
  margin-bottom: 1rem;
}

.bedrock-dns-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.bedrock-dns-ip {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.bedrock-dns-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
}

.bedrock-ip {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.75rem;
  color: var(--bedrock);
  background: var(--bg);
  border: 1px solid rgba(247, 129, 102, 0.3);
  border-radius: var(--radius);
  padding: 0.5rem 0.9rem;
  display: inline-block;
}

.bedrock-dns-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.bedrock-dns-note a {
  color: var(--bedrock);
  text-decoration: none;
}

.bedrock-dns-note a:hover { text-decoration: underline; }

/* ─── Video ─── */
.video-section { margin-top: 0.5rem; }

.video-heading {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.video-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ─── Help / FAQ ─── */
.help-section {
  margin-bottom: 3rem;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.faq-item h3 {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.faq-item p {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.65;
}

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

/* ─── Footer ─── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
  .site-title { font-size: 0.8rem; }
  .server-address { font-size: 0.65rem; }
  .tab { font-size: 0.78rem; padding: 0.5rem 0.75rem; }
  .gate-title { font-size: 0.75rem; }
}
