/* ===================================================
   DMS STAR — общие стили
   =================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #cc1111;
  --red-hot: #ff3333;
  --bg: #080808;
  --surface: #111111;
  --card: #161616;
  --text: #e0e0e0;
  --muted: #666;
  --border: #2a2a2a;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

a { color: inherit; }

/* ===== NAV ===== */
nav.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 48px;
  background: rgba(8,8,8,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--red);
  letter-spacing: 0.1em;
  text-decoration: none;
}
.nav-links { display: flex; gap: 26px; list-style: none; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active { color: var(--red-hot); }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  position: fixed;
  top: 57px; left: 0; right: 0;
  max-height: calc(100vh - 57px);
  overflow-y: auto;
  background: rgba(8,8,8,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 24px;
  flex-direction: column;
  gap: 0;
  z-index: 99;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  color: var(--text);
  text-decoration: none;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a.active { color: var(--red-hot); }

/* ===== PAGE HERO (для подстраниц) ===== */
.page-hero {
  padding: 160px 48px 64px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(204,17,17,0.10) 0%, transparent 70%),
    var(--bg);
}
.page-hero .section-label { margin-bottom: 12px; }
.page-hero h1 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 6vw, 3.2rem);
  color: #fff;
  letter-spacing: 0.03em;
}
.page-hero p.lead {
  margin-top: 16px;
  max-width: 640px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* ===== SECTIONS ===== */
section { padding: 100px 48px; }
.section-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: #fff;
  margin-bottom: 48px;
}
.container { max-width: 1100px; margin: 0 auto; }
.container.narrow { max-width: 760px; }

/* ===== IP BAR ===== */
.ip-bar {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  background: var(--card);
  overflow: hidden;
}
.ip-bar .ip-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: #fff;
  padding: 14px 22px;
  user-select: all;
}
.ip-bar button.copy-btn {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--red);
  color: #fff;
  border: none;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.ip-bar button.copy-btn:hover { background: var(--red-hot); }
.ip-bar button.copy-btn.copied { background: #1a7a1a; }

/* ===== CARDS / GRIDS (reusable) ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.info-card {
  background: var(--card);
  padding: 32px;
}
.info-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.info-card p {
  font-size: 0.87rem;
  color: var(--muted);
  line-height: 1.7;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.stat {
  background: var(--card);
  padding: 28px;
  text-align: center;
}
.stat-num {
  font-family: 'Orbitron', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--red);
}
.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-top: 4px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 28px;
  border: 1px solid var(--red);
  color: var(--red);
  transition: all 0.2s;
}
.btn:hover { background: var(--red); color: #fff; }
.btn.solid { background: var(--red); color: #fff; }
.btn.solid:hover { background: var(--red-hot); border-color: var(--red-hot); }

/* ===== ACCORDION (FAQ) ===== */
.accordion-item {
  border: 1px solid var(--border);
  background: var(--card);
  margin-bottom: 1px;
}
.accordion-item + .accordion-item { border-top: none; }
.accordion-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 22px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.accordion-q .plus {
  font-family: 'Orbitron', sans-serif;
  color: var(--red);
  font-size: 1.1rem;
  transition: transform 0.25s;
  flex-shrink: 0;
}
.accordion-item.open .accordion-q .plus { transform: rotate(45deg); }
.accordion-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 24px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
}
.accordion-item.open .accordion-a {
  max-height: 600px;
  padding: 0 24px 22px;
}

/* ===== RULE LIST (nummered, real sequence use only where relevant) ===== */
.rule-block { margin-bottom: 40px; }
.rule-block h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.rule-block ul { list-style: none; }
.rule-block li {
  position: relative;
  padding: 10px 0 10px 24px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  border-bottom: 1px solid var(--border);
}
.rule-block li:last-child { border-bottom: none; }
.rule-block li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--red);
}
.rule-block li strong { color: var(--text); font-weight: 500; }

/* ===== NEWS ===== */
.news-item {
  border: 1px solid var(--border);
  background: var(--card);
  padding: 28px 32px;
  margin-bottom: 1px;
}
.news-date {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  color: var(--red);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.news-item h3 { color: #fff; font-size: 1.05rem; margin-bottom: 10px; }
.news-item p { color: var(--muted); font-size: 0.88rem; line-height: 1.7; }

/* ===== MEDIA GALLERY (content page) ===== */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.media-card {
  background: var(--card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.2s;
}
.media-card:hover { border-color: var(--red); }
.media-card .thumb {
  aspect-ratio: 16/9;
  background: #000;
  position: relative;
  overflow: hidden;
}
.media-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-card .thumb iframe { width: 100%; height: 100%; border: none; }
.media-card .meta { padding: 16px 18px; }
.media-card .meta h4 { color: #fff; font-size: 0.85rem; margin-bottom: 4px; }
.media-card .meta span { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.05em; }

.media-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.media-filter button {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 18px;
  cursor: pointer;
  transition: all 0.2s;
}
.media-filter button:hover { color: var(--text); border-color: var(--red); }
.media-filter button.active { background: var(--red); color: #fff; border-color: var(--red); }

/* ===== NEWS TABS ===== */
.news-tabs {
  display: flex;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 40px;
}
.news-tab {
  flex: 1;
  background: var(--card);
  color: var(--muted);
  border: none;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.news-tab:hover { color: var(--text); }
.news-tab.active { background: var(--red); color: #fff; }

.news-panel { display: none; }
.news-panel.active { display: block; }

/* ===== DEVLOG TIMELINE ===== */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 4px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding: 0 0 40px 24px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px; top: 4px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px var(--bg), 0 0 8px rgba(204,17,17,0.6);
}
.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
}
.timeline-num {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}
.timeline-date {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.timeline-duration {
  font-size: 0.7rem;
  color: var(--red);
  border: 1px solid var(--red);
  padding: 2px 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.timeline-group { margin-bottom: 14px; }
.timeline-group:last-child { margin-bottom: 0; }
.timeline-group-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.timeline-group.added .timeline-group-label { color: #3fae4e; }
.timeline-group.removed .timeline-group-label { color: var(--red-hot); }
.timeline-group.fixed .timeline-group-label { color: #4a9fd8; }
.timeline-group ul { list-style: none; }
.timeline-group li {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  padding: 4px 0 4px 16px;
  position: relative;
}
.timeline-group li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: currentColor;
  opacity: 0.5;
}

/* ===== FOOTER ===== */
footer.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 1rem;
  color: var(--red);
}
.footer-copy { font-size: 0.75rem; color: var(--muted); }
.footer-links { display: flex; gap: 20px; list-style: none; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 0.78rem; }
.footer-links a:hover { color: var(--text); }

/* ===== FADE-IN utility ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  nav.site-nav { padding: 16px 20px; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  section { padding: 72px 20px; }
  .page-hero { padding: 140px 20px 48px; }
  footer.site-footer { flex-direction: column; gap: 12px; text-align: center; padding: 32px 20px; }
  .ip-bar { flex-direction: column; width: 100%; }
  .ip-bar .ip-text { text-align: center; width: 100%; }
  .ip-bar button.copy-btn { width: 100%; }
}

/* Focus visibility for accessibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--red-hot);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
