/* ============================================
   EMCPVP - Minecraft PVP Server Website
   Style Sheet
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

/* --- CSS Variables --- */
:root {
  --bg-dark: #0d0d1a;
  --bg-darker: #070710;
  --bg-card: #1a1a2e;
  --bg-card-hover: #252550;
  --mc-green: #5ab552;
  --mc-green-dark: #3d8b39;
  --mc-grass-top: #6cbb47;
  --mc-dirt: #866043;
  --mc-dirt-dark: #5e442f;
  --mc-stone: #828282;
  --mc-stone-dark: #5a5a5a;
  --mc-diamond: #4aedd9;
  --mc-redstone: #ff5555;
  --mc-gold: #ffd700;
  --mc-emerald: #17dd62;
  --mc-sky: #87ceeb;
  --mc-lava: #ff8c00;
  --text: #e8e8e8;
  --text-bright: #ffffff;
  --text-dim: #8888aa;
  --pixel: 'Press Start 2P', monospace;
  --body: 'VT323', monospace;
}

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

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

body {
  font-family: var(--body);
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Subtle pixel grid background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(90, 181, 82, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 181, 82, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

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

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

/* --- Container --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 13, 26, 0.95);
  border-bottom: 3px solid var(--mc-green-dark);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(7, 7, 16, 0.98);
  border-bottom-color: var(--mc-green);
  box-shadow: 0 4px 20px rgba(90, 181, 82, 0.15);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--pixel);
  font-size: 14px;
  color: var(--mc-green);
  letter-spacing: 1px;
}

.nav-logo .logo-icon {
  width: 32px;
  height: 32px;
}

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

.nav-links a {
  font-family: var(--pixel);
  font-size: 11px;
  color: var(--text-dim);
  padding: 10px 18px;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  letter-spacing: 1px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--mc-green);
  border-color: var(--mc-green-dark);
  background: rgba(90, 181, 82, 0.08);
}

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

.nav-toggle span {
  width: 28px;
  height: 4px;
  background: var(--mc-green);
  display: block;
}

/* --- Pixel Button --- */
.btn-pixel {
  display: inline-block;
  font-family: var(--pixel);
  font-size: 13px;
  letter-spacing: 1px;
  padding: 16px 36px;
  color: #fff;
  background: var(--mc-green);
  border: none;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  /* Minecraft 3D bevel effect */
  box-shadow:
    inset -4px -4px 0 0 rgba(0, 0, 0, 0.3),
    inset 4px 4px 0 0 rgba(255, 255, 255, 0.2),
    0 0 0 4px var(--mc-green-dark),
    0 6px 0 0 rgba(0, 0, 0, 0.3);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
}

.btn-pixel:hover {
  background: #6cc85f;
  transform: translateY(2px);
  box-shadow:
    inset -4px -4px 0 0 rgba(0, 0, 0, 0.3),
    inset 4px 4px 0 0 rgba(255, 255, 255, 0.2),
    0 0 0 4px var(--mc-green-dark),
    0 4px 0 0 rgba(0, 0, 0, 0.3);
}

.btn-pixel:active {
  transform: translateY(4px);
  box-shadow:
    inset -4px -4px 0 0 rgba(0, 0, 0, 0.3),
    inset 4px 4px 0 0 rgba(255, 255, 255, 0.2),
    0 0 0 4px var(--mc-green-dark),
    0 2px 0 0 rgba(0, 0, 0, 0.3);
}

.btn-pixel.btn-stone {
  background: var(--mc-stone);
  box-shadow:
    inset -4px -4px 0 0 rgba(0, 0, 0, 0.3),
    inset 4px 4px 0 0 rgba(255, 255, 255, 0.15),
    0 0 0 4px var(--mc-stone-dark),
    0 6px 0 0 rgba(0, 0, 0, 0.3);
}

.btn-pixel.btn-stone:hover {
  background: #929292;
  box-shadow:
    inset -4px -4px 0 0 rgba(0, 0, 0, 0.3),
    inset 4px 4px 0 0 rgba(255, 255, 255, 0.15),
    0 0 0 4px var(--mc-stone-dark),
    0 4px 0 0 rgba(0, 0, 0, 0.3);
  transform: translateY(2px);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #0a0a1a 0%, #0d1a0d 40%, #0d0d1a 100%);
  padding-top: 72px;
}

/* Animated stars */
.hero-stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  opacity: 0;
  animation: twinkle 3s infinite ease-in-out;
}

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 0.8; transform: scale(1); }
}

/* Floating pixel blocks */
.floating-block {
  position: absolute;
  opacity: 0.6;
  animation: floatBlock 8s infinite ease-in-out;
  z-index: 0;
}

.floating-block:nth-child(1) { top: 15%; left: 8%; animation-delay: 0s; }
.floating-block:nth-child(2) { top: 25%; right: 10%; animation-delay: 2s; }
.floating-block:nth-child(3) { bottom: 20%; left: 12%; animation-delay: 4s; }
.floating-block:nth-child(4) { bottom: 15%; right: 8%; animation-delay: 1s; }
.floating-block:nth-child(5) { top: 50%; left: 5%; animation-delay: 3s; }
.floating-block:nth-child(6) { top: 60%; right: 6%; animation-delay: 5s; }

@keyframes floatBlock {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-30px) rotate(5deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 24px;
}

.hero-title {
  font-family: var(--pixel);
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: var(--mc-green);
  text-shadow:
    4px 4px 0 var(--mc-green-dark),
    8px 8px 0 rgba(0, 0, 0, 0.3);
  letter-spacing: 2px;
  margin-bottom: 16px;
  animation: titleRise 0.8s ease-out;
}

@keyframes titleRise {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-subtitle {
  font-family: var(--pixel);
  font-size: clamp(0.7rem, 2vw, 1rem);
  color: var(--text-dim);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.hero-tagline {
  font-size: 1.6rem;
  color: var(--mc-diamond);
  margin-bottom: 36px;
  text-shadow: 0 0 20px rgba(74, 237, 217, 0.3);
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* Server IP box */
.server-ip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid var(--mc-stone-dark);
  padding: 10px 24px;
  font-family: var(--pixel);
  font-size: 14px;
  color: var(--mc-gold);
  cursor: pointer;
  transition: all 0.2s ease;
}

.server-ip:hover {
  border-color: var(--mc-gold);
  background: rgba(255, 215, 0, 0.05);
}

.server-ip .copy-hint {
  font-size: 10px;
  color: var(--text-dim);
}

/* --- Section Styles --- */
.section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}

.section-title {
  font-family: var(--pixel);
  font-size: clamp(1.2rem, 3.5vw, 2rem);
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.section-title.green { color: var(--mc-green); }
.section-title.diamond { color: var(--mc-diamond); }
.section-title.gold { color: var(--mc-gold); }
.section-title.redstone { color: var(--mc-redstone); }

.section-subtitle {
  text-align: center;
  font-size: 1.4rem;
  color: var(--text-dim);
  margin-bottom: 56px;
}

/* --- About Section --- */
.about {
  background: linear-gradient(180deg, var(--bg-dark) 0%, #0f1a0f 100%);
}

.about-content {
  display: flex;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
}

.about-text {
  flex: 1;
  min-width: 300px;
}

.about-text p {
  font-size: 1.35rem;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-text .highlight {
  color: var(--mc-green);
  font-weight: bold;
}

.about-visual {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
}

/* --- Features Grid --- */
.features {
  background: var(--bg-darker);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 3px solid var(--mc-stone-dark);
  padding: 36px 28px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--mc-green);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

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

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card .card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
}

.feature-card h3 {
  font-family: var(--pixel);
  font-size: 12px;
  color: var(--mc-green);
  margin-bottom: 14px;
  letter-spacing: 1px;
}

.feature-card p {
  font-size: 1.2rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* --- Stats Section --- */
.stats {
  background: linear-gradient(180deg, #0f1a0f 0%, var(--bg-dark) 100%);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  text-align: center;
}

.stat-item {
  padding: 36px 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid var(--mc-stone-dark);
  transition: border-color 0.3s ease;
}

.stat-item:hover {
  border-color: var(--mc-gold);
}

.stat-number {
  font-family: var(--pixel);
  font-size: 2.5rem;
  color: var(--mc-gold);
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 1.3rem;
  color: var(--text-dim);
}

/* --- CTA Section --- */
.cta {
  background: linear-gradient(180deg, var(--bg-dark) 0%, #0f1a0f 100%);
  text-align: center;
  padding: 120px 0;
}

.cta h2 {
  font-family: var(--pixel);
  font-size: clamp(1.2rem, 4vw, 2.2rem);
  color: var(--mc-green);
  margin-bottom: 20px;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
}

.cta p {
  font-size: 1.4rem;
  color: var(--text-dim);
  margin-bottom: 40px;
}

.cta .server-ip {
  margin-bottom: 36px;
}

/* --- Games Page Hero --- */
.games-hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #0a0a1a 0%, #0d1a1a 100%);
  padding-top: 72px;
}

.games-hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 0 24px;
}

.games-hero h1 {
  font-family: var(--pixel);
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: var(--mc-diamond);
  text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.games-hero p {
  font-size: 1.5rem;
  color: var(--text-dim);
}

/* --- Game Mode Section --- */
.game-mode {
  padding: 80px 0;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.game-mode.bedwars {
  background: linear-gradient(180deg, var(--bg-dark) 0%, #1a0d0d 100%);
}

.game-mode.skywars {
  background: linear-gradient(180deg, #0d1a1a 0%, var(--bg-dark) 100%);
}

.game-mode-inner {
  display: flex;
  align-items: center;
  gap: 50px;
  flex-wrap: wrap;
}

.game-mode.reverse .game-mode-inner {
  flex-direction: row-reverse;
}

.game-mode-visual {
  flex: 1;
  min-width: 280px;
  display: flex;
  justify-content: center;
}

.game-mode-text {
  flex: 1.5;
  min-width: 300px;
}

.game-mode-text h2 {
  font-family: var(--pixel);
  font-size: clamp(1.1rem, 3vw, 1.8rem);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.game-mode-text .game-en {
  font-family: var(--pixel);
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.game-mode-text .game-desc {
  font-size: 1.35rem;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 32px;
}

.game-mode-text .game-desc .highlight {
  font-weight: bold;
}

.bedwars .game-mode-text h2 { color: var(--mc-redstone); }
.bedwars .game-mode-text .highlight { color: var(--mc-redstone); }
.skywars .game-mode-text h2 { color: var(--mc-sky); }
.skywars .game-mode-text .highlight { color: var(--mc-sky); }

/* Info boxes */
.info-box {
  margin-bottom: 24px;
}

.info-box h4 {
  font-family: var(--pixel);
  font-size: 11px;
  color: var(--mc-gold);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.info-box ul {
  list-style: none;
  padding: 0;
}

.info-box ul li {
  font-size: 1.25rem;
  color: var(--text);
  padding: 8px 0 8px 28px;
  position: relative;
  line-height: 1.5;
}

.info-box ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 12px;
  height: 12px;
  background: var(--mc-green);
  box-shadow: inset -3px -3px 0 rgba(0,0,0,0.3);
}

.bedwars .info-box ul li::before { background: var(--mc-redstone); }
.skywars .info-box ul li::before { background: var(--mc-sky); }

/* --- Footer --- */
.footer {
  background: var(--bg-darker);
  border-top: 3px solid var(--mc-green-dark);
  padding: 48px 0 24px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-logo {
  font-family: var(--pixel);
  font-size: 16px;
  color: var(--mc-green);
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  list-style: none;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 1.2rem;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--mc-green);
}

.footer-copy {
  font-size: 1rem;
  color: var(--text-dim);
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-copy .mc-credit {
  font-size: 0.85rem;
  color: #555;
  margin-top: 8px;
}

/* --- Animations on scroll --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(7, 7, 16, 0.98);
    border-bottom: 2px solid var(--mc-green-dark);
    padding: 16px;
    gap: 4px;
  }

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

  .nav-toggle {
    display: flex;
  }

  .about-content,
  .game-mode-inner {
    flex-direction: column;
    gap: 32px;
  }

  .game-mode.reverse .game-mode-inner {
    flex-direction: column;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-pixel {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  .section {
    padding: 60px 0;
  }

  html {
    font-size: 16px;
  }
}
