/* ═══════════════════════════════════════
   LAST MEMORY - MODERN APOCALYPSE STYLESHEET
   ═══════════════════════════════════════ */

:root {
  --bg: #0a0a0a;
  --bg-card: #141414;
  --bg-deep: #000000;
  --border: rgba(255, 255, 255, 0.05);
  --border-md: rgba(255, 255, 255, 0.1);
  --ink: #ffffff;
  --ink-mid: #e0e0e0;
  --muted: #888888;
  --red: #d32f2f;
  --red-glow: rgba(211, 47, 47, 0.3);
  --green: #2d8a4e;
  --gold: #d4a04a;
  --shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* RESET & BASE */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
body { 
  background: var(--bg); 
  color: var(--ink-mid); 
  font-family: 'Inter', sans-serif; 
  font-size: 15px; 
  line-height: 1.6; 
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grain Effect Background */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 9999;
}

.page { 
  max-width: 1400px; 
  margin: 0 auto; 
  width: 92%; 
}

/* NAV */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}
.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  letter-spacing: 3px;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  perspective: 1000px;
}
.nav-logo span { color: var(--red); }

.nav-logo:hover {
  transform: rotateY(15deg) rotateX(10deg) scale(1.1);
  text-shadow: 
    2px 2px 0px rgba(211, 47, 47, 0.5),
    -2px -2px 0px rgba(255, 255, 255, 0.1),
    0 0 20px var(--red-glow);
}

.nav-logo:active {
  transform: scale(0.95);
}

.nav-links { display: flex; gap: 35px; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px; left: 0; width: 0; height: 2px;
  background: var(--red);
  transition: var(--transition);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

.nav-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-card);
  padding: 8px 16px;
  border-radius: 50px;
  border: 1px solid var(--border);
  cursor: help;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.nav-status:hover {
  border-color: var(--red);
  box-shadow: 0 0 15px var(--red-glow);
}

.nav-status:hover::after {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: radial-gradient(circle, rgba(211, 47, 47, 0.2) 0%, transparent 70%);
  animation: blood-splatter 0.4s ease-out forwards;
  pointer-events: none;
}

@keyframes blood-splatter {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(2); opacity: 1; }
}
.dot-live {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2s infinite;
}
.dot-offline {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #666;
}
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* HERO */
.hero {
  padding: 120px 40px 100px;
  text-align: center;
  position: relative;
}
.hero-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--red-glow) 0%, transparent 70%);
  z-index: -1;
}
.hero-eyebrow {
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 25px;
  font-weight: 700;
}
.hero-title-container {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}

.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(80px, 15vw, 160px);
  line-height: 0.9;
  letter-spacing: -2px;
  color: var(--ink);
  min-height: 1.1em;
  position: relative;
  z-index: 2;
  margin-bottom: 0;
}

.ecg-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 100px;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.ecg-path {
  fill: none;
  stroke: var(--red);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px var(--red));
}

@keyframes ecg-pulse {
  0% { stroke-dashoffset: 1000; }
  100% { stroke-dashoffset: 0; }
}

.ecg-active .ecg-path {
  animation: ecg-pulse 1.2s linear forwards;
}

.typewriter-cursor {
  display: inline-block;
  width: 10px;
  height: 0.8em;
  background-color: var(--red);
  margin-left: 5px;
  animation: blink 0.7s infinite;
  vertical-align: middle;
}

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

@keyframes heartbeat-dissipate {
  0% { opacity: 1; filter: blur(0) grayscale(0); transform: scale(1); }
  15% { opacity: 0.4; filter: blur(8px) grayscale(1); transform: scale(1.02); }
  30% { opacity: 1; filter: blur(0) grayscale(0); transform: scale(1); }
  45% { opacity: 0.4; filter: blur(12px) grayscale(1); transform: scale(1.05); }
  100% { opacity: 1; filter: blur(0) grayscale(0); transform: scale(1); }
}

.dissipate-trigger {
  animation: heartbeat-dissipate 1.2s ease-in-out forwards;
}
.hero-title span { color: var(--red); }
.hero-sub {
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  font-size: 22px;
  color: var(--muted);
  max-width: 700px;
  margin: 0 auto 50px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 80px;
  position: relative;
}

/* BUTTONS */
.btn-primary {
  background: var(--ink);
  color: #000;
  padding: 18px 35px;
  border-radius: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.btn-primary:hover {
  background: var(--red);
  color: white;
  transform: translateY(-5px);
  box-shadow: 0 25px 50px var(--red-glow);
}
.ip-tag {
  background: rgba(0,0,0,0.1);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 11px;
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  padding: 18px 35px;
  border-radius: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  border: 2px solid var(--border-md);
  transition: var(--transition);
  text-decoration: none;
}
.btn-secondary:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(211, 47, 47, 0.05);
  transform: translateY(-5px);
}

/* TOAST */
#toast {
  display: none;
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--red);
  color: white;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
#toast.show { display: block; opacity: 1; }

/* STATS */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 50px 0;
  border-top: 1px solid var(--border);
}
.stat-val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  color: var(--ink);
}
.stat-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

/* SECTIONS */
.sec-divider {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 100px 0 50px;
}
.sec-divider-line { flex: 1; height: 1px; background: var(--border); }
.sec-divider-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  letter-spacing: 4px;
  color: var(--red);
}

/* BENTO */
.bento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}
.bento-card {
  background: var(--bg-card);
  padding: 40px;
  border-radius: 24px;
  border: 1px solid var(--border);
  transition: var(--transition);
}
.bento-card:hover {
  transform: translateY(-10px);
  border-color: var(--red);
  box-shadow: var(--shadow);
}
.bento-icon { font-size: 40px; margin-bottom: 25px; }
.bento-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  margin-bottom: 15px;
  letter-spacing: 1px;
  color: var(--ink);
}
.bento-desc { color: var(--muted); font-size: 15px; }

/* VOTES */
.vote-section { padding: 40px 0; }
.vote-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  max-width: 1000px;
  margin: 0 auto;
}
.vote-card {
  background: var(--bg-card);
  padding: 40px;
  border-radius: 24px;
  border: 1px solid var(--border);
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}
.vote-card:hover {
  transform: scale(1.02);
  border-color: var(--red);
  box-shadow: var(--shadow);
}
.vote-card-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  color: var(--ink);
}
.vote-card-btn {
  background: var(--red);
  color: white;
  padding: 12px 25px;
  border-radius: 10px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
}

/* BOUTIQUE */
.grades-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.grade-card {
  background: var(--bg-card);
  padding: 50px 40px;
  border-radius: 30px;
  border: 1px solid var(--border);
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.grade-card:hover { transform: translateY(-15px); border-color: var(--red); }
.grade-card.featured { border: 2px solid var(--red); transform: scale(1.05); }
.grade-name { font-family: 'Bebas Neue', sans-serif; font-size: 32px; margin-bottom: 10px; color: var(--ink); }
.grade-price { font-family: 'Bebas Neue', sans-serif; font-size: 48px; color: var(--red); margin-bottom: 30px; }
.grade-perks { list-style: none; text-align: left; margin-bottom: 40px; }
.grade-perks li { padding: 10px 0; color: var(--muted); display: flex; align-items: center; gap: 15px; }
.grade-perks li::before { content: '✓'; color: var(--green); font-weight: 900; }

.btn-grade {
  background: #ffffff;
  color: #000000;
  padding: 18px 35px;
  border-radius: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  width: 100%;
}
.btn-grade:hover {
  background: var(--red);
  color: white;
  transform: translateY(-5px);
  box-shadow: 0 20px 40px var(--red-glow);
}
.coming-soon { font-style: italic; opacity: 0.5; font-size: 0.8rem; }

/* MAP */
.map-wrap { padding: 50px 0; }
.map-overlay {
  background: #000;
  padding: 100px 40px;
  border-radius: 40px;
  text-align: center;
  color: white;
  border: 1px solid var(--border);
}
.map-title { font-family: 'Bebas Neue', sans-serif; font-size: clamp(2rem, 8vw, 4rem); margin-bottom: 20px; }
.map-desc { margin-bottom: 40px; color: var(--muted); }

/* FOOTER */
.footer {
  padding: 100px 40px 50px;
  border-top: 4px solid var(--red);
  background: rgba(10, 10, 10, 0.95);
  margin-top: 100px;
}
.footer-content { display: flex; justify-content: space-between; margin-bottom: 80px; }
.footer-brand .nav-logo { font-size: 40px; }
.footer-links { display: flex; gap: 50px; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 600; text-transform: uppercase; font-size: 12px; letter-spacing: 2px; }
.footer-links a:hover { color: var(--red); }

.btn-discord-footer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  color: var(--ink);
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
  transition: var(--transition);
  margin-top: 15px;
  border: 1px solid var(--red);
}

.btn-discord-footer:hover {
  background: var(--red);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px var(--red-glow);
}

.footer-bottom { text-align: center; color: rgba(255,255,255,0.2); font-size: 0.8rem; margin-top: 40px; }

/* WIKI SPECIFIC */
.wiki-container { max-width: 1000px; margin: 20px auto; padding: 0 20px; }
.wiki-header { text-align: center; margin-bottom: 30px; }
.wiki-header h1 { font-family: 'Bebas Neue', sans-serif; font-size: clamp(2.5rem, 8vw, 4rem); color: var(--ink); margin-bottom: 0; }
.wiki-header p { font-family: 'Crimson Pro', serif; font-style: italic; color: var(--muted); font-size: 1.1rem; margin-top: 5px; }
.wiki-nav-back { margin-bottom: 20px; }
.wiki-nav-back a { color: var(--ink); text-decoration: none; font-weight: 700; text-transform: uppercase; font-size: 0.9rem; transition: var(--transition); }
.wiki-nav-back a:hover { color: var(--red); transform: translateX(-5px); }

.wiki-card {
  background: var(--bg-card);
  border-radius: 15px;
  border: 1px solid var(--border);
  margin-bottom: 15px;
  transition: var(--transition);
  overflow: hidden;
}
.wiki-card:hover { border-color: var(--red); }
.wiki-card-head { padding: 30px 40px; display: flex; align-items: center; gap: 25px; cursor: pointer; }
.wiki-card-title { font-family: 'Bebas Neue', sans-serif; font-size: 1.8rem; color: var(--ink); }
.wiki-card-arrow { margin-left: auto; transition: var(--transition); opacity: 0.5; }
.wiki-card-body { max-height: 0; overflow: hidden; transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); background: rgba(0,0,0,0.2); }
.wiki-card-content { padding: 40px; border-top: 1px solid var(--border); color: var(--muted); }
.wiki-card.active .wiki-card-body { max-height: 1000px; }
.wiki-card.active .wiki-card-arrow { transform: rotate(180deg); color: var(--red); opacity: 1; }

/* RESPONSIVE DESIGN */
@media (max-width: 1200px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 15px; }
  .grades-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
  .hero-title { font-size: clamp(60px, 12vw, 100px); }
  .grades-grid { grid-template-columns: 1fr; max-width: 500px; margin: 0 auto; }
  .footer-content { flex-direction: column; align-items: center; text-align: center; gap: 40px; }
  .footer-links { flex-direction: column; gap: 15px; align-items: center; }
}

@media (max-width: 768px) {
  .hero-stats { grid-template-columns: 1fr; }
  .vote-grid { grid-template-columns: 1fr; }
  .sec-divider-label { font-size: 2rem; }
  .map-overlay { padding: 30px 20px; }
  .map-title { font-size: 2.5rem; }
  .wiki-card-head { padding: 20px; gap: 15px; }
  .wiki-card-title { font-size: 1.4rem; }
  .wiki-header h1 { font-size: 3rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 50px; }
  .hero-sub { font-size: 1rem; }
  .nav-status { font-size: 10px; padding: 6px 12px; }
  .btn-primary { width: 100%; text-align: center; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn-copy-ip { justify-content: center; }
}

/* MOBILE NAV OPEN STATE */
.nav.mobile-active {
  background: var(--bg);
  height: 100vh;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0; left: 0; width: 100%;
}

.nav.mobile-active .nav-links {
  display: flex;
  flex-direction: column;
  gap: 30px;
  text-align: center;
  margin: 40px 0;
}

.nav.mobile-active .nav-links a {
  font-size: 24px;
}

.nav.mobile-active .nav-status {
  margin-top: 20px;
}

/* OFFLINE BANNER */
.offline-banner {
  background: var(--red);
  color: white;
  padding: 12px;
  text-align: center;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 2000;
}
