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

:root {
  --primary: #4ade80;
  --primary-dark: #22c55e;
  --primary-light: #86efac;
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --bg: #0b0f19;
  --bg-elevated: #111827;
  --bg-card: rgba(17, 24, 39, .72);
  --bg-card-hover: rgba(17, 24, 39, .9);
  --glass: rgba(255, 255, 255, .06);
  --glass-border: rgba(255, 255, 255, .1);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border: rgba(74, 222, 128, .14);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, .35);
  --shadow-glow: 0 0 40px rgba(74, 222, 128, .12);
  --transition: .3s cubic-bezier(.4, 0, .2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
}

::selection {
  background: rgba(74, 222, 128, .25);
  color: var(--text);
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(11, 15, 25, .75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.5px;
}

.nav-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(74, 222, 128, .25));
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 6px;
  padding: 6px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
}

.nav-link {
  display: block;
  padding: 8px 18px;
  border-radius: 50px;
  color: var(--text-muted);
  font-size: .88rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(74, 222, 128, .12);
  box-shadow: 0 0 16px rgba(74, 222, 128, .08);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Pages */
.page {
  display: none;
  padding-top: 72px;
  min-height: 100vh;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .3s ease, transform .3s ease;
}

.page.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.page.leaving {
  opacity: 0;
  transform: translateY(-16px);
}

.page.entering {
  opacity: 0;
  transform: translateY(20px);
}

.section {
  padding: 90px 0;
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -.5px;
  background: linear-gradient(135deg, var(--text) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-desc {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 52px;
  font-size: 1rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 40px 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(74, 222, 128, .12) 0%, transparent 45%),
    radial-gradient(ellipse at 80% 70%, rgba(245, 158, 11, .08) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 50%, rgba(34, 197, 94, .06) 0%, transparent 60%),
    linear-gradient(180deg, #0b0f19 0%, #0f172a 50%, #0b0f19 100%);
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(74, 222, 128, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 222, 128, .03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at 50% 50%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 0%, transparent 70%);
}

.hero-bg::after {
  content: '';
  position: absolute;
  top: 10%;
  left: 10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(74, 222, 128, .15) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  animation: float 8s ease-in-out infinite;
}

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

.hero-content {
  position: relative;
  text-align: center;
  padding: 40px 20px;
  z-index: 1;
}

.hero-logo {
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
}

.hero-logo::before {
  content: '';
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, rgba(74, 222, 128, .2) 0%, transparent 70%);
  z-index: -1;
}

.hero-logo img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, .4));
  transition: transform .5s ease;
}

.hero-logo img:hover {
  transform: scale(1.05) rotate(-3deg);
}

.hero-content h1 {
  font-size: 3.8rem;
  font-weight: 900;
  letter-spacing: -1.5px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 0%, var(--primary-light) 50%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  letter-spacing: 2px;
}

.hero-info {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero-info span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  font-size: .88rem;
  color: var(--primary-light);
  font-weight: 500;
}

.hero-info i {
  font-size: .85rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-address {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  backdrop-filter: blur(8px);
}

.hero-address code {
  font-size: 1.05rem;
  color: var(--primary-light);
  letter-spacing: .5px;
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
}

.btn-copy {
  padding: 6px 14px;
  background: rgba(74, 222, 128, .12);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--primary);
  font-size: .8rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-copy:hover {
  background: var(--primary);
  color: var(--bg);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border: none;
  border-radius: 50px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-join {
  padding: 14px 32px;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #062c14;
  box-shadow: 0 4px 20px rgba(74, 222, 128, .25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(74, 222, 128, .4);
}

.btn-secondary {
  background: var(--glass);
  color: var(--text);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: rgba(74, 222, 128, .1);
  border-color: var(--border);
}

.hero-widget {
  margin-top: 28px;
}

.hero-widget img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.status-fallback {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 36px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-muted);
}

.status-fallback i {
  font-size: 1.6rem;
  color: var(--primary);
}

.status-fallback code {
  color: var(--primary-light);
  font-size: 1rem;
  font-family: "JetBrains Mono", Consolas, monospace;
}

.status-hint {
  font-size: .8rem;
  opacity: .8;
}

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

.feature-card {
  padding: 36px 28px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border);
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card i {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 18px;
  display: inline-block;
  padding: 16px;
  background: rgba(74, 222, 128, .08);
  border-radius: 16px;
}

.feature-card h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.6;
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  counter-reset: step;
}

.step-card {
  padding: 32px 24px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.step-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-5px);
  border-color: var(--border);
  box-shadow: var(--shadow-glow);
}

.step-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 12px;
  font-weight: 800;
  font-size: 1.1rem;
  color: #062c14;
  margin: 0 auto 16px;
}

.step-card h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.step-card p {
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.55;
}

.step-card code {
  padding: 2px 7px;
  background: rgba(74, 222, 128, .1);
  border-radius: 5px;
  font-size: .85rem;
  font-family: "JetBrains Mono", Consolas, monospace;
}

/* Guide cards */
.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  transition: var(--transition);
}

.guide-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-glow);
}

.guide-card h3 {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
}

.guide-card h3 i {
  color: var(--primary);
}

.guide-card p {
  color: var(--text-muted);
  font-size: .92rem;
  margin-bottom: 14px;
}

.guide-list {
  list-style: none;
}

.guide-list li {
  padding: 10px 0;
  font-size: .9rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--glass-border);
}

.guide-list li:last-child {
  border-bottom: none;
}

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

.guide-list code {
  padding: 2px 8px;
  background: rgba(74, 222, 128, .1);
  border-radius: 5px;
  font-family: "JetBrains Mono", Consolas, monospace;
}

.guide-note {
  color: var(--text-dim);
  font-size: .85rem;
  margin-top: 14px;
}

.guide-note a {
  color: var(--primary-light);
}

/* Server Info */
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  max-width: 900px;
  margin: 0 auto;
}

.info-card {
  padding: 28px 20px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  text-align: center;
  transition: var(--transition);
}

.info-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  border-color: var(--border);
  box-shadow: var(--shadow-glow);
}

.info-card i {
  font-size: 1.7rem;
  color: var(--primary);
  margin-bottom: 14px;
}

.info-card h4 {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.info-card p {
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.server-worlds {
  max-width: 720px;
  margin: 48px auto 0;
}

.server-worlds h3 {
  text-align: center;
  margin-bottom: 22px;
  font-size: 1.25rem;
}

.world-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
}

.world-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  background: var(--bg-card);
}

.world-table th,
.world-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}

.world-table th {
  background: rgba(74, 222, 128, .08);
  color: var(--primary-light);
  font-weight: 600;
  white-space: nowrap;
}

.world-table tr:last-child td {
  border-bottom: none;
}

.world-table td {
  color: var(--text-muted);
}

.world-table td strong {
  color: var(--text);
}

.text-muted {
  color: var(--text-muted);
}

.note {
  font-size: .82rem;
  margin-top: 10px;
  color: var(--text-dim);
}

sup {
  font-size: .75em;
  color: var(--primary-light);
}

/* Rules page */
.rules-content {
  max-width: 720px;
  margin: 0 auto;
}

.rule-block {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 22px;
  transition: var(--transition);
}

.rule-block:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-glow);
}

.rule-block h3 {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
}

.rule-block h3 i {
  color: var(--primary);
}

.rule-block p {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 14px;
}

.rule-list {
  list-style: none;
}

.rule-list li {
  padding: 10px 0;
  font-size: .9rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--glass-border);
}

.rule-list li:last-child {
  border-bottom: none;
}

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

/* Contact */
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 22px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  transition: var(--transition);
}

.contact-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-glow);
}

.contact-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.contact-header i {
  font-size: 2.4rem;
  color: var(--primary);
}

.contact-header h3 {
  font-size: 1.15rem;
}

.group-number {
  color: var(--primary-light);
  font-size: .9rem;
  margin-top: 2px;
  font-family: "JetBrains Mono", Consolas, monospace;
}

.contact-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.email-card p.email-desc {
  color: var(--text-muted);
  font-size: .85rem;
  margin-top: 12px;
  line-height: 1.6;
}

.rules-card {
  max-width: 520px;
  margin: 0 auto 22px;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.rules-card:hover {
  border-color: var(--border);
}

.rules-card h3 {
  margin-bottom: 18px;
}

.rules-list {
  list-style: none;
}

.rules-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: .9rem;
  color: var(--text-muted);
}

.rules-list li i {
  color: var(--primary);
  flex-shrink: 0;
}

/* Links */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 26px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.link-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: rgba(74, 222, 128, .08);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.link-icon i {
  font-size: 1.5rem;
  color: var(--primary);
}

.link-body {
  flex: 1;
  min-width: 0;
}

.link-body h3 {
  font-size: 1.05rem;
  margin-bottom: 3px;
}

.link-body p {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 3px;
  font-family: "JetBrains Mono", Consolas, monospace;
}

.link-body span {
  font-size: .82rem;
  color: var(--text-dim);
}

.link-arrow {
  color: var(--text-muted);
  transition: var(--transition);
}

.link-card:hover .link-arrow {
  color: var(--primary);
  transform: translateX(5px);
}

/* Footer */
.footer {
  border-top: 1px solid var(--glass-border);
  padding: 50px 0 30px;
  background: linear-gradient(180deg, transparent 0%, rgba(74, 222, 128, .03) 100%);
}

.footer-content {
  text-align: center;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 1.2rem;
  font-weight: 700;
}

.footer-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
}

.footer-desc {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.footer-content > p:last-child {
  color: var(--text-dim);
  font-size: .82rem;
}

/* Toast */
.toast {
  position: fixed;
  top: 90px;
  right: 24px;
  padding: 14px 22px;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  box-shadow: var(--shadow-glow);
  opacity: 0;
  transform: translateX(100%);
  transition: var(--transition);
  z-index: 9999;
  pointer-events: none;
  backdrop-filter: blur(12px);
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

/* Reveal animations */
.feature-card,
.step-card,
.info-card,
.guide-card,
.rule-block,
.link-card,
.contact-card,
.rules-card {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .55s ease, transform .55s ease, background .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.feature-card.revealed,
.step-card.revealed,
.info-card.revealed,
.guide-card.revealed,
.rule-block.revealed,
.link-card.revealed,
.contact-card.revealed,
.rules-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 72px;
    left: 16px;
    right: 16px;
    background: rgba(11, 15, 25, .96);
    flex-direction: column;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-content h1 {
    font-size: 2.6rem;
  }

  .hero-logo img {
    width: 120px;
    height: 120px;
  }

  .hero-info {
    gap: 10px;
  }

  .hero-info span {
    font-size: .8rem;
    padding: 6px 14px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-address {
    width: 100%;
    justify-content: center;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .features,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .info-card p {
    font-size: .92rem;
  }

  .info-card {
    padding: 20px 12px;
  }

  .info-card p {
    font-size: .9rem;
  }

  .world-table th,
  .world-table td {
    padding: 10px 12px;
    font-size: .8rem;
  }

  .guide-card,
  .rule-block,
  .contact-card,
  .rules-card {
    padding: 24px;
  }
}

@media (max-width: 900px) and (min-width: 769px) {
  .nav-link {
    padding: 8px 14px;
    font-size: .85rem;
  }

  .info-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
