/* Base */
:root {
  --bg: #0b0f14;
  --bg-alt: #0f141b;
  --card: #121923;
  --text: #ffffff;
  --muted: #ffffff;
  --primary: #ff8a00; /* оранжевый основной */
  --primary-600: #e07000; /* оранжевый hover */
  --accent: #ffa94d; /* оранжевый акцент */
  --danger: #ff6b6b;
  --border: #1f2a36;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { 
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica Neue, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, #0c1218 100%);
  overflow-x: hidden;
  max-width: 100vw;
}

/* Links */
a { color: #fa8500; text-decoration: underline; }
a:hover { color: #fa8500; }
a:visited { color: #fa8500; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,15,20,.75); backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
/* На мобилке уменьшаем z-index header, чтобы не перекрывал iframe */
@media (max-width: 720px) {
  .site-header {
    z-index: 40;
  }
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.logo-mark { color: var(--accent); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; }

.nav-menu { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.nav-menu a { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 8px; }
.nav-menu a:hover { color: var(--text); background: rgba(255,255,255,.06); }

/* Hero */
.hero { position: relative; padding: 72px 0 48px; border-bottom: 1px solid var(--border); }
.hero-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: center; }
.hero-content h1 { margin: 0 0 12px; font-size: 44px; line-height: 1.1; }
.subtitle { margin: 0 0 22px; color: var(--muted); }

.ip-box { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--border); padding: 12px; border-radius: 12px; width: fit-content; box-shadow: var(--shadow); }
.ip-info { display: grid; }
.ip-label { font-size: 12px; color: var(--muted); }
code { background: rgba(255,255,255,.06); padding: 2px 6px; border-radius: 6px; }

.cta { display: flex; gap: 12px; margin-top: 16px; }
.btn { appearance: none; border: 1px solid var(--border); background: #111924; color: var(--text); padding: 10px 14px; border-radius: 10px; cursor: pointer; text-decoration: none; transition: .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--primary); border-color: var(--primary-600); color: #081018; font-weight: 600; }
.btn.primary:hover { background: var(--primary-600); }
.btn.secondary { background: var(--card); }
.btn.ghost { background: transparent; }

.hero-art { position: relative; height: 260px; }
.hero-art .grid { position: absolute; inset: 0; background: radial-gradient(ellipse at top right, rgba(255,138,0,.25), transparent 55%), radial-gradient(ellipse at bottom left, rgba(255,169,77,.18), transparent 55%); border-radius: 16px; border: 1px dashed rgba(255,255,255,.08); }

/* Sections */
.section { padding: 56px 0; }
.section { scroll-margin-top: 80px; }
.hero { scroll-margin-top: 80px; }
.section.alt { background: var(--bg-alt); }
.section h2 { margin: 0 0 16px; font-size: 28px; }
.section-lead { color: var(--muted); margin-bottom: 30px; }

.two-col { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: start; }

.list { margin: 12px 0 0; padding-left: 18px; color: var(--muted); }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card .cta { justify-content: center; margin-top: auto; }
.card .cta .btn { width: 100%; height: 42px; text-align: center; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }

.kv { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.kv li { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; color: var(--muted); }

.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.feature h3 { margin: 0 0 8px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.rules { margin: 0; padding-left: 18px; color: var(--muted); }
 .steps { margin: 0; padding-left: 18px; color: var(--muted); }
.note { margin-top: 12px; color: var(--accent); }

.contacts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: #0a0e13; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; color: var(--muted); }
.footer-inner p { margin: 0; font-size: 0.875rem; line-height: 1.4; }
.footer-contacts { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 0.875rem; }
.footer-contacts p { margin: 0; line-height: 1.4; }
.footer-contacts a { color: var(--muted); text-decoration: underline; }
.footer-contacts a:hover { color: var(--text); }
.to-top { color: var(--muted); text-decoration: none; }
.to-top:hover { color: var(--text); }

/* Desktop/Mobile visibility helpers */
.desktop-only { display: block; }
.mobile-only { display: none; }

/* Responsive */
@media (max-width: 960px) {
  .hero-inner, .two-col { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  /* Show/hide desktop/mobile elements */
  .desktop-only { display: none !important; }
  .mobile-only { display: block !important; }
  
  .nav-toggle { display: block; }
  .nav-menu { position: absolute; right: 20px; top: 64px; background: var(--card); border: 1px solid var(--border); padding: 10px; border-radius: 12px; display: none; flex-direction: column; width: 220px; box-shadow: var(--shadow); z-index: 100; }
  .nav-menu.open { display: flex; }
  .nav-menu li { width: 100%; }
  .nav-menu a { display: block; width: 100%; padding: 10px; }
  
  /* Hero section mobile */
  .hero { padding: 48px 0 32px; }
  .hero-content h1 { font-size: 28px; line-height: 1.2; }
  .subtitle { font-size: 14px; }
  
  /* IP box mobile */
  .ip-box { flex-direction: column; width: 100%; gap: 8px; }
  .ip-info { width: 100%; }
  .ip-box .btn { width: 100%; }
  
  /* CTA buttons mobile */
  .cta { flex-direction: column; gap: 8px; }
  .cta .btn { width: 100%; }
  
  /* Sections mobile */
  .section { padding: 32px 0; }
  .section h2 { font-size: 24px; }
  .section-lead { font-size: 14px; }
  
  /* Features grid mobile */
  .features-grid { grid-template-columns: 1fr; gap: 12px; }
  
  /* Cards mobile */
  .cards { grid-template-columns: 1fr !important; gap: 12px; }
  
  /* Footer mobile */
  .site-footer {
    padding: 0;
  }
  .footer-inner { 
    flex-direction: column !important; 
    align-items: flex-start !important; 
    justify-content: flex-start !important;
    gap: 20px !important; 
    padding: 24px 16px !important; 
  }
  .footer-inner > div:first-child {
    width: 100%;
    order: 1;
  }
  .footer-inner > div:first-child p {
    margin-bottom: 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  .footer-inner > div:last-child { 
    width: 100% !important; 
    flex-direction: column !important; 
    align-items: flex-start !important; 
    gap: 12px !important; 
    display: flex !important;
    order: 2;
  }
  .footer-contacts { 
    flex-direction: column !important; 
    align-items: flex-start !important; 
    gap: 4px !important; 
    display: flex !important;
    width: 100%;
  }
  .footer-contacts p {
    margin: 0;
    line-height: 1.4;
  }
  .footer-contacts a {
    display: inline;
    text-decoration: underline;
  }
  .to-top {
    display: block !important;
    margin-top: 0 !important;
    padding: 8px 0;
  }
  
  /* Container padding mobile */
  .container { padding: 0 16px; }
  
  /* Card padding mobile */
  .card { padding: 12px; }
  
  /* Text sizes mobile */
  body { font-size: 15px; }
  h3 { font-size: 18px; }
  h4 { font-size: 16px; }
  p { font-size: 15px; line-height: 1.5; }
  
  /* Lists mobile */
  .list, .steps, .rules { padding-left: 20px; font-size: 14px; }
  
  /* KV list mobile */
  .kv li { grid-template-columns: 1fr; gap: 4px; }
  
  /* Section padding override for information page */
  .section[style*="padding: 40px 0 40px 40px"] { padding: 32px 16px !important; }
  .section.alt[style*="padding: 40px 0 40px 40px"] { padding: 32px 16px !important; }
  
  /* Rules page mobile */
  #rules .container h2 {
    padding-left: 20px;
  }
  /* Уменьшаем высоту футера на странице rules */
  main:has(#rules) + .site-footer .footer-inner,
  main:has(#rules) ~ .site-footer .footer-inner {
    padding: 16px 16px !important;
    gap: 12px !important;
  }
  /* Альтернативный вариант для браузеров без поддержки :has() */
  .site-footer[style*="margin-top: 0"] .footer-inner {
    padding: 16px 16px !important;
    gap: 12px !important;
  }
  #rules details {
    padding: 0 16px;
  }
  #rules details summary {
    padding-left: 20px !important;
    font-size: 1.1rem !important;
  }
  #rules details > div h3 {
    padding-left: 20px !important;
    font-size: 1rem !important;
    margin: 20px 0 12px !important;
  }
  #rules details > div p {
    padding-left: 20px !important;
    font-size: 0.9rem !important;
    margin-bottom: 20px !important;
  }
  #rules details > div .doc-link {
    padding-left: 20px !important;
  }
}


