/* ============================================
   CraftAttack.me - Design System
   Minecraft-inspired, not generic AI template
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --color-primary: #FF9800;
  --color-primary-rgb: 255, 152, 0;
  --color-accent: #FFB74D;
  --color-bg: #1a1410;
  --color-bg-lighter: #231c14;
  --color-bg-card: #2a2218;
  --color-text: #e8dcc8;
  --color-text-muted: #9a8b74;
  --color-success: #55b548;
  --color-danger: #c43c3c;
  --color-info: #5b8adf;
  --color-gold: #FFAA00;
  --color-discord: #5865F2;

  /* Minecraft-style borders */
  --mc-border-light: #4a3f2f;
  --mc-border-dark: #0d0a06;
  --mc-highlight: #5c4d38;

  --font-body: 'Inter', system-ui, sans-serif;

  --nav-height: 60px;
  --container-max: 1100px;
  --container-padding: 24px;

  --transition: 0.2s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Layered Minecraft-modern background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    /* Pixel grid - block pattern */
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 31px,
      rgba(255,255,255,0.025) 31px,
      rgba(255,255,255,0.025) 32px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 31px,
      rgba(255,255,255,0.025) 31px,
      rgba(255,255,255,0.025) 32px
    ),
    /* Warm ambient glows - like torchlight */
    radial-gradient(ellipse at 10% 15%, rgba(255,140,0,0.1) 0%, transparent 40%),
    radial-gradient(ellipse at 90% 50%, rgba(180,100,20,0.08) 0%, transparent 35%),
    radial-gradient(ellipse at 40% 85%, rgba(255,170,0,0.07) 0%, transparent 40%),
    radial-gradient(circle at 75% 5%, rgba(200,120,30,0.06) 0%, transparent 30%),
    radial-gradient(circle at 25% 55%, rgba(139,69,19,0.05) 0%, transparent 35%),
    /* Base */
    var(--color-bg);
}

/* Vignette */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(0,0,0,0.4) 100%);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent); }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---- Custom Scrollbar ---- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--mc-border-light) var(--color-bg);
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb {
  background: var(--mc-border-light);
  border: 2px solid var(--color-bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--mc-highlight); }
::-webkit-scrollbar-corner { background: var(--color-bg); }

/* ---- Typography ---- */
h1, h2, h3 { line-height: 1.2; color: var(--color-text); }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { color: var(--color-text-muted); line-height: 1.7; }

/* ---- Layout ---- */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-padding); }
.section { padding: 80px 0; position: relative; }

.section-title {
  margin-bottom: 48px;
}
.section-title h2 {
  color: var(--color-primary);
  margin-bottom: 8px;
}
.section-title h2 .accent { color: var(--color-text); }
.section-title p { font-size: 0.95rem; }

/* ---- Pixel Divider ---- */
.pixel-divider {
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--mc-border-dark) 0px,
    var(--mc-border-dark) 4px,
    var(--mc-border-light) 4px,
    var(--mc-border-light) 8px,
    var(--mc-highlight) 8px,
    var(--mc-highlight) 12px,
    var(--mc-border-light) 12px,
    var(--mc-border-light) 16px
  );
  image-rendering: pixelated;
}

/* ---- MC-Style Card ---- */
.mc-card {
  background: var(--color-bg-card);
  border: 2px solid var(--mc-border-light);
  border-top-color: var(--mc-highlight);
  border-left-color: var(--mc-highlight);
  border-bottom-color: var(--mc-border-dark);
  border-right-color: var(--mc-border-dark);
  padding: 24px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.mc-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

/* ---- MC Tooltip Style ---- */
.mc-tooltip {
  background: #100010;
  border: 2px solid;
  border-image: linear-gradient(to bottom, #5000a0, #28007f) 1;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--color-text);
}

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 24px;
  background: rgba(26, 20, 16, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--mc-border-dark);
  transition: background var(--transition);
}

.navbar.scrolled {
  background: rgba(26, 20, 16, 0.97);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.nav-container {
  width: 100%;
  display: flex; align-items: center;
}

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--color-text);
  font-weight: 700; font-size: 1.05rem;
}
.nav-brand img { height: 36px; width: 36px; image-rendering: pixelated; }
.nav-brand span { color: var(--color-primary); }

.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; }
.nav-links a {
  color: var(--color-text-muted);
  padding: 6px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}
.nav-links a:hover {
  color: var(--color-text);
  background: rgba(255,152,0,0.08);
  border-color: var(--mc-border-light);
}
.nav-links a.active {
  color: var(--color-primary);
  background: rgba(255,152,0,0.1);
  border-color: var(--mc-border-light);
  border-top-color: var(--mc-highlight);
  border-left-color: var(--mc-highlight);
}

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

/* Nav Dropdown */
.nav-dropdown {
  position: relative;
}
.nav-dropdown > a {
  display: flex; align-items: center; gap: 4px;
}
.nav-dropdown-arrow {
  width: 12px; height: 12px;
  transition: transform var(--transition);
}
.nav-dropdown:hover .nav-dropdown-arrow { transform: rotate(180deg); }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--color-bg);
  border: 2px solid var(--mc-border-light);
  border-top-color: var(--mc-highlight); border-left-color: var(--mc-highlight);
  border-bottom-color: var(--mc-border-dark); border-right-color: var(--mc-border-dark);
  padding: 4px 0;
  z-index: 1001;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 6px 14px !important;
  font-size: 0.82rem !important;
  border: none !important;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.nav-dropdown-menu a:hover {
  background: rgba(255,152,0,0.08);
  color: var(--color-text);
  border: none !important;
}
.nav-dropdown-menu a.dropdown-current {
  color: var(--color-success);
}
.nav-dropdown-menu a.dropdown-upcoming {
  color: var(--color-primary);
}
.nav-dropdown-divider {
  height: 1px;
  background: var(--mc-border-light);
  margin: 4px 0;
}

.btn-nav-discord {
  padding: 6px 14px !important;
  font-size: 0.85rem !important;
}

.nav-discord {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  margin-left: 8px;
  color: var(--color-text-muted);
  border: 1px solid var(--mc-border-light);
  background: transparent;
  text-decoration: none;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.nav-discord svg { width: 18px; height: 18px; display: block; }
.nav-discord:hover {
  color: #fff;
  background: #5865F2;
  border-color: #5865F2;
}

.nav-hamburger {
  display: none; flex-direction: column; gap: 5px; padding: 8px; z-index: 1001;
}
.nav-hamburger span {
  width: 22px; height: 2px; background: var(--color-text);
  transition: all var(--transition);
}
.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 22px;
  font-size: 0.9rem; font-weight: 600;
  transition: all var(--transition);
  cursor: pointer; border: none; text-decoration: none; white-space: nowrap;
}

/* MC-style button with 3D border */
.btn-mc {
  background: #3a3a3a;
  color: var(--color-text);
  border: 2px solid;
  border-top-color: #6b6b6b;
  border-left-color: #6b6b6b;
  border-bottom-color: #1a1a1a;
  border-right-color: #1a1a1a;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.4);
  image-rendering: pixelated;
}
.btn-mc:hover {
  background: #4a4a4a;
  border-top-color: #7b7b7b;
  border-left-color: #7b7b7b;
  color: var(--color-primary);
}
.btn-mc:active {
  border-top-color: #1a1a1a;
  border-left-color: #1a1a1a;
  border-bottom-color: #6b6b6b;
  border-right-color: #6b6b6b;
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(180deg, #e68a00, #cc7a00);
  color: #1a1410;
  border: 2px solid;
  border-top-color: #ffb74d;
  border-left-color: #ffb74d;
  border-bottom-color: #8a5200;
  border-right-color: #8a5200;
  text-shadow: 0 1px 0 rgba(255,255,255,0.2);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #ff9800, #e68a00);
  color: #1a1410;
}

.btn-discord {
  background: linear-gradient(180deg, #5865F2, #4752C4);
  color: #fff;
  border: 2px solid;
  border-top-color: #7b85f5;
  border-left-color: #7b85f5;
  border-bottom-color: #3640a0;
  border-right-color: #3640a0;
}
.btn-discord:hover { background: linear-gradient(180deg, #6974f5, #5865F2); color: #fff; }

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--mc-border-light);
  border-top-color: var(--mc-highlight);
  border-left-color: var(--mc-highlight);
}
.btn-secondary:hover {
  background: rgba(255,152,0,0.08);
  color: var(--color-accent);
}

/* ---- Badge ---- */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; font-size: 0.75rem; font-weight: 600;
  border: 1px solid; letter-spacing: 0.3px;
}
.badge-primary { background: rgba(255,152,0,0.12); color: var(--color-primary); border-color: rgba(255,152,0,0.3); }
.badge-success { background: rgba(85,181,72,0.12); color: var(--color-success); border-color: rgba(85,181,72,0.3); }
.badge-danger { background: rgba(196,60,60,0.12); color: var(--color-danger); border-color: rgba(196,60,60,0.3); }
.badge-info { background: rgba(91,138,223,0.12); color: var(--color-info); border-color: rgba(91,138,223,0.3); }
.badge-gold { background: rgba(255,170,0,0.12); color: var(--color-gold); border-color: rgba(255,170,0,0.3); }

/* ---- Server Status ---- */
.server-status {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  background: var(--color-bg-card);
  border: 2px solid var(--mc-border-light);
  border-top-color: var(--mc-highlight);
  border-left-color: var(--mc-highlight);
  border-bottom-color: var(--mc-border-dark);
  border-right-color: var(--mc-border-dark);
  font-size: 0.85rem;
}
.status-dot {
  width: 8px; height: 8px; background: var(--color-text-muted); flex-shrink: 0;
  /* Pixel square, not circle */
}
.status-dot.online {
  background: var(--color-success);
  box-shadow: 0 0 6px rgba(85,181,72,0.6);
  animation: blink 2s step-start infinite;
}
.status-dot.offline { background: var(--color-danger); }
.status-text { color: var(--color-text-muted); font-weight: 500; }
.status-players { color: var(--color-text); font-weight: 600; }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ---- IP Box ---- */
.ip-box {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 20px;
  background: #0d0a06;
  border: 2px solid var(--mc-border-light);
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Courier New', monospace;
  position: relative;
}
.ip-box:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 12px rgba(255,152,0,0.2);
}
.ip-address {
  font-size: 1.3rem; color: var(--color-primary);
  letter-spacing: 1px; font-weight: 700;
}
.ip-copy-icon { color: var(--color-text-muted); transition: color var(--transition); }
.ip-box:hover .ip-copy-icon { color: var(--color-primary); }
.ip-copied { color: var(--color-success) !important; }

/* ---- Page Header ---- */
.page-header {
  padding: 120px 0 40px;
  position: relative;
  border-bottom: 2px solid var(--mc-border-dark);
}
.page-header::after {
  content: '';
  position: absolute; bottom: -6px; left: 0; right: 0; height: 4px;
  background: repeating-linear-gradient(90deg,
    var(--mc-border-dark) 0px, var(--mc-border-dark) 4px,
    var(--mc-border-light) 4px, var(--mc-border-light) 8px);
}
.page-header h1 { margin-bottom: 8px; color: var(--color-primary); }
.page-header p { font-size: 1rem; }

/* ---- Footer ---- */
.footer {
  background: var(--mc-border-dark);
  border-top: 4px solid var(--mc-border-light);
  padding: 48px 0 24px;
  position: relative;
}
.footer::before {
  content: '';
  position: absolute; top: -8px; left: 0; right: 0; height: 4px;
  background: repeating-linear-gradient(90deg,
    var(--color-primary) 0px, var(--color-primary) 4px,
    transparent 4px, transparent 8px);
  opacity: 0.4;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px; margin-bottom: 32px;
}
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-brand-title {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.1rem;
}
.footer-brand-title img { height: 32px; width: 32px; image-rendering: pixelated; }
.footer-brand-title span { color: var(--color-primary); }
.footer-brand p { font-size: 0.85rem; max-width: 280px; }

.footer-section h4 { color: var(--color-text); font-weight: 600; margin-bottom: 14px; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-section ul { display: flex; flex-direction: column; gap: 8px; }
.footer-section a { color: var(--color-text-muted); font-size: 0.85rem; transition: all var(--transition); }
.footer-section a:hover { color: var(--color-primary); }

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid var(--mc-border-light);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.8rem; color: var(--color-text-muted);
}

/* ---- Scroll Reveal ---- */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.4s; }

.reveal-left { opacity: 0; transform: translateX(-24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-left.active { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-right.active { opacity: 1; transform: translateX(0); }
.reveal-scale { opacity: 0; transform: scale(0.95); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-scale.active { opacity: 1; transform: scale(1); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  :root { --nav-height: 56px; --container-padding: 16px; }
  .navbar { padding: 0 16px; }
  .nav-hamburger { display: flex; }
  .nav-discord { width: 32px; height: 32px; margin-left: auto; }
  .nav-discord svg { width: 16px; height: 16px; }
  .nav-links {
    position: fixed; top: 0; right: -100%;
    width: 260px; height: 100vh;
    background: var(--color-bg);
    flex-direction: column; flex: unset; justify-content: flex-start;
    padding: 80px 24px 24px; gap: 2px;
    transition: right var(--transition);
    border-left: 2px solid var(--mc-border-light);
  }
  .nav-links.open { right: 0; }
  .nav-links a { width: 100%; padding: 12px 14px; font-size: 0.95rem; }
  .nav-divider { display: none; }
  /* Mobile dropdown: always visible, no hover */
  .nav-dropdown-menu {
    display: none; position: static;
    border: none; box-shadow: none;
    padding: 0 0 0 16px; min-width: 0;
    background: transparent; max-height: none;
  }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }
  .nav-dropdown-menu a { padding: 8px 14px !important; font-size: 0.85rem !important; }
  .section { padding: 48px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

.nav-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.7); z-index: 999;
  opacity: 0; transition: opacity var(--transition);
}
.nav-overlay.active { display: block; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-left, .reveal-right, .reveal-scale { opacity: 1; transform: none; }
}
