:root {
  --bg: #0a0a0a;
  --bg-panel: #141414;
  --border: #3a3a3a;
  --text: #f2f2f2;
  --text-muted: #a3a3a3;
  --accent: #ff3333;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("/assets/img/watermark.png");
  background-repeat: repeat;
  background-size: 320px 124px;
  opacity: 0.05;
}

a { color: var(--accent); text-decoration: none; }

.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 20px 40px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.topnav .brand { font-weight: 700; font-size: 1.2rem; color: var(--text); }
.nav-links { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.nav-links .user-greeting {
  color: var(--text-muted);
  margin-right: 4px;
  font-size: 0.95rem;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.nav-links a:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: rgba(255, 51, 51, 0.08);
  box-shadow: 0 0 0 3px rgba(255, 51, 51, 0.12);
}
.nav-links a[href="/logout.php"],
.nav-links a[href="/register.php"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #05130f;
  font-weight: 700;
}
.nav-links a[href="/logout.php"]:hover,
.nav-links a[href="/register.php"]:hover {
  background: #ff4d4d;
  border-color: #ff4d4d;
}

main { flex: 1; width: 100%; max-width: 1000px; margin: 0 auto; padding: 0 24px; }
.page-narrow { max-width: 480px; margin: 60px auto; }

.hero {
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 80px 0;
  flex-wrap: wrap;
}
.hero-text { flex: 1 1 360px; }
.hero-text h1 { font-size: 2.8rem; margin: 0 0 16px; }
.hero-text .lead { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 32px; }
.hero-image img { max-width: 100%; height: auto; }

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: #05130f; border-color: var(--accent); font-weight: 700; }
.btn-large { padding: 16px 32px; font-size: 1.05rem; }

.features, .warnings, .pricing { padding: 48px 0; border-top: 1px solid var(--border); }
.feature-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.feature-check { color: var(--accent); margin-right: 8px; }
.warnings ul { color: var(--text-muted); }

.pricing { display: flex; justify-content: center; }
.price-card {
  background: var(--bg-panel);
  border: 1px solid var(--accent);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.price-tag { font-size: 3rem; font-weight: 800; color: var(--accent); }
.price-note { color: var(--text-muted); margin-bottom: 12px; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; color: var(--text-muted); }
.auth-form input {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 6px;
}

.alert { background: #2a1414; border: 1px solid #7a2b2b; color: #ffb3b3; padding: 12px 16px; border-radius: 8px; }

.license-box {
  background: var(--bg-panel);
  border: 1px solid var(--accent);
  border-radius: 16px;
  padding: 28px 24px;
  margin: 24px 0;
  text-align: center;
}
.license-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.license-key {
  display: block;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--accent);
  white-space: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
}

@media (max-width: 480px) {
  .license-key { font-size: 1.05rem; }
}
.license-note {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 14px 0 0;
}

.download-warning {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin: 20px 0 10px;
}

.lang-switch {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding-left: 8px;
  margin-left: 4px;
  border-left: 1px solid var(--border);
}

.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 1;
  text-decoration: none;
}

.lang-switch a.lang-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
}

@media (max-width: 640px) {
  .topnav {
    padding: 16px 20px;
    justify-content: center;
    text-align: center;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
  }

  .lang-switch {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    width: 100%;
    justify-content: center;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }
}

.site-footer {
  text-align: center;
  color: var(--text-muted);
  padding: 32px 0;
  margin-top: 48px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
