:root {
  --bg: #070b12;
  --surface: #0d1420;
  --surface-2: #121c2a;
  --line: rgba(148, 163, 184, 0.22);
  --text: #eef5ff;
  --muted: #9fb0c6;
  --blue: #1f8bff;
  --cyan: #44d7ff;
  --green: #4ade80;
  --danger: #ef4444;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: var(--cyan);
}

.site-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(7, 11, 18, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.navbar-brand {
  font-weight: 800;
}

.brand-mark,
.panel-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, var(--blue), #0b3d91);
  box-shadow: 0 0 28px rgba(31, 139, 255, 0.42);
}

.page-shell {
  min-height: calc(100vh - 142px);
}

.hero-section {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 11, 18, 0.95) 0%, rgba(7, 11, 18, 0.72) 42%, rgba(7, 11, 18, 0.2) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(7, 11, 18, 0) 32%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 64px;
  padding-bottom: 100px;
}

.hero-copy {
  max-width: 780px;
}

.eyebrow {
  color: var(--cyan);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0;
}

.hero-copy h1,
.page-header h1,
.not-found h1 {
  margin: 0.75rem 0 1rem;
  font-weight: 900;
  line-height: 1;
}

.hero-copy h1 {
  font-size: clamp(3rem, 8vw, 6.6rem);
}

.hero-copy p,
.page-header p,
.not-found p {
  max-width: 700px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.version-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0;
  color: var(--muted);
}

.version-strip strong {
  color: var(--text);
  border: 1px solid rgba(68, 215, 255, 0.45);
  background: rgba(31, 139, 255, 0.12);
  border-radius: 8px;
  padding: 8px 12px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  border-radius: 8px;
  font-weight: 700;
}

.btn-primary {
  --bs-btn-bg: var(--blue);
  --bs-btn-border-color: var(--blue);
  --bs-btn-hover-bg: #4aa3ff;
  --bs-btn-hover-border-color: #4aa3ff;
}

.btn-outline-info {
  --bs-btn-color: var(--cyan);
  --bs-btn-border-color: rgba(68, 215, 255, 0.7);
  --bs-btn-hover-bg: rgba(68, 215, 255, 0.16);
  --bs-btn-hover-border-color: var(--cyan);
}

.content-band {
  padding: 70px 0;
  background: linear-gradient(180deg, var(--bg), #0a111d);
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 8px 0 0;
  font-size: 2rem;
  font-weight: 850;
}

.release-grid,
.install-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.release-card,
.install-panel,
.auth-panel,
.admin-form,
.empty-state,
.versions-table-wrap {
  border: 1px solid var(--line);
  background: rgba(13, 20, 32, 0.84);
  border-radius: 8px;
}

.release-card {
  padding: 22px;
}

.release-card h3 {
  margin: 0;
  font-weight: 850;
}

.release-card p,
.release-meta {
  color: var(--muted);
}

.release-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.latest-badge {
  color: #05121f;
  background: var(--green);
}

.empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 32px;
}

.empty-state i {
  color: var(--cyan);
  font-size: 2rem;
}

.page-header {
  padding: 92px 0 56px;
  background:
    linear-gradient(180deg, rgba(31, 139, 255, 0.12), rgba(7, 11, 18, 0)),
    var(--surface);
  border-bottom: 1px solid var(--line);
}

.compact-header {
  padding: 54px 0 38px;
}

.page-header h1 {
  font-size: clamp(2.3rem, 5vw, 4.5rem);
}

.versions-table-wrap {
  overflow: auto;
}

.versions-table {
  min-width: 980px;
  margin: 0;
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--line);
}

.versions-table th {
  color: var(--cyan);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.changelog-cell {
  max-width: 360px;
  min-width: 260px;
  vertical-align: top;
}

.changelog-preview {
  display: grid;
  gap: 10px;
  align-content: start;
}

.changelog-preview p {
  display: -webkit-box;
  max-height: 4.8rem;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.changelog-preview .btn {
  justify-self: start;
}

.changelog-modal .modal-content {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.changelog-modal .modal-header,
.upload-progress-modal .modal-header {
  border-bottom-color: var(--line);
}

.upload-progress-modal .modal-content {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.changelog-full {
  max-height: 65vh;
  overflow: auto;
  color: var(--text);
  line-height: 1.7;
  white-space: pre-wrap;
}

.install-panel {
  padding: 30px;
}

.install-panel h2 {
  margin: 18px 0;
  font-weight: 850;
}

.install-panel li {
  margin-bottom: 10px;
  color: var(--muted);
}

.auth-section {
  min-height: calc(100vh - 142px);
  display: grid;
  place-items: center;
  padding: 48px 16px;
  background:
    linear-gradient(180deg, rgba(31, 139, 255, 0.16), transparent),
    var(--bg);
}

.auth-panel,
.admin-form {
  width: min(100%, 520px);
  padding: 30px;
}

.auth-panel h1 {
  margin: 18px 0 24px;
  font-weight: 850;
}

.stack-form {
  display: grid;
  gap: 16px;
}

.narrow-container {
  max-width: 980px;
}

.admin-form {
  width: 100%;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-control,
.form-check-input {
  color: var(--text);
  background-color: #0a111d;
  border-color: var(--line);
}

.form-control:focus {
  color: var(--text);
  background-color: #0a111d;
  border-color: var(--blue);
  box-shadow: 0 0 0 0.2rem rgba(31, 139, 255, 0.18);
}

.form-label {
  color: var(--muted);
  font-weight: 700;
}

.current-file {
  color: var(--cyan);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.upload-progress {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 17, 29, 0.72);
}

.upload-progress-label,
.upload-progress-percent {
  font-weight: 800;
}

.upload-progress-percent {
  color: var(--cyan);
}

.upload-progress .progress {
  height: 12px;
  background-color: rgba(148, 163, 184, 0.18);
}

.upload-progress .progress-bar {
  background-color: var(--blue);
  transition: width 0.18s ease;
}

.role-select {
  width: min(100%, 220px);
  color: var(--text);
  background-color: #0a111d;
  border-color: var(--line);
}

.not-found {
  min-height: calc(100vh - 142px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 60px 0;
}

.not-found-code {
  color: var(--cyan);
  font-size: clamp(5rem, 16vw, 12rem);
  font-weight: 950;
  line-height: 0.9;
  text-shadow: 0 0 40px rgba(68, 215, 255, 0.35);
}

.site-footer {
  padding: 28px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #05080d;
}

.site-footer .container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
}

@media (max-width: 991.98px) {
  .hero-section {
    min-height: 760px;
    align-items: flex-end;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(7, 11, 18, 0.3), rgba(7, 11, 18, 0.96) 70%),
      linear-gradient(0deg, var(--bg), rgba(7, 11, 18, 0) 28%);
  }

  .hero-content {
    padding-bottom: 80px;
  }

  .release-grid,
  .install-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .hero-section {
    min-height: 720px;
  }

  .hero-copy p,
  .page-header p,
  .not-found p {
    font-size: 1rem;
  }

  .content-band {
    padding: 46px 0;
  }

  .install-panel,
  .auth-panel,
  .admin-form {
    padding: 22px;
  }
}
