/* ===== FONT IMPORT & RESET ===== */
@import url("https://fonts.googleapis.com/css2?family=Kanit:wght@400;600;700&display=swap");

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

body {
  font-family: "Kanit", sans-serif;
  /* Màu nền neon gradient */
  background: radial-gradient(circle at top, #0f1624 0%, #080c14 100%);
  color: #e0e0e0;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* ===== UTILITIES (Thêm một lớp cho trạng thái copy) ===== */
.ip-address.copied {
  background: #00ffcc;
  color: #080c14;
  font-weight: bold;
  transition: 0.2s;
}

/* ===== HEADER & NAVIGATION ===== */
header {
  background: rgba(15, 22, 36, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 0 20px rgba(0, 255, 200, 0.3);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.8em;
  font-weight: 700;
  color: #7df9ff;
  text-shadow: 0 0 10px #7df9ff, 0 0 20px #9400d3;
  z-index: 1001; /* Đảm bảo logo nằm trên mobile menu */
}

.mini-logo {
  width: 40px;
  height: 40px;
  margin-right: 10px;
  border-radius: 8px;
  object-fit: cover;
}

nav ul {
  display: flex;
  gap: 20px;
  list-style: none;
}

nav a {
  padding: 8px 15px;
  border-radius: 5px;
  font-weight: 600;
  transition: all 0.3s ease;
}

nav a:hover {
  background: linear-gradient(90deg, #00ffcc, #8a2be2);
  color: #fff;
  box-shadow: 0 0 12px #8a2be2;
}

/* Buttons in Nav (Giữ nguyên phong cách Neon) */
.btn-nav,
.btn-main-nav {
  border-radius: 8px;
  padding: 8px 15px;
  font-weight: bold;
  transition: all 0.3s;
}

.btn-nav {
  /* Discord color */
  background: #7289da;
  color: white;
}

.btn-nav:hover {
  background: #5b6faf;
  box-shadow: 0 0 12px #7289da;
}

/* ĐÃ BỎ CLASS .btn-mess-nav */

.btn-main-nav {
  background: linear-gradient(90deg, #00ffcc, #8a2be2);
  color: #fff;
  box-shadow: 0 0 12px #8a2be2;
}

.btn-main-nav:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px #00ffcc;
}

/* Mobile Menu Icon (Hamburger) */
.menu-toggle {
  display: none;
  cursor: pointer;
  padding: 5px;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: #7df9ff;
  margin: 5px 0;
  transition: 0.4s;
}

/* ===== HERO & IP COPY (Giữ nguyên) ===== */
.hero {
  background: url("back.jpg") center/cover no-repeat;
  text-align: center;
  padding: 130px 20px;
  position: relative;
  z-index: 1;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: -1;
}

.hero h2 {
  font-size: 3em;
  color: #00ffcc;
  text-shadow: 0 0 15px #00ffcc;
}

.hero p {
  font-size: 1.2em;
  margin: 20px 0;
  color: #ccc;
}

.server-info {
  margin-top: 30px;
}

.ip-address {
  font-size: 1.5em;
  background: rgba(0, 255, 204, 0.1);
  padding: 10px 20px;
  border: 2px dashed #00ffcc;
  border-radius: 8px;
  margin-right: 10px;
  color: #7df9ff;
  text-shadow: 0 0 8px #00ffcc;
  transition: background 0.3s;
}

.btn-copy {
  background: linear-gradient(90deg, #8a2be2, #00ffcc);
  color: white;
  font-weight: bold;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.btn-copy:hover {
  box-shadow: 0 0 15px #00ffcc;
  transform: translateY(-2px);
}

.btn-main {
  display: inline-block;
  margin-top: 30px;
  padding: 12px 25px;
  font-size: 1.2em;
  border-radius: 8px;
  background: linear-gradient(90deg, #00ffcc, #8a2be2);
  color: #fff;
  font-weight: bold;
  box-shadow: 0 0 15px #8a2be2;
  transition: 0.3s;
}

.btn-main:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px #00ffcc;
}

/* ===== GAME MODES (Giữ nguyên) ===== */
.game-modes {
  background: rgba(0, 0, 0, 0.4);
  padding: 80px 20px;
  text-align: center;
}

.game-modes h3 {
  color: #7df9ff;
  font-size: 2.2em;
  text-shadow: 0 0 10px #00ffcc;
  margin-bottom: 40px;
}

.mode-grid {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

.mode-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 255, 204, 0.3);
  border-radius: 15px;
  padding: 25px;
  width: 350px;
  transition: all 0.4s;
}

.mode-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 0 20px #8a2be2;
}

.mode-item h4 {
  font-size: 1.6em;
  color: #8a2be2;
  margin-bottom: 15px;
}

.highlight {
  color: #00ffcc;
  font-weight: bold;
}

/* ===== FEATURES & RULES (Giữ nguyên) ===== */
.features {
  padding: 80px 20px;
  background: rgba(15, 22, 36, 0.8);
  text-align: center;
}

.features h3 {
  font-size: 2.2em;
  color: #7df9ff;
  text-shadow: 0 0 10px #00ffcc;
  margin-bottom: 50px;
}

.feature-grid {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.feature-item {
  flex: 1;
  min-width: 280px;
  background: rgba(255, 255, 255, 0.05);
  padding: 25px;
  border-radius: 10px;
  transition: all 0.3s;
}

.feature-item:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px #00ffcc;
}

.feature-item h4 {
  color: #8a2be2;
  font-size: 1.4em;
  margin-bottom: 10px;
}

.rules {
  padding: 80px 20px;
  background: rgba(0, 0, 0, 0.4);
  text-align: center;
}

.rules h3 {
  font-size: 2.2em;
  color: #ff4d6d;
  margin-bottom: 20px;
  text-shadow: 0 0 10px #ff4d6d;
}

.rule-intro {
  margin-bottom: 40px;
  font-style: italic;
}

.rule-list {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.rule-category {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 25px;
  width: 400px;
  border-left: 5px solid #ff4d6d;
}

.rule-category:last-child {
  border-left-color: #ffd700;
}

.rule-category h4 {
  color: #ff4d6d;
  font-size: 1.5em;
  margin-bottom: 10px;
}

.rule-category ul {
  list-style: disc;
  padding-left: 20px;
  color: #ccc;
}

/* ===== CONTACT/SUPPORT (Chức năng Liên hệ mới) ===== */
.contact-support {
  padding: 80px 20px;
  text-align: center;
  background: #1e1e2e;
}

.contact-support h3 {
  font-size: 2em;
  color: #00ffcc;
  margin-bottom: 20px;
}

.contact-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 30px;
}

.contact-item {
  background: rgba(0, 255, 204, 0.1);
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #00ffcc;
  width: 300px;
  transition: 0.3s;
}

.contact-item:hover {
  box-shadow: 0 0 15px #00ffcc;
}

.contact-item h4 {
  color: #7df9ff;
  margin-bottom: 10px;
}

.contact-item a {
  color: #8a2be2;
  font-weight: bold;
  transition: 0.3s;
}

.contact-item a:hover {
  color: #00ffcc;
}

/* ===== JOIN INSTRUCTIONS (Hướng dẫn tham gia mới) ===== */
.join-guide {
  padding: 80px 20px;
  text-align: center;
  background: rgba(0, 0, 0, 0.6);
}

.join-guide h3 {
  color: #00ffcc;
  font-size: 2.2em;
  margin-bottom: 40px;
  text-shadow: 0 0 10px #00ffcc;
}

.guide-steps {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.guide-box {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid #8a2be2;
  border-radius: 12px;
  padding: 30px;
  width: 45%;
  min-width: 300px;
  text-align: left;
  transition: 0.3s;
}

.guide-box:hover {
  box-shadow: 0 0 20px rgba(138, 43, 226, 0.7);
  transform: translateY(-5px);
}

.guide-box h4 {
  font-size: 1.5em;
  color: #8a2be2;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(138, 43, 226, 0.5);
  padding-bottom: 5px;
}

.guide-box ol {
  list-style: none;
  counter-reset: step-counter;
  padding: 0;
}

.guide-box ol li {
  counter-increment: step-counter;
  margin-bottom: 15px;
  padding-left: 30px;
  position: relative;
}

.guide-box ol li::before {
  content: counter(step-counter);
  background: #00ffcc;
  color: #080c14;
  font-weight: bold;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 0;
  top: 0;
}

.ip-highlight {
  color: #7df9ff;
  font-weight: bold;
  background: rgba(0, 255, 204, 0.1);
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid #00ffcc;
}

/* ===== CTA & FOOTER (Thêm style cho nút Messenger) ===== */
.cta {
  padding: 80px 20px;
  text-align: center;
  background: linear-gradient(90deg, #8a2be2, #00ffcc);
  color: white;
}

.cta h3 {
  font-size: 2em;
  margin-bottom: 15px;
}

.btn-secondary {
  display: inline-block;
  background: #1e1e2e;
  color: white;
  padding: 12px 25px;
  border-radius: 8px;
  margin-top: 20px;
  margin: 10px; /* Thêm margin để tách hai nút */
  font-weight: bold;
  transition: 0.3s;
}

.btn-secondary:hover {
  background: #333;
  box-shadow: 0 0 15px #fff;
}

/* Style riêng cho nút Messenger ở CTA */
.btn-mess {
  background: #0084ff; /* Màu Messenger */
}

.btn-mess:hover {
  background: #0066cc;
  box-shadow: 0 0 15px #0084ff;
}

.small-text {
  font-size: 0.9em;
  margin-top: 15px;
  opacity: 0.9;
}

footer {
  background: rgba(10, 10, 20, 0.9);
  text-align: center;
  padding: 20px 0;
  font-size: 0.9em;
  color: #aaa;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a {
  color: #00ffcc;
  margin: 0 8px;
  transition: 0.3s;
}

.social-links a:hover {
  color: #8a2be2;
}

/* ===== RESPONSIVE OPTIMIZATION (Tối ưu Mobile) ===== */
@media (max-width: 768px) {
  /* 2. Tối ưu Header Mobile */
  header .container {
    padding: 10px 20px;
  }

  .menu-toggle {
    display: block; /* Hiện Hamburger Menu */
  }

  nav ul {
    display: none; /* Ẩn menu mặc định */
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 0;
    left: 0;
    background: rgba(15, 22, 36, 0.95);
    padding: 20px 0;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  nav ul.show {
    display: flex;
  }

  nav ul li {
    margin: 0;
    text-align: center;
  }

  nav a {
    display: block;
    padding: 10px;
    border-radius: 0;
  }

  /* Ẩn IP address và chỉ hiện nút copy trên mobile */
  .ip-address {
    display: block;
    margin: 10px auto;
    font-size: 1.2em;
  }

  .btn-copy {
    display: block;
    width: 80%;
    margin: 0 auto;
  }

  .online-status {
    margin-top: 15px;
  }

  .hero h2 {
    font-size: 2.2em;
  }

  /* Cấu trúc grid */
  .mode-grid,
  .rule-list,
  .feature-grid,
  .contact-grid,
  .guide-steps {
    flex-direction: column;
    gap: 20px;
  }

  .mode-item,
  .rule-category,
  .feature-item,
  .contact-item,
  .guide-box {
    width: 100%;
    max-width: none;
  }

  .contact-item {
    width: 80%;
    margin: 0 auto;
  }

  /* Cập nhật lại margin cho nút CTA để tránh tràn */
  .cta .btn-secondary {
    margin: 10px 5px;
  }
}
