:root {
  --bg: #0b0f1a;
  --bg-elevated: #121826;
  --bg-card: #161e2e;
  --text: #e8eef7;
  --text-muted: #94a3b8;
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --accent: #22d3ee;
  --gradient: linear-gradient(135deg, #6366f1 0%, #22d3ee 100%);
  --border: rgba(148, 163, 184, 0.15);
  --radius: 12px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --max: 1100px;
  --danger: #f87171;
  --ok: #34d399;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #67e8f9; }
ul { list-style: none; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,15,26,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px; gap: 1rem;
}
.logo img { height: 40px; width: auto; }
.main-nav ul { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.main-nav a { color: var(--text-muted); font-weight: 500; font-size: .93rem; }
.main-nav a:hover, .main-nav a.active { color: var(--text); }

.lang-switcher { display: flex; gap: .3rem; }
.lang-switcher a {
  font-size: .72rem; font-weight: 700; color: var(--text-muted);
  padding: .2rem .4rem; border-radius: 4px; text-transform: uppercase;
}
.lang-switcher a:hover, .lang-switcher a.active {
  color: var(--text); background: rgba(99,102,241,.25);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .65rem 1.3rem; font-weight: 600; font-size: .95rem;
  border-radius: 8px; border: 2px solid transparent; cursor: pointer;
  transition: .2s; font-family: inherit; text-decoration: none;
}
.btn-primary { background: var(--gradient); color: #0b0f1a; border: none; }
.btn-primary:hover { filter: brightness(1.08); color: #0b0f1a; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary-hover); }
.btn-lg { padding: .85rem 1.7rem; font-size: 1.05rem; }
.btn-danger { background: var(--danger); color: #fff; border: none; }
.btn-sm { padding: .4rem .8rem; font-size: .85rem; }

.mobile-menu-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px;
}
.mobile-menu-toggle span { display: block; width: 22px; height: 2px; background: var(--text); }

.hero {
  padding: 4rem 0 4.5rem;
  background: radial-gradient(ellipse 80% 55% at 50% -15%, rgba(99,102,241,.22), transparent);
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; }
.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.15;
  margin-bottom: 1rem; letter-spacing: -.02em;
}
.gradient-text {
  background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-lead { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 1.5rem; max-width: 36rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 1.5rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; font-size: .9rem; color: var(--text-muted); }
.hero-logo { filter: drop-shadow(0 16px 36px rgba(99,102,241,.28)); max-width: 400px; margin: 0 auto; }

.section { padding: 3.5rem 0; }
.section-title { font-size: clamp(1.5rem, 2.8vw, 2rem); font-weight: 700; text-align: center; margin-bottom: .6rem; }
.section-sub { text-align: center; color: var(--text-muted); max-width: 36rem; margin: 0 auto 2.2rem; }
.bg-elevated { background: var(--bg-elevated); }

.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem;
}
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; transition: .2s;
}
.feature-card:hover { transform: translateY(-3px); border-color: rgba(99,102,241,.4); }
.feature-icon { font-size: 1.6rem; margin-bottom: .6rem; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.feature-card p { color: var(--text-muted); font-size: .93rem; }

.page-hero { padding: 2.5rem 0 1.5rem; border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); margin-bottom: .4rem; }
.page-hero p { color: var(--text-muted); }

.content-section { padding: 2rem 0 3.5rem; }
.content-section h2 { font-size: 1.3rem; margin: 1.8rem 0 .6rem; }
.content-section h3 { font-size: 1.05rem; margin: 1.2rem 0 .4rem; }
.content-section p, .content-section li { color: var(--text-muted); margin-bottom: .7rem; max-width: 48rem; }
.content-section ul { list-style: disc; padding-left: 1.3rem; margin-bottom: 1rem; }

.site-footer {
  margin-top: auto; background: var(--bg-elevated); border-top: 1px solid var(--border); padding-top: 2.5rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 1.5rem; padding-bottom: 2rem;
}
.footer-brand img { height: 34px; width: auto; }
.footer-brand p { color: var(--text-muted); font-size: .88rem; margin-top: .7rem; max-width: 240px; }
.footer-links h4 {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: .8rem;
}
.footer-links a { color: var(--text); font-size: .92rem; display: block; padding: .2rem 0; }
.footer-bottom {
  border-top: 1px solid var(--border); padding: 1.1rem 0; font-size: .82rem; color: var(--text-muted);
}

.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  background: var(--bg-elevated); border-top: 1px solid var(--border);
  padding: 1.1rem; box-shadow: 0 -8px 32px rgba(0,0,0,.4); display: none;
}
.cookie-banner.show { display: block; }
.cookie-content {
  max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
}
.cookie-content p { flex: 1 1 280px; font-size: .88rem; color: var(--text-muted); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }

/* Forum */
.forum-layout { display: grid; gap: 1.5rem; }
.forum-toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.forum-cats { display: grid; gap: .75rem; }
.forum-cat {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.2rem 1.4rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.forum-cat h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.forum-cat p { color: var(--text-muted); font-size: .9rem; }
.thread-list { display: grid; gap: .5rem; }
.thread-item {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  padding: 1rem 1.2rem; display: grid; grid-template-columns: 1fr auto; gap: .5rem;
}
.thread-item h3 { font-size: 1rem; }
.thread-meta { font-size: .82rem; color: var(--text-muted); }
.auth-box {
  max-width: 420px; margin: 0 auto; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem;
}
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .88rem; font-weight: 500; margin-bottom: .3rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: .65rem .85rem; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-family: inherit; font-size: 1rem;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.2);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-error { color: var(--danger); font-size: .88rem; margin-bottom: .8rem; }
.form-ok { color: var(--ok); font-size: .88rem; margin-bottom: .8rem; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.post-body { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem; margin-bottom: 1rem; }
.post-body .meta { font-size: .82rem; color: var(--text-muted); margin-bottom: .6rem; }
.post-body .content { white-space: pre-wrap; word-break: break-word; }
.user-badge { font-size: .8rem; color: var(--accent); }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-cta, .hero-meta { justify-content: center; }
  .hero-visual { order: -1; }
  .hero-logo { max-width: 260px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .main-nav { display: none; }
  .main-nav.open {
    display: block; position: absolute; top: 70px; left: 0; right: 0;
    background: var(--bg-elevated); border-bottom: 1px solid var(--border); padding: 1rem;
  }
  .main-nav.open ul { flex-direction: column; gap: .4rem; }
  .mobile-menu-toggle { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
}
