:root {
  --bg: #050607;
  --panel: rgba(14, 16, 20, 0.88);
  --panel-2: #14171d;
  --border: rgba(255,255,255,0.10);
  --text: #f2f2f2;
  --muted: #9aa0aa;
  --accent: #4caf50;
  --accent-2: #e0a52c;
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: rgba(5,6,7,0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.brand img { width: 34px; height: 34px; image-rendering: pixelated; }
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.nav a, .nav button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}
.nav a:hover, .nav a.active, .nav button:hover {
  color: var(--text);
  background: var(--panel-2);
  border-color: var(--border);
  text-decoration: none;
}
.nav a img, .nav button img { width: 16px; height: 16px; opacity: 0.95; }
.nav .btn-dl {
  background: var(--accent);
  color: #06100a;
  border-color: transparent;
  font-weight: 600;
}
.nav .btn-dl:hover { filter: brightness(1.08); color: #06100a; }

.hero {
  position: relative;
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: #000 center/cover no-repeat;
  filter: brightness(0.42) contrast(1.05);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,6,7,0.25) 0%, rgba(5,6,7,0.88) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px;
  text-align: center;
}
.hero-content h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}
.hero-content p {
  color: var(--muted);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: 0.15s ease;
  font-family: inherit;
}
.btn img { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #06100a; }
.btn-primary:hover { filter: brightness(1.08); text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--panel-2); text-decoration: none; }
.btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn[disabled] { opacity: 0.55; cursor: wait; }

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 36px 20px 64px;
}
.page h1 { font-size: 28px; margin-bottom: 8px; }
.page .lead { color: var(--muted); margin-bottom: 28px; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
a.card { display: block; color: inherit; text-decoration: none; }
a.card:hover { border-color: rgba(255,255,255,0.18); }
.card + .card { margin-top: 14px; }
.card h2, .card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14px; }
.card .meta { font-size: 12px; color: #6f7580; margin-bottom: 8px; }

.status-box {
  max-width: 520px;
  margin: 80px auto;
  text-align: center;
  padding: 36px 28px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.status-box img.logo { width: 64px; height: 64px; margin: 0 auto 18px; image-rendering: pixelated; }
.status-box h1 { font-size: 24px; margin-bottom: 10px; }
.status-box p { color: var(--muted); margin-bottom: 22px; }

.form-grid { display: grid; gap: 12px; }
label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 6px; }
input[type="text"], input[type="date"], textarea {
  width: 100%;
  background: #0a0c10;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}
textarea { min-height: 180px; resize: vertical; }
.hint { font-size: 12px; color: #6f7580; margin-top: 6px; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px;
  text-align: center;
  color: #6f7580;
  font-size: 12px;
}
.article-body { color: var(--text); font-size: 15px; line-height: 1.7; }
.article-body p { margin-bottom: 12px; color: var(--text); }
.download-status {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  min-height: 1.2em;
}

.news-card { padding: 0; overflow: hidden; }
.news-card .news-body { padding: 14px 16px 16px; }
.news-cover {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: #0a0c10;
}
.news-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.72);
}
.news-cover-empty {
  background: linear-gradient(135deg, #14171d, #0a0c10);
}
.news-cover-title {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 28px 16px 14px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.75);
  background: linear-gradient(transparent, rgba(0,0,0,.75));
}
.article-hero {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: 260px;
  margin-bottom: 20px;
  background: #0a0c10;
}
.article-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.65);
}
.article-hero .article-hero-title {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 36px 22px 18px;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,.8);
  background: linear-gradient(transparent, rgba(0,0,0,.8));
}

.nav-login {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 8px;
  background: #1a1c22;
  color: #f2f2f2 !important;
  border: 1px solid rgba(255,255,255,.1);
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 600;
}
.nav-login:hover { background: #22252d; }

.profile-menu { position: relative; }
.profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: #12141a;
  color: #f2f2f2;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
}
.profile-btn:hover { background: #1a1c22; }
.profile-head {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  image-rendering: pixelated;
  background: #0a0c10;
}
.profile-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-caret {
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #9aa0aa;
  margin-left: 2px;
}
.profile-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  background: #0e1014;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 6px;
  z-index: 100;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
}
.profile-dropdown a,
.profile-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: #f2f2f2;
  font: inherit;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}
.profile-dropdown a:hover,
.profile-dropdown button:hover { background: #1a1c22; }
.profile-dropdown button { color: #e08a7a; }

.auth-page {
  max-width: 420px;
  margin: 48px auto 64px;
}
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.auth-tabs button {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.1);
  background: #0a0c10;
  color: #9aa0aa;
  font: inherit;
  cursor: pointer;
}
.auth-tabs button.active {
  background: #1a1c22;
  color: #f2f2f2;
  border-color: rgba(255,255,255,.18);
}
.auth-error { color: #e05a4a; font-size: 13px; min-height: 1.2em; margin-top: 10px; }
.auth-ok { color: #4caf50; font-size: 13px; margin-top: 10px; }
