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

:root {
  /* Light theme (default) */
  --bg-primary: #f8f9fa;
  --bg-secondary: #e9ecef;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f3f5;
  --green: #4caf50;
  --green-dark: #388e3c;
  --green-light: #2e7d32;
  --gold: #e6a817;
  --text-primary: #212529;
  --text-secondary: #495057;
  --text-muted: #868e96;
  --border: #dee2e6;
  --border-light: #ced4da;
  --red: #e74c3c;
  --blue: #3498db;
  --purple: #9b59b6;
  --orange: #e67e22;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --hero-bg: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 40%, #e8f5e9 100%);
}

[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #252525;
  --bg-card: #2d2d2d;
  --bg-card-hover: #353535;
  --green: #5cbd3e;
  --green-dark: #3d8a2e;
  --green-light: #7dfc5e;
  --gold: #f2c94c;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --text-muted: #707070;
  --border: #3a3a3a;
  --border-light: #4a4a4a;
  --red: #e74c3c;
  --blue: #3498db;
  --purple: #9b59b6;
  --orange: #e67e22;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --hero-bg: linear-gradient(135deg, #1a1a1a 0%, #1e2f1a 40%, #1a2815 100%);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Subtle Minecraft block pattern background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(76,175,80,0.8) 0%, transparent 1.5px),
    radial-gradient(circle at 70% 15%, rgba(76,175,80,0.6) 0%, transparent 1.5px),
    radial-gradient(circle at 40% 70%, rgba(139,100,60,0.5) 0%, transparent 1.5px),
    radial-gradient(circle at 80% 65%, rgba(139,100,60,0.4) 0%, transparent 1.5px),
    radial-gradient(circle at 10% 85%, rgba(76,175,80,0.5) 0%, transparent 1.5px),
    radial-gradient(circle at 60% 45%, rgba(139,100,60,0.3) 0%, transparent 1.5px);
  background-size: 200px 200px;
}

[data-theme="dark"] body::before {
  opacity: 0.04;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(92,189,62,0.6) 0%, transparent 1.5px),
    radial-gradient(circle at 70% 15%, rgba(92,189,62,0.4) 0%, transparent 1.5px),
    radial-gradient(circle at 40% 70%, rgba(200,150,80,0.3) 0%, transparent 1.5px),
    radial-gradient(circle at 80% 65%, rgba(200,150,80,0.2) 0%, transparent 1.5px),
    radial-gradient(circle at 10% 85%, rgba(92,189,62,0.3) 0%, transparent 1.5px),
    radial-gradient(circle at 60% 45%, rgba(200,150,80,0.15) 0%, transparent 1.5px);
}

/* Make sure main content is above pseudo-element background */
.header, section, footer, .toast, .modal-overlay { position: relative; z-index: 1; }

a {
  color: var(--green);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--green-light);
}

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

button {
  cursor: pointer;
  font-family: inherit;
}

input, textarea {
  font-family: inherit;
}

/* ========== Header & Nav ========== */
.header {
  background: var(--bg-primary);
  border-bottom: 3px solid var(--green-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
[data-theme="dark"] .header {
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 66px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 1px;
  flex-shrink: 0;
  text-decoration: none;
  transition: opacity 0.2s;
}
.nav-logo:hover {
  opacity: 0.85;
  color: var(--text-primary);
}

.nav-logo .logo-icon {
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
  border-radius: 6px;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), inset 0 -2px 0 rgba(0,0,0,0.15);
}

.nav-links {
  display: flex;
  gap: 2px;
  list-style: none;
  flex-wrap: wrap;
  align-items: center;
}

.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--green);
  transition: all 0.2s;
  transform: translateX(-50%);
  border-radius: 1px;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--bg-card);
  color: var(--green-dark);
}

[data-theme="dark"] .nav-links a:hover,
[data-theme="dark"] .nav-links a.active {
  color: var(--green);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 60%;
}

/* Download btn in nav */
.nav-dl-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--green-dark), var(--green)) !important;
  color: #fff !important;
  font-weight: 700 !important;
  padding: 9px 20px !important;
  border-radius: 20px !important;
  transition: all 0.25s !important;
  box-shadow: 0 2px 8px rgba(56, 142, 60, 0.25);
}
.nav-dl-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(56, 142, 60, 0.35);
  color: #fff !important;
}

/* Nav divider */
.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 6px;
  flex-shrink: 0;
}

/* ================================================================ */
/*  USER DROPDOWN MENU                                              */
/* ================================================================ */

.nav-user-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 4px;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  border-radius: 22px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  background: none;
  font-family: inherit;
  color: var(--text-primary);
}
.dropdown-trigger:hover,
.dropdown-trigger.active {
  background: var(--bg-card);
  border-color: var(--border);
}

.dropdown-trigger-avatar {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1.5px solid var(--green);
  image-rendering: pixelated;
  flex-shrink: 0;
}

.dropdown-trigger-name {
  font-weight: 600;
  font-size: 0.88rem;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-arrow {
  font-size: 0.6rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.dropdown-trigger.active .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 150;
  padding: 6px;
  animation: dropdownIn 0.15s ease;
}

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dropdown-menu.open {
  display: block;
}

.dropdown-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: none;
  font-family: inherit;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
.dropdown-menu-item:hover {
  background: var(--bg-card-hover);
  color: var(--green-dark);
}
[data-theme="dark"] .dropdown-menu-item:hover {
  color: var(--green);
}

.dropdown-menu-item.theme-item {
  justify-content: space-between;
}

.theme-item-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-item-icon {
  font-size: 0.8rem;
  width: 20px;
  text-align: center;
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 8px;
}

.dropdown-menu-item.logout-item {
  color: var(--red);
}
.dropdown-menu-item.logout-item:hover {
  background: rgba(231, 76, 60, 0.08);
  color: var(--red);
}

/* Login button in nav (when not logged in) */
.nav-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: transparent;
  border: 2px solid var(--green);
  color: var(--green-dark);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.nav-login-btn:hover {
  background: var(--green);
  color: #fff;
}
[data-theme="dark"] .nav-login-btn {
  color: var(--green);
}
[data-theme="dark"] .nav-login-btn:hover {
  color: #fff;
}

/* Responsive dropdown */
@media (max-width: 768px) {
  .dropdown-trigger-name {
    max-width: 70px;
  }
}

/* User area in nav */
.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.nav-user .user-name {
  color: var(--green-dark);
  font-size: 0.9rem;
  font-weight: 600;
}

[data-theme="dark"] .nav-user .user-name {
  color: var(--green-light);
}

/* Theme toggle button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-card);
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s;
  color: var(--text-primary);
  padding: 0;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--green);
  background: var(--bg-card-hover);
  transform: rotate(15deg);
}

/* ================================================================ */
/*  PROFILE PAGE                                                    */
/* ================================================================ */

.profile-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px;
}

.profile-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 30px;
  text-align: center;
  margin-bottom: 24px;
}

.profile-avatar-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  border: 3px solid var(--green);
  image-rendering: pixelated;
}

.profile-avatar-edit {
  position: absolute;
  bottom: -4px;
  right: -12px;
  background: var(--green-dark);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 0.75rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}
.profile-avatar-edit:hover {
  background: var(--green);
}

.profile-display-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.profile-mc-id {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.profile-title {
  display: inline-block;
  background: rgba(76, 175, 80, 0.1);
  color: var(--green-dark);
  padding: 3px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

[data-theme="dark"] .profile-title {
  background: rgba(92, 189, 62, 0.12);
  color: var(--green-light);
}

.profile-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.profile-btn {
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
}
.profile-btn:hover {
  border-color: var(--green);
  color: var(--green);
}

.profile-btn.primary {
  background: var(--green-dark);
  color: #fff;
  border-color: var(--green-dark);
}
.profile-btn.primary:hover {
  background: var(--green);
  border-color: var(--green);
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.profile-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.profile-stat-card .pstat-num {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--green-dark);
}
[data-theme="dark"] .profile-stat-card .pstat-num {
  color: var(--green);
}
.profile-stat-card .pstat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.profile-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.profile-section h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.profile-section .form-group {
  margin-bottom: 14px;
}
.profile-section .form-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.profile-section .form-group input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
}
.profile-section .form-group input:focus {
  border-color: var(--green);
}

.nav-user .btn-sm {
  padding: 5px 12px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-login {
  background: transparent;
  border: 1px solid var(--green) !important;
  color: var(--green);
}
.btn-login:hover {
  background: var(--green);
  color: #fff;
}

.btn-register {
  background: var(--green-dark);
  color: #fff;
}
.btn-register:hover {
  background: var(--green);
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--text-muted) !important;
  color: var(--text-muted);
  font-size: 0.78rem !important;
}
.btn-logout:hover {
  border-color: var(--red) !important;
  color: var(--red);
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--green);
  transition: 0.3s;
  border-radius: 2px;
}

/* ========== Keyframe Animations ========== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(76,175,80,0.3); }
  50% { box-shadow: 0 0 0 12px rgba(76,175,80,0); }
}

.section { animation: fadeInUp 0.6s ease-out; }
.card { animation: fadeInUp 0.5s ease-out; }
.card:nth-child(2) { animation-delay: 0.08s; }
.card:nth-child(3) { animation-delay: 0.16s; }
.card:nth-child(4) { animation-delay: 0.24s; }

/* ========== Hero ========== */
.hero {
  background: var(--hero-bg);
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.8s ease-out;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(76, 175, 80, 0.04) 2px, rgba(76, 175, 80, 0.04) 4px);
  pointer-events: none;
}

[data-theme="dark"] .hero::before {
  background:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(92, 189, 62, 0.03) 2px, rgba(92, 189, 62, 0.03) 4px);
}

.hero-content {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 900;
  color: var(--green-dark);
  letter-spacing: 4px;
  margin-bottom: 12px;
  animation: float 4s ease-in-out infinite;
}

[data-theme="dark"] .hero h1 {
  color: var(--green);
  text-shadow: 0 0 40px rgba(92, 189, 62, 0.3);
}

.hero .subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero .server-ip {
  display: inline-block;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 14px 32px;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 1.3rem;
  color: var(--green-light);
  cursor: pointer;
  transition: all 0.3s;
  user-select: all;
  letter-spacing: 1px;
}
.hero .server-ip:hover {
  border-color: var(--green);
  box-shadow: 0 0 20px rgba(92, 189, 62, 0.15);
}

.hero .ip-hint {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Hero download button */
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--green-dark);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}
.btn-download:hover {
  background: var(--green);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(92, 189, 62, 0.3);
}

.btn-download .dl-icon {
  font-size: 1.3rem;
}

.btn-download.outline {
  background: transparent;
  border: 2px solid var(--green);
  color: var(--green);
}
.btn-download.outline:hover {
  background: var(--green);
  color: #fff;
}

/* ========== Sections ========== */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.section-title span {
  color: var(--green);
}

.section-title .accent-gold {
  color: var(--gold);
}

.section-title .accent-blue {
  color: var(--blue);
}

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

/* Full-width band */
.section-band {
  background: var(--bg-secondary);
  max-width: 100%;
  padding: 60px 24px;
}

.section-band > .section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* ========== Cards Grid ========== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all 0.3s cubic-bezier(0.25,0.46,0.45,0.94);
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--green);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(76,175,80,0.1);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========== Plugin Showcase ========== */
.plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.plugin-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all 0.25s;
}
.plugin-item:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
}

.plugin-item .plugin-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.plugin-dot.green { background: var(--green); }
.plugin-dot.blue  { background: var(--blue); }
.plugin-dot.gold  { background: var(--gold); }
.plugin-dot.purple{ background: var(--purple); }
.plugin-dot.orange{ background: var(--orange); }
.plugin-dot.red   { background: var(--red); }

.plugin-item .plugin-info h4 {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.plugin-item .plugin-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========== Achievement Cards ========== */
.achv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.achv-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  display: flex;
  gap: 16px;
  transition: all 0.25s;
}
.achv-card:hover {
  border-color: var(--gold);
  background: var(--bg-card-hover);
}

.achv-card .achv-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
}

.achv-card .achv-info h4 {
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 4px;
}

.achv-card .achv-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.achv-card .achv-info .achv-reward {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.78rem;
  background: rgba(242, 201, 76, 0.12);
  color: var(--gold);
  padding: 2px 10px;
  border-radius: 12px;
}

/* ========== Command Page Styles ========== */
.command-page .section {
  padding-top: 40px;
}

.cmd-category {
  margin-bottom: 40px;
}

.cmd-category h3 {
  font-size: 1.3rem;
  color: var(--green);
  margin-bottom: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.cmd-category .cat-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

/* Table */
.cmd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.cmd-table th {
  background: var(--bg-secondary);
  color: var(--green-light);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.cmd-table td {
  padding: 10px 16px;
  border: 1px solid var(--border);
  vertical-align: top;
}

.cmd-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.015);
}

.cmd-table code {
  background: var(--bg-primary);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.88rem;
  color: var(--green-dark);
  white-space: nowrap;
}

[data-theme="dark"] .cmd-table code {
  color: var(--gold);
}

.cmd-table .perm {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}

.perm-user  { background: #2a4a2a; color: var(--green-light); }
.perm-vip   { background: #4a3a1a; color: var(--gold); }
.perm-admin { background: #4a1a1a; color: var(--red); }
.perm-moderator { background: #1a2a4a; color: var(--blue); }

/* Note / Tip boxes */
.note-box {
  background: rgba(92, 189, 62, 0.08);
  border-left: 3px solid var(--green);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.note-box strong { color: var(--green); }

.note-box.warn {
  background: rgba(230, 126, 34, 0.08);
  border-left-color: var(--orange);
}
.note-box.warn strong { color: var(--orange); }

.tip-box {
  background: rgba(52, 152, 219, 0.08);
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.tip-box strong { color: var(--blue); }

/* ========== Systems Page ========== */
.system-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 50px;
  align-items: start;
}

.system-detail:nth-child(even) {
  direction: rtl;
}
.system-detail:nth-child(even) > * {
  direction: ltr;
}

.system-info h2 {
  font-size: 1.6rem;
  margin-bottom: 10px;
}
.system-info h2 span {
  color: var(--green);
}
.system-info .sys-desc {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.system-info .sys-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.system-info .sys-features li {
  padding-left: 20px;
  position: relative;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.system-info .sys-features li::before {
  content: "\2714";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.system-visual {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.system-visual .emoji-display {
  font-size: 4rem;
}

/* ========== Server Stats ========== */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.stat-item {
  text-align: center;
  transition: transform 0.3s;
}
.stat-item:hover {
  transform: translateY(-4px);
}

.stat-num {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--green);
  letter-spacing: 1px;
  transition: color 0.3s;
}
.stat-item:hover .stat-num {
  color: var(--green-dark);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ========== Client Download Section ========== */
.download-section {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.download-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .download-cards { grid-template-columns: 1fr; }
}

.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s;
}

.download-card:hover {
  border-color: var(--green);
  box-shadow: 0 4px 20px rgba(76,175,80,0.1);
  transform: translateY(-2px);
}

.download-section h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.download-section .dl-version {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.download-card .btn-download {
  margin-top: 4px;
}

.btn-download.java-dl-btn {
  background: #c26e3a;
}
.btn-download.java-dl-btn:hover {
  background: #a85828;
  box-shadow: 0 8px 25px rgba(194,110,58,0.3);
}

/* ========== Forum Vote Buttons ========== */
.vote-row {
  display: inline-flex;
  gap: 4px;
  margin-left: 8px;
}

.vote-btn {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: 4px 10px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.vote-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.vote-btn.voted-like {
  background: #e8f5e9;
  border-color: var(--green);
  color: var(--green-dark);
}
[data-theme="dark"] .vote-btn.voted-like {
  background: #1e3a1e;
  border-color: var(--green);
  color: var(--green);
}

.vote-btn.voted-dislike {
  background: #ffebee;
  border-color: var(--red);
  color: var(--red);
}
[data-theme="dark"] .vote-btn.voted-dislike {
  background: #3a1e1e;
  border-color: var(--red);
  color: #ff6b6b;
}

.vote-count {
  font-weight: 600;
}

/* ========== Toast ========== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green-dark);
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 9999;
}
.toast.show {
  opacity: 1;
}

/* ========== Tag / Badge ========== */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.tag-new { background: var(--green-dark); color: #fff; }
.tag-hot { background: var(--red); color: #fff; }
.tag-rec  { background: var(--blue); color: #fff; }

/* ========== Footer ========== */
.footer {
  background: var(--bg-secondary);
  border-top: 2px solid var(--border);
  text-align: center;
  padding: 30px 24px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer .footer-name {
  color: var(--green);
  font-weight: 600;
}

/* ================================================================ */
/*  MODAL (Login / Register / Post Create)                          */
/* ================================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 32px 28px;
  width: 100%;
  max-width: 420px;
  position: relative;
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal .modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.modal .modal-close:hover {
  color: var(--text-primary);
}

.modal h2 {
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: var(--green);
}

.modal .form-group {
  margin-bottom: 16px;
}

.modal .form-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.modal .form-group input,
.modal .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.modal .form-group input:focus,
.modal .form-group textarea:focus {
  border-color: var(--green);
}

.modal .form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.modal .btn-submit {
  width: 100%;
  padding: 12px;
  background: var(--green-dark);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.modal .btn-submit:hover {
  background: var(--green);
}

.modal .form-error {
  color: var(--red);
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 12px;
  min-height: 20px;
}

.modal .form-footer {
  text-align: center;
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.modal .form-footer a {
  color: var(--green);
  cursor: pointer;
}
.modal .form-footer a:hover {
  color: var(--green-light);
}

/* ================================================================ */
/*  FORUM                                                           */
/* ================================================================ */
.forum-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  align-items: start;
}

.forum-main {
  min-width: 0;
}

.forum-sidebar {
  position: sticky;
  top: 84px;
}

.forum-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}

.forum-header h2 {
  font-size: 1.5rem;
}

.btn-new-post {
  padding: 10px 22px;
  background: var(--green-dark);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-new-post:hover {
  background: var(--green);
}

.btn-new-post:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
}

/* Post card */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
  transition: all 0.2s;
  cursor: pointer;
}
.post-card:hover {
  border-color: var(--green);
  box-shadow: 0 2px 12px rgba(92,189,62,0.08);
}

.post-card .post-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.post-card .post-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.post-card .post-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-card .post-preview {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.post-card .post-actions {
  margin-top: 12px;
  display: flex;
  gap: 12px;
}

.post-card .post-actions button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}
.post-card .post-actions button:hover {
  color: var(--green);
  background: rgba(92, 189, 62, 0.08);
}

/* Post detail */
.post-detail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.post-detail .post-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.post-detail .post-meta {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.post-detail .post-body {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Comments */
.comments-section {
  margin-top: 30px;
}

.comments-section h3 {
  font-size: 1.15rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.comment-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
}

.comment-item .comment-meta {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.comment-item .comment-meta .comment-author {
  color: var(--green);
  font-weight: 600;
}

.comment-item .comment-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Author badge (avatar + name) */
.post-author-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.post-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 2px solid var(--green);
  flex-shrink: 0;
  image-rendering: pixelated;
}

.post-author-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.post-author-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.author-title-tag {
  font-size: 0.72rem;
  color: var(--green-dark);
  font-weight: 600;
}

[data-theme="dark"] .author-title-tag {
  color: var(--green-light);
}

.post-author-id {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Comment item author badge (smaller) */
.comment-item .post-author-badge {
  gap: 6px;
}
.comment-item .post-author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border-width: 1px;
}
.comment-item .post-author-name {
  font-size: 0.82rem;
}
.comment-item .author-title-tag {
  font-size: 0.68rem;
}
.comment-item .post-author-id {
  font-size: 0.7rem;
}

/* Tags row */
.post-tags-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.post-tag-item {
  display: inline-block;
  padding: 1px 8px;
  background: rgba(76, 175, 80, 0.08);
  color: var(--green-dark);
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 500;
}
[data-theme="dark"] .post-tag-item {
  background: rgba(92, 189, 62, 0.1);
  color: var(--green-light);
}

/* Post image */
.post-image-wrap {
  margin-bottom: 16px;
  border-radius: var(--radius);
  overflow: hidden;
}
.post-image {
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius);
  display: block;
}

/* Post link */
.post-link-wrap {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.post-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--green-dark);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.post-link-btn:hover {
  background: var(--green);
  color: #fff;
}

/* ================================================================ */
/*  NAV LOGO MC STYLE                                               */
/* ================================================================ */

/* Minecraft grass block as logo — defined as background on .logo-icon */
/* The base .logo-icon already has sizing via .nav-logo .logo-icon above.
   We overwrite the background here to be the MC grass block. */

.nav-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><defs><linearGradient id="top" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="%2396d050"/><stop offset="100%" stop-color="%2370b030"/></linearGradient><linearGradient id="side" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="%239e7842"/><stop offset="100%" stop-color="%237a5a30"/></linearGradient></defs><rect x="2" y="4" width="60" height="50" fill="url(%23side)" rx="4"/><rect x="2" y="4" width="60" height="22" fill="url(%23top)" rx="4"/><rect x="6" y="4" width="52" height="18" fill="%2396d050" rx="2"/><rect x="12" y="10" width="12" height="8" fill="%237ab840" rx="1"/><rect x="38" y="10" width="12" height="8" fill="%237ab840" rx="1"/><rect x="12" y="28" width="12" height="8" fill="%236a4a20" rx="1"/><rect x="38" y="28" width="12" height="8" fill="%236a4a20" rx="1"/><rect x="26" y="30" width="12" height="6" fill="%23583818" rx="1"/></svg>') center/cover no-repeat;
  border-radius: 6px;
  flex-shrink: 0;
  image-rendering: pixelated;
  font-size: 0; /* hide the Z text */
  color: transparent;
}

.comment-form {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.comment-form input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
}
.comment-form input:focus {
  border-color: var(--green);
}

.comment-form button {
  padding: 10px 20px;
  background: var(--green-dark);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.comment-form button:hover {
  background: var(--green);
}

.login-required {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.login-required button {
  margin-top: 12px;
  padding: 10px 24px;
  background: var(--green-dark);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

/* Sidebar cards */
.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}

.sidebar-card h4 {
  font-size: 1rem;
  color: var(--green);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.sidebar-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-card ul li {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.sidebar-card ul li span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

/* Tag for post category */
.post-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.post-tag.tech   { background: rgba(52, 152, 219, 0.15); color: var(--blue); }
.post-tag.survival { background: rgba(92, 189, 62, 0.15); color: var(--green-light); }
.post-tag.guide  { background: rgba(242, 201, 76, 0.15); color: var(--gold); }
.post-tag.show   { background: rgba(155, 89, 182, 0.15); color: var(--purple); }
.post-tag.other  { background: rgba(155, 89, 182, 0.15); color: var(--purple); }
.post-tag.help   { background: rgba(230, 126, 34, 0.15); color: var(--orange); }

/* ================================================================ */
/*  ADMIN PANEL                                                     */
/* ================================================================ */
.admin-page {
  display: flex;
  min-height: calc(100vh - 64px);
}

.admin-sidebar {
  width: 220px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  flex-shrink: 0;
}

.admin-sidebar .admin-logo {
  padding: 0 20px 20px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green);
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.admin-sidebar nav a {
  display: block;
  padding: 10px 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all 0.2s;
  cursor: pointer;
}
.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
  background: var(--bg-card);
  color: var(--green);
}

.admin-main {
  flex: 1;
  padding: 30px;
  min-width: 0;
}

.admin-main h2 {
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.admin-section {
  display: none;
}
.admin-section.active {
  display: block;
}

/* Admin tables */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 12px;
}
.admin-table th {
  background: var(--bg-secondary);
  color: var(--green-light);
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  border: 1px solid var(--border);
}
.admin-table td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.012);
}
.admin-table .btn-danger {
  padding: 5px 14px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
}
.admin-table .btn-danger:hover {
  background: #c0392b;
}

/* Admin form */
.admin-form {
  max-width: 500px;
}
.admin-form .form-group {
  margin-bottom: 16px;
}
.admin-form .form-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.admin-form .form-group input,
.admin-form .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
}
.admin-form .form-group input:focus,
.admin-form .form-group textarea:focus {
  border-color: var(--green);
}
.admin-form .form-group textarea {
  resize: vertical;
  min-height: 80px;
}
.admin-form .btn-save {
  padding: 10px 28px;
  background: var(--green-dark);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}
.admin-form .btn-save:hover {
  background: var(--green);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.admin-stat-card .stat-val {
  font-size: 2rem;
  font-weight: 900;
  color: var(--green);
}
.admin-stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Admin login page */
.admin-login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 40px 20px;
}
.admin-login-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 30px;
  width: 100%;
  max-width: 400px;
}
.admin-login-box h2 {
  text-align: center;
  color: var(--green);
  margin-bottom: 24px;
  font-size: 1.4rem;
}
.admin-login-box .form-error {
  color: var(--red);
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 12px;
  min-height: 20px;
}

/* ================================================================ */
/*  RESPONSIVE                                                      */
/* ================================================================ */
@media (max-width: 900px) {
  .forum-layout {
    grid-template-columns: 1fr;
  }

  .forum-sidebar {
    position: static;
    order: -1;
  }
}

@media (max-width: 768px) {
  .admin-page {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    padding: 12px 16px;
  }
  .admin-sidebar nav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
  }
  .admin-sidebar nav a {
    padding: 8px 14px;
    font-size: 0.85rem;
  }
  .admin-sidebar .admin-logo {
    padding: 0 0 10px;
    margin-bottom: 10px;
  }
  .admin-main {
    padding: 20px 16px;
  }
  .admin-stats {
    grid-template-columns: 1fr 1fr;
  }

  .nav {
    padding: 0 16px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 12px;
    border-bottom: 2px solid var(--green-dark);
    gap: 2px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 16px;
    font-size: 1rem;
  }

  .nav-user {
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    padding: 8px 0;
    gap: 6px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding-top: 12px;
  }

  .nav-user .btn-sm {
    text-align: center;
    padding: 10px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-dl-btn {
    justify-content: center;
  }

  .hero {
    padding: 50px 16px 40px;
  }
  .hero h1 {
    font-size: 2rem;
    letter-spacing: 2px;
  }
  .hero .subtitle {
    font-size: 0.95rem;
  }
  .hero .server-ip {
    font-size: 1rem;
    padding: 10px 20px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  .btn-download {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  .section {
    padding: 40px 16px;
  }
  .section-title {
    font-size: 1.5rem;
  }
  .section-desc {
    margin-bottom: 32px;
    font-size: 0.9rem;
  }

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

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

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

  .system-detail {
    grid-template-columns: 1fr;
    gap: 20px;
    direction: ltr !important;
    margin-bottom: 36px;
  }
  .system-visual {
    min-height: 120px;
  }

  .stats-row {
    gap: 20px;
  }
  .stat-num {
    font-size: 1.8rem;
  }

  .cmd-table {
    font-size: 0.78rem;
  }
  .cmd-table th,
  .cmd-table td {
    padding: 8px 8px;
  }
  .cmd-table code {
    font-size: 0.76rem;
    padding: 2px 5px;
  }

  .cmd-category h3 {
    font-size: 1.1rem;
  }

  .forum-header {
    flex-direction: column;
    align-items: stretch;
  }
  .forum-header h2 {
    font-size: 1.3rem;
  }
  .btn-new-post {
    text-align: center;
  }

  .post-card {
    padding: 16px;
  }
  .post-card .post-title {
    font-size: 1.05rem;
  }

  .post-detail {
    padding: 16px;
  }

  .comment-form {
    flex-direction: column;
  }

  .modal {
    padding: 24px 18px;
    margin: 10px;
  }

  .download-section {
    padding: 24px 16px;
  }

  .dl-buttons {
    flex-direction: column;
    align-items: center;
  }
  .dl-buttons .btn-download {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .nav {
    padding: 0 12px;
    height: 56px;
  }
  .nav-logo {
    font-size: 1.25rem;
    gap: 8px;
  }
  .nav-logo .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
  }

  .nav-links {
    top: 56px;
  }

  .hero {
    padding: 40px 14px 32px;
  }
  .hero h1 {
    font-size: 1.7rem;
  }
  .hero-actions {
    gap: 8px;
  }

  .section {
    padding: 32px 14px;
  }
  .section-title {
    font-size: 1.3rem;
  }

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

  .cmd-table {
    font-size: 0.72rem;
  }
  .cmd-table th,
  .cmd-table td {
    padding: 6px 5px;
  }
  .cmd-table code {
    font-size: 0.7rem;
    padding: 2px 4px;
    white-space: normal;
    word-break: break-all;
  }

  .stats-row {
    gap: 14px;
  }
  .stat-num {
    font-size: 1.5rem;
  }
  .stat-label {
    font-size: 0.78rem;
  }

  .live-status-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ================================================================ */
/*  LIVE SERVER STATUS                                              */
/* ================================================================ */

.live-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.live-status-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.live-status-indicator {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--red); flex-shrink: 0; display: inline-block;
  margin-right: 10px;
}
.live-status-indicator.online {
  background: var(--green);
  box-shadow: 0 0 10px rgba(92,189,62,0.5);
}

.live-status-info { display: inline-block; vertical-align: middle; }
.live-status-info h3 { font-size: 1rem; color: var(--text-primary); }
.live-status-info p { font-size: 0.82rem; color: var(--text-muted); }

.live-player-count {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px;
}
.live-big-num { font-size: 1.8rem; font-weight: 900; color: var(--green); }
.live-sep { font-size: 1.3rem; color: var(--text-muted); }
.live-progress { height: 8px; margin-top: 4px; }

.tps-mini { font-size: 0.9rem; }
.live-avg-tps { margin-top: 8px; color: var(--text-muted); font-size: 0.85rem; }
.live-uptime { font-size: 1.3rem; color: var(--green); font-weight: 700; }

.live-player-list {
  display: flex; flex-wrap: wrap; gap: 8px; max-height: 180px; overflow-y: auto;
}

.player-tag {
  background: rgba(92,189,62,0.12); color: var(--green-light);
  padding: 4px 12px; border-radius: 20px; font-size: 0.85rem;
}

/* ================================================================ */
/*  RECHARGE PAGE                                                   */
/* ================================================================ */

.pay-type-select {
  display: flex; gap: 12px;
}

.pay-type-btn {
  flex: 1; padding: 12px; background: var(--bg-primary);
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-secondary); cursor: pointer; font-size: 1rem;
  font-weight: 600; transition: all 0.2s;
}
.pay-type-btn:hover { border-color: var(--border-light); }
.pay-type-btn.active {
  border-color: var(--green); color: var(--green);
  background: rgba(92,189,62,0.08);
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.package-card {
  background: var(--bg-primary); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 16px; cursor: pointer;
  text-align: center; transition: all 0.2s;
}
.package-card:hover { border-color: var(--border-light); transform: translateY(-2px); }
.package-card.selected {
  border-color: var(--green); background: rgba(92,189,62,0.06);
}

.package-card .pkg-name { font-size: 1rem; color: var(--gold); margin-bottom: 6px; }
.package-card .pkg-points { font-size: 1.4rem; color: var(--text-primary); font-weight: 700; }
.package-card .pkg-price { color: var(--text-muted); margin-top: 4px; font-size: 0.9rem; }
.package-card .pkg-desc { color: var(--text-muted); font-size: 0.78rem; margin-top: 4px; }

.query-result-box {
  padding: 14px 16px; border-radius: var(--radius-sm); font-size: 0.9rem;
}
.query-result-box.success { background: rgba(92,189,62,0.08); border: 1px solid var(--green); }
.query-result-box.pending { background: rgba(242,201,76,0.08); border: 1px solid var(--gold); }
.query-result-box.error { background: rgba(231,76,60,0.08); border: 1px solid var(--red); }
.query-result-box p { margin-bottom: 4px; color: var(--text-secondary); }
.query-result-box strong { color: var(--text-primary); }