:root {
  --bg: #0f172a;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #f87171;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1e293b 0, #020617 55%, #000 100%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

.page {
  width: 100%;
  max-width: 1080px;
  padding: 2rem 1.25rem 3rem;
}

.page-wide {
  max-width: 1220px;
}

header {
  padding: 1.75rem 1.5rem 1.5rem;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(129, 140, 248, 0.1));
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow:
    0 25px 50px -25px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.9) inset;
  backdrop-filter: blur(16px);
  margin-bottom: 2rem;
}

header h1 {
  font-size: clamp(2rem, 3vw, 2.3rem);
  margin-bottom: 0.25rem;
}

header p {
  max-width: 60rem;
  font-size: 0.98rem;
  color: #e5e7eb;
}

.tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.1rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
}

.tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
}

.header-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.header-links a,
.back-link {
  color: var(--accent);
  text-decoration: none;
}

.header-links a:hover,
.back-link:hover {
  text-decoration: underline;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.3rem;
}

.card {
  border-radius: 1.25rem;
  padding: 1.3rem 1.4rem 1.4rem;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.14), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(31, 41, 55, 0.9);
  box-shadow: 0 18px 35px -22px rgba(15, 23, 42, 0.9);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(248, 250, 252, 0.08), transparent 55%);
  opacity: 0.6;
  pointer-events: none;
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  position: relative;
  color: #ffffff;
}

.card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  position: relative;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  position: relative;
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.software-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.3rem;
  align-items: stretch;
}

.software-card {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  height: 100%;
}

.sw-top {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
  flex: 1 1 auto;
}

.sw-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sw-meta-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.sw-size {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
}

.visibility-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.14rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.visibility-public {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
}

.visibility-private {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fde68a;
}

.software-card h2 {
  font-size: 1.3rem;
  color: #fff;
  position: relative;
}

.sw-version {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--accent);
  margin-left: 0.25rem;
}

.sw-desc {
  font-size: 0.93rem;
  color: var(--text-muted);
  position: relative;
  line-height: 1.55;
}

.sw-footer,
.admin-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 1rem;
  row-gap: 0.85rem;
  position: relative;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  margin-top: auto;
}

.sw-requires {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
}

.action-row form {
  margin: 0;
}

.btn-download {
  display: inline-block;
  padding: 0.5rem 1.4rem;
  border-radius: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: var(--green);
  color: #fff;
  border: none;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}

button.btn-download {
  font-family: inherit;
}

.btn-download:hover {
  background: #16a34a;
  transform: translateY(-1px);
}

.btn-download:active {
  transform: translateY(0);
}

.btn-soon {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  cursor: default;
}

.btn-soon:hover {
  background: rgba(148, 163, 184, 0.15);
  transform: none;
}

.btn-neutral {
  background: rgba(56, 189, 248, 0.16);
  color: #e0f2fe;
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.btn-neutral:hover {
  background: rgba(56, 189, 248, 0.24);
}

.btn-public {
  background: var(--green);
}

.btn-private {
  background: var(--amber);
  color: #111827;
}

.btn-private:hover {
  background: #d97706;
}

.status-note {
  margin: -0.8rem 0 1.4rem;
  padding: 0.85rem 1rem;
  border-radius: 0.95rem;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #bbf7d0;
}

.stats-stack {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.card-wide {
  min-width: 0;
}

.table-scroll {
  position: relative;
  overflow-x: auto;
  margin-top: 0.3rem;
}

.stats-table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  position: relative;
  margin-top: 0.25rem;
}

.stats-table-recent {
  min-width: 780px;
}

.stats-table th,
.stats-table td {
  vertical-align: top;
}

.stats-table th {
  text-align: left;
  padding: 0.4rem 0.6rem;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  font-weight: 500;
}

.stats-table td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  color: var(--text);
  word-break: normal;
  overflow-wrap: anywhere;
}

.stats-table tr:last-child td {
  border-bottom: none;
}

.stats-table .time-cell,
.stats-table .ip-cell,
.stats-table .count-cell {
  white-space: nowrap;
}

.stats-table .time-cell {
  width: 170px;
}

.stats-table .file-cell {
  min-width: 280px;
}

.stats-table .ip-cell {
  width: 150px;
}

.muted {
  color: var(--text-muted);
  font-size: 0.9rem;
  position: relative;
}

footer {
  margin-top: 2.2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  opacity: 0.85;
}

@media (max-width: 720px) {
  .page,
  .page-wide {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  header {
    padding: 1.4rem 1.1rem 1.2rem;
  }

  .sw-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .sw-meta-row {
    justify-content: flex-start;
  }

  .sw-footer,
  .admin-footer {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .action-row {
    width: 100%;
    justify-content: flex-start;
    justify-self: start;
  }

  .sw-footer > .btn-download,
  .sw-footer > .btn-soon,
  .admin-footer .action-row {
    justify-self: start;
  }

  .software-list {
    grid-template-columns: 1fr;
  }
}


.header-form {
  margin: 0;
}

.link-button {
  border: none;
  background: transparent;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.link-button:hover {
  text-decoration: underline;
}

.status-note-error {
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.3);
  color: #fecaca;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.summary-card {
  min-height: 148px;
}

.summary-label {
  position: relative;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-value {
  position: relative;
  margin-top: 0.7rem;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  line-height: 1.1;
  color: #fff;
}

.summary-value-small {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.35;
}

.summary-subtext {
  position: relative;
  margin-top: 0.7rem;
  color: var(--text-muted);
  font-size: 0.87rem;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
}

.section-heading-split {
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.section-copy {
  max-width: 64rem;
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.toggle-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.56);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
}

.toggle-chip.active {
  color: #e0f2fe;
  border-color: rgba(56, 189, 248, 0.38);
  background: rgba(56, 189, 248, 0.18);
}

.toggle-chip:hover {
  border-color: rgba(56, 189, 248, 0.38);
  color: #e0f2fe;
}

.small-note {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.cell-title {
  color: #fff;
}

.cell-subtitle {
  margin-top: 0.2rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.mono {
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

.traffic-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.16rem 0.7rem;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.traffic-external {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
}

.traffic-local {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.35);
  color: #bae6fd;
}

.traffic-test {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fde68a;
}

.auth-wrap {
  display: flex;
  justify-content: center;
}

.auth-card {
  width: min(100%, 560px);
}

.auth-card h2 {
  position: relative;
  margin-bottom: 0.35rem;
  color: #fff;
}

.auth-copy {
  margin-bottom: 1rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  color: var(--text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-input {
  width: 100%;
  border-radius: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text);
  padding: 0.8rem 0.9rem;
  font: inherit;
}

.form-input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.form-help {
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .section-heading-split {
    flex-direction: column;
  }
}




.sw-release-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.92;
}
