:root {
  --bg-body: #121418;
  --bg-header: #181b22;
  --bg-card: #1c212c;
  --border-color: #2b313e;
  --accent-green: #22c55e;
  --accent-hover: #16a34a;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Верхний баннер */
.top-banner {
  background: linear-gradient(90deg, #16a34a, #15803d);
  color: #fff;
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-green);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #121418;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.3);
}

nav { display: flex; gap: 1.5rem; }
nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s;
}
nav a:hover { color: var(--text-main); }

.auth-buttons { display: flex; gap: 10px; }
.btn-login {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.15s;
  text-decoration: none;
  display: inline-block;
}
.btn-login:hover { background: rgba(255,255,255,0.05); }

/* Hero */
.hero {
  padding: 6rem 2rem 4rem;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.server-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--accent-green);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: #fff;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

.cta-container { display: flex; justify-content: center; gap: 12px; }

.btn-primary {
  background-color: var(--accent-green);
  color: #121418;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background-color 0.15s, transform 0.1s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.btn-primary:hover { background-color: var(--accent-hover); }
.btn-primary:active { transform: scale(0.98); }
.btn-block { display: block; width: 100%; }

.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border-color);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  max-width: 1000px;
  margin: 3rem auto 0;
  background-color: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.stat-item { padding: 1.5rem; text-align: center; background: var(--bg-card); }
.stat-value { font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: 0.25rem; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* Секции */
.features { padding: 5rem 5%; max-width: 1200px; margin: 0 auto; }
.section-title { text-align: center; font-size: 2rem; font-weight: 700; margin-bottom: 3rem; color: #fff; }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2rem;
  transition: border-color 0.15s;
}
.card:hover { border-color: #4b5563; }
.card h3 { font-size: 1.15rem; margin-bottom: 0.75rem; color: #fff; }
.card p { color: var(--text-muted); font-size: 0.9rem; }

/* Тарифы */
.plan-price { font-size: 1.75rem; font-weight: 700; color: #fff; margin: 0.5rem 0; }
.plan-price span { font-size: 0.9rem; color: var(--text-muted); font-weight: 400; }
.card ul { list-style: none; margin: 1rem 0 1.5rem; }
.card ul li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(43, 49, 62, 0.5);
}
.card ul li:last-child { border-bottom: none; }

/* Футер */
footer {
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 5%;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
footer p { margin-bottom: 0.5rem; }
footer a { color: var(--text-muted); text-decoration: underline; }
footer a:hover { color: var(--text-main); }
.footer-note { font-size: 0.75rem; margin-top: 1rem; opacity: 0.7; }

/* Страница входа */
.login-page { display: flex; flex-direction: column; min-height: 100vh; }
.login-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.login-card h1 {
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 1.5rem;
  text-align: center;
}
.plan-info {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: var(--accent-green);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.login-card label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.login-card input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  margin-bottom: 1.1rem;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
}
.login-card input:focus { border-color: var(--accent-green); }
.login-alt {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.login-alt a { color: var(--accent-green); text-decoration: none; }
.login-alt a:hover { text-decoration: underline; }

/* Адаптивность */
@media (max-width: 768px) {
  header { flex-wrap: wrap; gap: 1rem; padding: 1rem 4%; }
  nav { gap: 1rem; }
  .hero h1 { font-size: 2rem; }
  .hero { padding: 4rem 1rem 3rem; }
  .stats-bar { grid-template-columns: 1fr; }
  .grid-cards { grid-template-columns: 1fr; }
}

/* ===== Внутренние страницы ===== */
.page-hero {
  padding: 4rem 2rem 1rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.page-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: #fff;
}
.page-hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
}

.card-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 1rem;
}
.card p strong { color: var(--text-main); font-weight: 600; }

.card-link {
  display: inline-block;
  margin-top: 1.1rem;
  color: var(--accent-green);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.15s;
}
.card-link:hover { color: var(--accent-hover); text-decoration: underline; }

/* Список правил */
.rules-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.rule-item {
  display: flex;
  gap: 1.25rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  transition: border-color 0.15s;
}
.rule-item:hover { border-color: #4b5563; }
.rule-number {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.05rem;
}
.rule-item h3 { font-size: 1.05rem; color: #fff; margin-bottom: 0.4rem; }
.rule-item p { color: var(--text-muted); font-size: 0.9rem; }

/* Навигация в футере */
.footer-nav { margin-bottom: 1.1rem; }
.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin: 0 0.45rem;
  font-size: 0.85rem;
  transition: color 0.15s;
}
.footer-nav a:hover { color: var(--text-main); }

@media (max-width: 768px) {
  .page-hero h1 { font-size: 1.9rem; }
  .rule-item { flex-direction: column; gap: 0.75rem; }
}