/* Basic reset & layout */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0f172a;
  color: #e5e7eb;
}

a {
  color: #60a5fa;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header & nav */
.site-header {
  background: #020617;
  border-bottom: 1px solid #1f2933;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav a {
  margin-left: 1rem;
  font-size: 0.95rem;
}

.nav a.active {
  font-weight: 600;
}

/* Hero */
.hero {
  padding: 3rem 0 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

.hero p {
  color: #9ca3af;
  margin-bottom: 1.5rem;
}

/* Cards & grid */
.feature-grid,
.app-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.card {
  background: #020617;
  border-radius: 0.5rem;
  padding: 1rem;
  border: 1px solid #1f2937;
}

.app-card .meta {
  font-size: 0.85rem;
  color: #9ca3af;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: 1px solid #4b5563;
  background: transparent;
  color: #e5e7eb;
  font-size: 0.95rem;
  cursor: pointer;
}

.btn.primary {
  background: #2563eb;
  border-color: #2563eb;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn:hover:not(:disabled) {
  filter: brightness(1.05);
}

/* App detail */
.app-detail {
  margin: 2rem 0;
}

.app-detail .meta {
  color: #9ca3af;
  font-size: 0.9rem;
}

.changelog {
  list-style: disc;
  padding-left: 1.5rem;
}

/* Legal pages */
.legal {
  margin: 2rem 0;
}

.legal h1 {
  margin-bottom: 0.5rem;
}

.legal h2 {
  margin-top: 1.5rem;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid #1f2937;
  text-align: center;
  font-size: 0.85rem;
  color: #9ca3af;
}

/* Modal */
.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
}

.modal-dialog {
  position: relative;
  max-width: 480px;
  margin: 10vh auto;
  background: #020617;
  border-radius: 0.5rem;
  padding: 1.5rem;
  border: 1px solid #1f2937;
}

.modal-dialog h2 {
  margin-top: 0;
}

.checkbox-row {
  display: flex;
  align-items: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.checkbox-row input {
  margin-right: 0.5rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .hero {
    text-align: left;
  }
}
