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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background-color: #1a1a1a;
  color: #e0e0e0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #8AB84F;
  text-decoration: none;
}

a:hover {
  color: #a0d060;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #2a2a2a;
  border-bottom: 3px solid #3a3a3a;
  z-index: 1000;
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #e0e0e0;
  letter-spacing: 1px;
}

.nav-logo:hover {
  color: #e0e0e0;
}

.nav-logo-img {
  height: 32px;
  width: auto;
  display: block;
  image-rendering: pixelated;
}

.nav-logo-icon {
  color: #6B8F3E;
  font-size: 1.4rem;
}

.nav-menu {
  display: flex;
  gap: 4px;
}

.nav-link {
  display: block;
  padding: 8px 16px;
  color: #b0b0b0;
  font-size: 0.9rem;
  border: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}

.nav-link:hover,
.nav-link.active {
  color: #e0e0e0;
  border-color: #6B8F3E;
  background-color: #333;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  background: none;
  border: 2px solid #5a5a5a;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background-color: #b0b0b0;
  transition: 0.2s;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px 60px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(26, 26, 26, 0.75);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 4px;
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: 1rem;
  color: #8AB84F;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.hero-desc {
  font-size: 1.1rem;
  color: #b0b0b0;
  max-width: 500px;
  margin: 0 auto 32px;
}

.hero-ips {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-ip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background-color: #2a2a2a;
  border: 3px solid #4a4a4a;
  padding: 12px 20px;
}

.hero-ip-label {
  font-size: 0.85rem;
  color: #999;
}

.hero-ip-address {
  font-family: "Courier New", monospace;
  font-size: 1.3rem;
  font-weight: 700;
  color: #8AB84F;
  letter-spacing: 1px;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background-color: #3a3a3a;
  border: 2px solid #5a5a5a;
  color: #e0e0e0;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.btn-copy:hover {
  background-color: #4a4a4a;
  border-color: #6B8F3E;
}

.btn-copy.copied {
  border-color: #6B8F3E;
  color: #8AB84F;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border: 2px solid #4a4a4a;
  font-size: 0.8rem;
  color: #b0b0b0;
}

/* ===== Section ===== */
.section {
  padding: 80px 0;
}

.section-dark {
  background-color: #222;
  border-top: 3px solid #333;
  border-bottom: 3px solid #333;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #f0f0f0;
  text-align: center;
  margin-bottom: 8px;
}

.section-title .mdi {
  color: #6B8F3E;
  margin-right: 6px;
}

.section-desc {
  text-align: center;
  color: #999;
  max-width: 600px;
  margin: 0 auto 48px;
  font-size: 1rem;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.about-card {
  background-color: #2a2a2a;
  border: 3px solid #3a3a3a;
  padding: 32px 24px;
  text-align: center;
}

.about-card-icon {
  font-size: 2.5rem;
  color: #6B8F3E;
  margin-bottom: 12px;
}

.about-card h3 {
  font-size: 1.1rem;
  color: #f0f0f0;
  margin-bottom: 8px;
}

.about-card p {
  font-size: 0.9rem;
  color: #999;
}

/* ===== Modes ===== */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.mode-card {
  background-color: #2a2a2a;
  border: 3px solid #3a3a3a;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
}

.mode-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.mode-card-icon {
  font-size: 1.8rem;
  color: #6B8F3E;
  flex-shrink: 0;
}

.mode-card-header h3 {
  font-size: 1.15rem;
  color: #f0f0f0;
}

.mode-card > p {
  font-size: 0.9rem;
  color: #b0b0b0;
  margin-bottom: 16px;
  flex-grow: 1;
}

.mode-features {
  border-top: 2px solid #3a3a3a;
  padding-top: 14px;
}

.mode-features li {
  font-size: 0.85rem;
  color: #999;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mode-features li .mdi-check {
  color: #6B8F3E;
  font-size: 1rem;
  flex-shrink: 0;
}

/* ===== Join ===== */
.join-steps {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.join-step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.join-step-num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: #8AB84F;
  border: 3px solid #4a4a4a;
  background-color: #2a2a2a;
}

.join-step-content h3 {
  font-size: 1.05rem;
  color: #f0f0f0;
  margin-bottom: 4px;
}

.join-step-content p {
  font-size: 0.9rem;
  color: #b0b0b0;
}

.join-step-content strong {
  color: #8AB84F;
}

.join-ips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.join-ip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background-color: #2a2a2a;
  border: 2px solid #4a4a4a;
}

.join-ip-text {
  font-family: "Courier New", monospace;
  font-size: 1rem;
  font-weight: 700;
  color: #8AB84F;
}

.btn-copy-sm {
  padding: 4px 8px;
}

/* ===== Team ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.team-card {
  background-color: #2a2a2a;
  border: 3px solid #3a3a3a;
  padding: 32px 20px;
  text-align: center;
}

.team-avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border: 3px solid #4a4a4a;
  overflow: hidden;
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: auto;
}

.team-card h3 {
  font-size: 1.1rem;
  color: #f0f0f0;
  margin-bottom: 4px;
}

.team-role {
  display: inline-block;
  font-size: 0.8rem;
  color: #8AB84F;
  border: 1px solid #4a4a4a;
  padding: 2px 10px;
  margin-bottom: 8px;
}

.team-card p {
  font-size: 0.85rem;
  color: #999;
}

/* ===== Rules ===== */
.rules-card {
  max-width: 860px;
  margin: 0 auto;
  background-color: #222;
  border: 3px solid #3a3a3a;
  padding: 36px 32px;
}

.rules-motd {
  text-align: center;
  margin-bottom: 20px;
}

.rules-motd-title {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: #FFAA00;
  letter-spacing: 2px;
}

.rules-motd-subs {
  display: block;
  margin-top: 4px;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  color: #FFFF55;
}

.rules-intro {
  text-align: center;
  font-size: 0.95rem;
  color: #e0e0e0;
  margin-bottom: 24px;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.rule-item {
  background-color: #2a2a2a;
  border: 2px solid #3a3a3a;
  padding: 18px 20px;
}

.rule-item h4 {
  font-size: 1rem;
  color: #55FFFF;
  margin-bottom: 8px;
}

.rule-item li {
  position: relative;
  padding: 3px 0 3px 14px;
  font-size: 0.85rem;
  color: #b0b0b0;
}

.rule-item li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  background-color: #6B8F3E;
}

.rules-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid #3a3a3a;
  text-align: center;
}

.rules-motto {
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFF55;
  letter-spacing: 1px;
}

.rules-note {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #AAAAAA;
}

/* ===== Footer ===== */
.footer {
  background-color: #1a1a1a;
  border-top: 3px solid #2a2a2a;
  padding: 32px 0;
  text-align: center;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-name {
  font-size: 1rem;
  color: #ccc;
}

.footer-name .mdi-minecraft {
  color: #6B8F3E;
  margin-right: 4px;
}

.footer-ip {
  font-size: 0.85rem;
  color: #777;
  font-family: "Courier New", monospace;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  font-size: 0.85rem;
  color: #777;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.footer-link:hover {
  color: #8AB84F;
  border-color: #8AB84F;
}

.footer-copy {
  font-size: 0.78rem;
  color: #555;
  margin-top: 4px;
}

.footer-tech {
  font-size: 0.8rem;
  color: #666;
}

.footer-tech a {
  color: #8AB84F;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.footer-tech a:hover {
  color: #a0d060;
  border-color: #8AB84F;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .about-grid,
  .modes-grid,
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background-color: #2a2a2a;
    border-bottom: 3px solid #3a3a3a;
    gap: 0;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-link {
    padding: 14px 20px;
    border: none;
    border-top: 1px solid #3a3a3a;
  }

  .nav-link:hover,
  .nav-link.active {
    border: none;
    border-top: 1px solid #3a3a3a;
    background-color: #333;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-ips {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-ip {
    flex-direction: column;
    gap: 8px;
  }

  .hero-ip-address {
    font-size: 1.1rem;
  }

  .about-grid,
  .modes-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 48px 0;
  }

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

  .join-step {
    flex-direction: column;
    align-items: stretch;
  }

  .join-step-num {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .rules-card {
    padding: 24px 18px;
  }

  .rules-grid {
    grid-template-columns: 1fr;
  }
}
