/* =========================================================
   VOIDREALMS — Minecraft Server Website
   Theme: Dark Minecraft-inspired
   ========================================================= */

:root {
  --bg: #0a0f0c;
  --bg-soft: #0e1510;
  --bg-card: #131c16;
  --bg-card-hover: #18241c;
  --border: #223026;
  --border-strong: #2e4234;
  --text: #e6f0ea;
  --text-dim: #9fb3a7;
  --text-muted: #6b8074;
  --green: #38b26b;
  --green-bright: #57d18b;
  --green-dark: #1b6b3f;
  --gold: #f5c542;
  --red: #e05555;
  --blue: #5aa9e6;
  --font-ar: 'Cairo', sans-serif;
  --font-pixel: 'Press Start 2P', monospace;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ar);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

[dir="ltr"] body { font-family: 'Cairo', sans-serif; }

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

::selection { background: var(--green); color: #04120a; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--green-dark); }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10, 15, 12, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
.navbar.scrolled { box-shadow: var(--shadow); }

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: 0.5px;
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff;
  font-size: 1.2rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(56, 178, 107, 0.35);
}
.brand-accent { color: var(--green-bright); }

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 13px;
  border-radius: 8px;
  transition: all 0.2s;
}
.nav-links a:hover { color: var(--green-bright); background: rgba(56, 178, 107, 0.1); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-ar);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-toggle:hover { border-color: var(--green); color: var(--green-bright); }
.lang-divider { color: var(--text-muted); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span {
  width: 24px; height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 0 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(56, 178, 107, 0.18), transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(90, 169, 230, 0.1), transparent 55%),
    linear-gradient(180deg, #0b120d 0%, var(--bg) 100%);
  z-index: -1;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(56, 178, 107, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 178, 107, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.95rem;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 24px;
}
.pulse-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
}
.pulse-dot.online { background: var(--green-bright); box-shadow: 0 0 0 0 rgba(87, 209, 139, 0.6); animation: pulse 1.8s infinite; }
.pulse-dot.offline { background: var(--red); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(87, 209, 139, 0.55); }
  70% { box-shadow: 0 0 0 12px rgba(87, 209, 139, 0); }
  100% { box-shadow: 0 0 0 0 rgba(87, 209, 139, 0); }
}

.hero-title {
  font-family: var(--font-pixel);
  font-size: clamp(2.2rem, 7vw, 4.5rem);
  line-height: 1.3;
  margin-bottom: 18px;
  text-shadow: 0 4px 30px rgba(56, 178, 107, 0.3);
  color: #fff;
}
.text-grad {
  background: linear-gradient(90deg, var(--green), var(--green-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  color: var(--text-dim);
  margin-bottom: 10px;
}
.hero-motd {
  font-size: 0.95rem;
  color: var(--green-bright);
  margin-bottom: 30px;
  opacity: 0.9;
}

.ip-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto 32px;
}
.ip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  transition: border-color 0.2s;
}
.ip-row:hover { border-color: var(--border-strong); }
.ip-badge {
  font-weight: 900;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 6px;
  flex-shrink: 0;
}
.badge-java { background: rgba(229, 85, 85, 0.15); color: #ff9a9a; border: 1px solid rgba(229, 85, 85, 0.3); }
.badge-bedrock { background: rgba(90, 169, 230, 0.15); color: #9cc8ef; border: 1px solid rgba(90, 169, 230, 0.3); }
.ip-code {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  direction: ltr;
  text-align: left;
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
[dir="rtl"] .ip-code { text-align: right; }

.btn-copy {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff;
  border: none;
  font-family: var(--font-ar);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 9px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
}
.btn-copy:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(56, 178, 107, 0.4); }
.btn-copy.copied { background: var(--gold); color: #2a2004; }

.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff;
  box-shadow: 0 6px 20px rgba(56, 178, 107, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(56, 178, 107, 0.45); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { border-color: var(--green); color: var(--green-bright); }
.btn-sm { padding: 10px 22px; font-size: 0.9rem; }

/* ===== SECTIONS ===== */
.section { padding: 90px 0; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-title {
  font-family: var(--font-pixel);
  font-size: clamp(1.3rem, 3.5vw, 2rem);
  text-align: center;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: 1px;
}
.section-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 50px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== STATS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: all 0.25s;
}
.stat-card:hover { border-color: var(--green-dark); transform: translateY(-4px); box-shadow: var(--shadow); }
.stat-icon { font-size: 1.6rem; margin-bottom: 10px; color: var(--green-bright); }
.stat-num {
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  font-family: var(--font-pixel);
  margin-bottom: 6px;
}
.stat-num-sm { font-size: 1.1rem; line-height: 2; font-family: var(--font-pixel); }
.stat-label { color: var(--text-muted); font-size: 0.95rem; }

.servers-status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.server-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: border-color 0.2s;
}
.server-card:hover { border-color: var(--border-strong); }
.server-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.server-dot.up { background: var(--green-bright); box-shadow: 0 0 8px rgba(87, 209, 139, 0.7); }
.server-dot.down { background: var(--red); }
.server-info { flex: 1; }
.server-name { font-weight: 800; font-size: 1rem; }
.server-meta { color: var(--text-muted); font-size: 0.85rem; direction: ltr; text-align: right; }
.server-load {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--green-bright);
  direction: ltr;
}
[dir="ltr"] .server-meta { text-align: left; }

/* ===== FEATURES ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--green-bright));
  opacity: 0;
  transition: opacity 0.25s;
}
.feature-card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  font-size: 2rem;
  width: 58px; height: 58px;
  display: grid;
  place-items: center;
  background: rgba(56, 178, 107, 0.12);
  border: 1px solid rgba(56, 178, 107, 0.25);
  border-radius: 12px;
  margin-bottom: 18px;
}
.feature-card h3 { font-size: 1.15rem; margin-bottom: 8px; color: #fff; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ===== JOIN ===== */
.join-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  margin-bottom: 30px;
}
.join-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  position: relative;
}
.join-edition-badge {
  position: absolute;
  top: -14px;
  left: 24px;
  font-weight: 900;
  font-size: 0.75rem;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--bg);
}
[dir="ltr"] .join-edition-badge { left: auto; right: 24px; }

.steps { padding-inline-start: 20px; display: flex; flex-direction: column; gap: 14px; }
.steps li { color: var(--text-dim); font-size: 1rem; }
.inline-code {
  direction: ltr;
  display: inline-block;
  font-family: monospace;
  background: rgba(56, 178, 107, 0.12);
  border: 1px solid rgba(56, 178, 107, 0.3);
  color: var(--green-bright);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.9rem;
}

.join-tip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(245, 197, 66, 0.08);
  border: 1px solid rgba(245, 197, 66, 0.25);
  border-radius: var(--radius);
  padding: 16px 20px;
  color: var(--gold);
  font-weight: 600;
  font-size: 0.98rem;
}
.tip-icon { font-size: 1.3rem; }

/* ===== VOTE ===== */
.vote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.vote-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 26px;
  text-align: center;
  transition: all 0.25s;
}
.vote-card:hover { transform: translateY(-5px); border-color: var(--gold); box-shadow: 0 10px 30px rgba(245, 197, 66, 0.12); }
.vote-star { font-size: 2.4rem; color: var(--gold); margin-bottom: 12px; text-shadow: 0 0 20px rgba(245, 197, 66, 0.4); }
.vote-card h3 { font-size: 1.1rem; margin-bottom: 8px; color: #fff; }
.vote-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; min-height: 44px; }

/* ===== RULES ===== */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.rule-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  border-inline-start: 4px solid var(--border-strong);
}
.rule-bad { border-inline-start-color: var(--red); }
.rule-good { border-inline-start-color: var(--green); }
.rule-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.rule-bad h3 { color: #ff9a9a; }
.rule-good h3 { color: var(--green-bright); }
.rule-card p { color: var(--text-muted); font-size: 0.93rem; }

/* ===== TEAM ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
  transition: all 0.25s;
}
.team-card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.avatar {
  width: 76px; height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-pixel);
  font-size: 1.4rem;
  color: #fff;
  margin: 0 auto 16px;
  border: 3px solid var(--border-strong);
}
.avatar-owner { background: linear-gradient(135deg, var(--gold), #d4941a); border-color: var(--gold); }
.avatar-admin { background: linear-gradient(135deg, #e05555, #a03030); border-color: #e05555; }
.avatar-mod { background: linear-gradient(135deg, var(--green), var(--green-dark)); }
.avatar-helper { background: linear-gradient(135deg, var(--blue), #3b74a8); }
.team-name { font-size: 1.1rem; color: #fff; margin-bottom: 4px; }
.team-role {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  padding: 3px 12px;
  border-radius: 50px;
  margin-bottom: 8px;
}
.team-desc { display: block; color: var(--text-muted); font-size: 0.9rem; direction: ltr; }

/* ===== FAQ ===== */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item:hover { border-color: var(--border-strong); }
.faq-item[open] { border-color: var(--green-dark); }
.faq-item summary {
  padding: 18px 22px;
  font-weight: 700;
  font-size: 1.02rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  transition: color 0.2s;
}
.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--green-bright);
  transition: transform 0.25s;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] summary { color: var(--green-bright); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p {
  padding: 0 22px 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ===== FOOTER ===== */
.footer { background: #070b08; border-top: 1px solid var(--border); padding-top: 60px; }
.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  padding-bottom: 40px;
}
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-weight: 900; font-size: 1.2rem; }
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; font-weight: 400; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--text-dim); text-decoration: none; font-size: 0.95rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--green-bright); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 18px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  border: 1px solid var(--green-dark);
  color: var(--text);
  padding: 14px 26px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
  z-index: 2000;
  opacity: 0;
  transition: all 0.35s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: 68px;
    right: -100%;
    flex-direction: column;
    align-items: stretch;
    background: rgba(10, 15, 12, 0.97);
    border-bottom: 1px solid var(--border);
    padding: 20px;
    width: 100%;
    transition: right 0.3s;
    gap: 6px;
    z-index: 999;
  }
  [dir="ltr"] .nav-links { right: auto; left: -100%; transition: left 0.3s; }
  .nav-links.open { right: 0; }
  [dir="ltr"] .nav-links.open { right: auto; left: 0; }
  .nav-links a { padding: 12px 14px; }
  .hamburger { display: flex; }
  .section { padding: 70px 0; }
}
