/* ============================================
   DOOMSDAY — Home Page
   ============================================ */

/* ---- Hero Live Online Counter ---- */
.hero-live-online {
  margin: 14px 0 4px;
  font-family: 'Black Ops One', cursive;
  color: var(--blood, #c41e1e);
  font-size: 1.05rem;
  letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(196, 30, 30, 0.5);
}
.hero-live-online .live-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blood, #c41e1e);
  box-shadow: 0 0 8px var(--blood, #c41e1e);
  vertical-align: middle;
  margin-right: 8px;
  animation: pulse 1.6s infinite;
}
.hero-live-online .live-suffix {
  font-size: 0.85rem;
  color: var(--bone, #e8ddc8);
  font-weight: 400;
  margin-left: 4px;
}
@media (prefers-reduced-motion: reduce) {
  .hero-live-online .live-dot { animation: none; }
}

/* ---- Server mini-card copy button ---- */
.server-mini-card .copy-btn {
  margin-top: 10px;
  width: 100%;
  font-size: 0.78rem;
  padding: 6px 10px;
  position: relative;
}
.server-mini-card .copy-btn .copied {
  display: none;
  margin-left: 4px;
  color: #5fff7a;
}
.server-mini-card .copy-btn.show-copied .copied {
  display: inline;
}

/* ---- Community Section (Discord widget + Telegram) ---- */
.community-section {
  padding: var(--space-2xl) 0;
  background: linear-gradient(180deg, transparent 0%, rgba(88,101,242,0.04) 50%, rgba(34,158,217,0.04) 100%);
  border-top: 1px solid var(--surface, #1e1e1e);
  border-bottom: 1px solid var(--surface, #1e1e1e);
}
.community-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  max-width: 960px;
  margin: var(--space-xl) auto 0;
}
.community-card {
  background: var(--bg-secondary, #111);
  border: 1px solid var(--surface, #1e1e1e);
  border-radius: 10px;
  padding: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 480px;
}
.community-card iframe {
  border-radius: 6px;
  flex: 1;
  min-height: 380px;
  background: #0a0a0a;
}
.community-card-fallback {
  text-align: center;
  padding-top: 10px;
  border-top: 1px solid var(--surface, #1e1e1e);
}
.community-card-fallback p {
  font-size: 0.8rem;
  color: #8b8b8b;
  margin-bottom: 8px;
}
.telegram-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 30px 20px;
}
.telegram-icon-big svg {
  filter: drop-shadow(0 0 14px rgba(34, 158, 217, 0.4));
}
.telegram-title {
  font-family: 'Black Ops One', cursive;
  color: #e8ddc8;
  font-size: 1.4rem;
  letter-spacing: 1px;
  margin: 0;
}
.telegram-desc {
  color: #aaa;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 340px;
}
.telegram-handle {
  font-family: 'Share Tech Mono', monospace;
  color: #229ED9;
  font-size: 0.85rem;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ---- Live Chat Widget (read-only feed from server) ---- */
.chat-feed-section {
  padding: var(--space-2xl) 0;
  background: linear-gradient(180deg, transparent 0%, rgba(196,30,30,0.03) 100%);
}
.chat-widget {
  max-width: 760px;
  margin: var(--space-xl) auto 0;
  background: linear-gradient(155deg, #15110d 0%, #0a0807 100%);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.chat-widget::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--blood, #c41e1e) 0 12px, transparent 12px 24px);
  opacity: 0.5;
}
.chat-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: #0a0807;
}
.chat-tab {
  flex: 1;
  padding: 12px 8px;
  background: transparent;
  border: 0;
  border-right: 1px solid rgba(255,255,255,0.04);
  color: #6a6a6a;
  font-family: 'Black Ops One', cursive;
  font-size: 0.85rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chat-tab:last-child { border-right: 0; }
.chat-tab:hover:not(:disabled) { color: var(--text-primary, #e8ddc8); background: rgba(196,30,30,0.06); }
.chat-tab.active {
  color: var(--blood-bright, #ef3a3a);
  background: rgba(196,30,30,0.12);
  box-shadow: inset 0 -2px 0 var(--blood, #c41e1e);
}
.chat-tab:disabled { opacity: 0.35; cursor: not-allowed; }

.chat-body {
  height: 320px;
  overflow-y: auto;
  padding: 14px 18px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.88rem;
  line-height: 1.55;
  scroll-behavior: smooth;
}
.chat-body::-webkit-scrollbar { width: 6px; }
.chat-body::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); }
.chat-body::-webkit-scrollbar-thumb { background: rgba(196,30,30,0.4); border-radius: 3px; }
.chat-empty { text-align: center; padding: 60px 20px; color: #5a4a3a; font-style: italic; }

.chat-msg {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.03);
  color: #d8d8d8;
  flex-wrap: wrap;
}
.chat-msg:last-child { border-bottom: 0; }
.chat-time { color: #5a4a3a; flex: 0 0 auto; font-size: 0.75rem; padding-top: 2px; }
.chat-name { color: #FFB800; flex: 0 0 auto; font-weight: 700; }
.chat-text { color: #d8d8d8; word-break: break-word; flex: 1 1 auto; min-width: 0; }

.chat-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: #050302;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  color: #5a4a3a;
  letter-spacing: 0.5px;
}
.chat-foot #chat-status { color: #5fff7a; }

@media (max-width: 600px) {
  .chat-body { height: 260px; padding: 10px 12px; font-size: 0.8rem; }
  .chat-tab { font-size: 0.72rem; padding: 10px 4px; letter-spacing: 0; }
  .chat-foot { font-size: 0.65rem; padding: 6px 10px; flex-direction: column; gap: 2px; align-items: flex-start; }
}

/* ---- Screenshots Gallery ---- */
.gallery-section {
  padding: var(--space-2xl) 0;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xl);
}
.gallery-item {
  aspect-ratio: 16 / 9;
  background: var(--bg-secondary, #111);
  border: 1px solid var(--surface, #1e1e1e);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
  cursor: default;
}
.gallery-item:hover {
  border-color: var(--blood, #c41e1e);
  transform: translateY(-2px);
}
.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, rgba(196,30,30,0.04), rgba(196,30,30,0.04) 20px, rgba(0,0,0,0.3) 20px, rgba(0,0,0,0.3) 40px);
  color: var(--text-secondary, #8b8b8b);
  gap: 6px;
}
.gallery-placeholder .ph-icon {
  font-size: 2.5rem;
  opacity: 0.4;
}
.gallery-placeholder .ph-label {
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.gallery-cta {
  text-align: center;
  margin-top: var(--space-lg);
  color: var(--text-secondary, #8b8b8b);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .community-grid, .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

/* ---- Hero Section ---- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(196,30,30,0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(255,184,0,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(196,30,30,0.06) 0%, transparent 40%),
    var(--bg-primary);
}

/* Vignette overlay — затемнение по углам, медленное пульсирование */
.hero-vignette {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,0.78) 100%);
}

/* Fog-layers — медленный drift с разной фазой (parallax) */
.hero-fog {
  position: absolute;
  left: -10%;
  width: 120%;
  pointer-events: none;
  opacity: 0.40;
  z-index: 2;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.hero-fog-1 {
  top: 8%; height: 38%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200' preserveAspectRatio='none'%3E%3Cfilter id='b'%3E%3CfeGaussianBlur stdDeviation='14'/%3E%3C/filter%3E%3Cellipse cx='200' cy='100' rx='320' ry='80' fill='%23332624' filter='url(%23b)' opacity='.6'/%3E%3Cellipse cx='600' cy='110' rx='480' ry='90' fill='%231f1815' filter='url(%23b)' opacity='.7'/%3E%3Cellipse cx='980' cy='90' rx='340' ry='70' fill='%232c2018' filter='url(%23b)' opacity='.55'/%3E%3C/svg%3E");
  animation: fog-drift-1 60s ease-in-out infinite alternate;
}
.hero-fog-2 {
  bottom: 6%; height: 36%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200' preserveAspectRatio='none'%3E%3Cfilter id='b'%3E%3CfeGaussianBlur stdDeviation='18'/%3E%3C/filter%3E%3Cellipse cx='320' cy='110' rx='420' ry='100' fill='%23241410' filter='url(%23b)' opacity='.75'/%3E%3Cellipse cx='820' cy='100' rx='540' ry='90' fill='%231a0e0c' filter='url(%23b)' opacity='.7'/%3E%3C/svg%3E");
  animation: fog-drift-2 80s ease-in-out infinite alternate;
}
.hero-fog-3 {
  bottom: 0; height: 22%;
  opacity: 0.55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 130' preserveAspectRatio='none'%3E%3Cg fill='%23000'%3E%3Crect x='0' y='80' width='80' height='50'/%3E%3Crect x='90' y='95' width='40' height='35'/%3E%3Crect x='150' y='85' width='30' height='45'/%3E%3Crect x='190' y='100' width='35' height='30'/%3E%3Crect x='240' y='90' width='50' height='40'/%3E%3Crect x='1100' y='80' width='100' height='50'/%3E%3Crect x='1050' y='100' width='40' height='30'/%3E%3Crect x='1010' y='90' width='30' height='40'/%3E%3Crect x='960' y='100' width='35' height='30'/%3E%3C/g%3E%3C/svg%3E");
  background-position: bottom center;
  background-size: 100% auto;
}

.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.hero-content {
  position: relative;
  z-index: 4;
  padding: 0 var(--space-lg);
  max-width: 100%;
  overflow-x: clip;
}

@media (max-width: 480px) {
  .hero-title { letter-spacing: 3px !important; font-size: 2.4rem !important; }
  .hero-skull { font-size: 1.6rem !important; }
  .hero-title-row { gap: 6px !important; }
  .hero-content { padding: 0 var(--space-sm); }
  .hero-buttons { flex-direction: column; gap: 8px; width: 100%; max-width: 280px; margin: 0 auto; }
  .hero-buttons .btn, .hero-buttons .btn-blood { width: 100%; }
}

.hero-version {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--hazard-yellow);
  border: 1px solid var(--hazard-yellow);
  background: rgba(58, 48, 16, 0.55);
  padding: 4px 14px;
  margin-bottom: var(--space-lg);
  letter-spacing: 3px;
  text-shadow: 0 0 8px rgba(255,184,0,0.5);
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

/* Title row: skull + DOOMSDAY + skull */
.hero-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vw, 28px);
  margin-bottom: 6px;
  opacity: 0;
  animation: fadeInUp 1s ease 0.4s forwards;
}
.hero-skull {
  font-family: 'Segoe UI Symbol', sans-serif;
  font-size: clamp(2rem, 6vw, 4.5rem);
  color: var(--blood-bright);
  text-shadow: 0 0 18px var(--blood-glow-strong), 0 0 40px var(--blood-glow);
  line-height: 1;
}
.hero-skull-l { animation: float 4s ease-in-out infinite; }
.hero-skull-r { animation: float 4.4s ease-in-out infinite reverse; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 8rem);
  color: var(--bone);
  text-transform: uppercase;
  letter-spacing: 8px;
  line-height: 1;
  margin: 0;
  text-shadow:
    0 0 22px var(--blood-glow-strong),
    0 0 48px var(--blood-glow),
    0 0 80px rgba(196,30,30,0.20),
    0 4px 0 #000;
}
/* glitch ::before/::after уже определены в components.css */

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(0.8rem, 1.6vw, 1.05rem);
  color: var(--blood-bright);
  letter-spacing: 6px;
  text-shadow: 0 0 10px var(--blood-glow);
  margin: 14px 0 6px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.55s forwards;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  color: var(--bone-dim);
  letter-spacing: 1.5px;
  margin-bottom: var(--space-xl);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  text-transform: none;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.7s forwards;
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.8s ease 1s forwards;
}

/* ---- Server Status Strip ---- */
.servers-strip {
  background: var(--bg-secondary);
  border-top: 1px solid var(--toxic-green-dim);
  border-bottom: 1px solid var(--toxic-green-dim);
  padding: var(--space-xl) 0;
  position: relative;
}

.servers-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.server-mini-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--toxic-green-dim);
  padding: var(--space-md) var(--space-lg);
  clip-path: polygon(0 8px, 8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
  transition: all var(--transition-normal);
}

.server-mini-card:hover {
  border-color: var(--toxic-green);
  box-shadow: 0 0 20px var(--toxic-glow);
}

.server-mini-card .server-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.server-mini-card .server-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.server-mini-card .server-port {
  color: var(--toxic-green);
  font-family: var(--font-body);
}

/* Color coding by difficulty */
.server-mini-card.hard { border-left: 3px solid var(--blood-red); }
.server-mini-card.normal { border-left: 3px solid var(--hazard-orange); }
.server-mini-card.lite { border-left: 3px solid var(--toxic-green); }
.server-mini-card.new { border-left: 3px solid var(--steel-blue); }

@media (max-width: 1024px) {
  .servers-strip-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* ---- Features Section ---- */
.features-section {
  background: var(--bg-primary);
  padding: var(--space-2xl) 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.feature-card {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
}

.feature-card .icon-circle {
  margin: 0 auto var(--space-md);
}

.feature-card .card-title {
  color: var(--toxic-green);
  margin-bottom: var(--space-sm);
  font-size: 1rem;
}

@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* ---- Systems Teaser ---- */
.teaser-section {
  background: var(--bg-secondary);
  padding: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}

.teaser-content {
  position: relative;
  z-index: 2;
}

.teaser-stats {
  display: flex;
  gap: var(--space-xl);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

.teaser-stat {
  text-align: center;
}

.teaser-stat .stat-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--toxic-green);
  display: block;
  text-shadow: 0 0 20px var(--toxic-glow);
}

.teaser-stat .stat-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.teaser-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(57,255,20,0.08), transparent 70%);
  pointer-events: none;
}

.teaser-glow.left { top: -100px; left: -100px; }
.teaser-glow.right { bottom: -100px; right: -100px; }

/* ---- Shop Teaser ---- */
.shop-teaser {
  background: var(--bg-primary);
  padding: var(--space-2xl) 0;
  text-align: center;
}

.shop-teaser-cards {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.shop-preview-card {
  background: var(--bg-secondary);
  border: 1px solid var(--toxic-green-dim);
  padding: var(--space-lg);
  width: 200px;
  text-align: center;
  clip-path: polygon(0 10px, 10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: all var(--transition-normal);
}

.shop-preview-card:hover {
  border-color: var(--toxic-green);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--toxic-glow);
}

.shop-preview-card .price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--toxic-green);
  display: block;
  margin-top: var(--space-sm);
}

.shop-preview-card .item-name {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-primary);
}
