html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Orbitron', 'Segoe UI', 'Arial', sans-serif;
  color: #fff;
  min-height: 100%;
  background: #0a0114;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  /* iOS notch / safe area support */
  padding-top: env(safe-area-inset-top, 0);
  padding-top: constant(safe-area-inset-top);
  /* leave room at bottom for mobile UI / home indicator */
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);
}

/* DEBUG outline removed — CSS debug was completed. */

.star-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  display: block;
}

body::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
  background: transparent;
}

/* Star field effect */
body::after {
  display: none;
}

main {
  position: relative;
  max-width: 700px;
  width: 100%;
  padding: 2rem;
  margin: 0;
  margin-bottom: 2rem; /* ensure spacing from viewport bottom */
  text-align: center;
  /* No border-radius, no z-index, no background, no box-shadow for seamless background */
  box-shadow: none;
  border: none;
}

/* Make typography and controls responsive */
h2 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
}

.btn {
  min-width: 120px;
  padding: 0.7em 1.6em;
}

.logo {
  display: block;
  margin: 0 auto 1.5rem auto;
  max-width: 300px;
  width: 80%;
  height: auto;
  border-radius: 12px;
}

/* Improve body text readability */
p, section p, .content p {
  color: #e6e2f8;
  font-size: 1.02rem;
  line-height: 1.7;
  max-width: 65ch;
  margin: 0.6rem auto;
  text-align: center;
  -webkit-font-smoothing: antialiased;
  text-shadow: 0 1px 0 rgba(0,0,0,0.25);
  letter-spacing: 0.01em;
}

/* On larger screens use a left-aligned measure for easier reading */
@media (min-width: 700px) {
  p, section p, .content p {
    text-align: left;
  }
}

nav a {
  color: #0ff;
  margin: 0 1rem;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s;
}

nav a:hover {
  color: #ff1744;
}

section {
  margin-bottom: 2.5rem;
}

h2 {
  color: #ff1744;
  margin-bottom: 0.5rem;
  font-family: 'Orbitron', 'Segoe UI', 'Arial', sans-serif;
  /* font-size is controlled by the earlier responsive rule using clamp() */
  letter-spacing: 0.08em;
  text-shadow:
    0 0 8px #fff,
    0 0 16px #ff1744,
    0 0 32px #ff1744,
    0 0 48px #fff;
}

.links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  justify-content: center;
  align-items: center;
}

.btn {
  background: linear-gradient(90deg, #ff1744 0%, #2d0a4a 100%);
  color: #fff;
  padding: 0.7em 2em;
  border: none;
  border-radius: 30px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 0 10px #fff, 0 0 20px #ff1744;
  transition: background 0.2s, color 0.2s;
  text-shadow: 0 0 8px #fff, 0 0 16px #ff1744;
}

.btn:hover {
  background: linear-gradient(90deg, #ff1744 0%, #0a0033 100%);
  color: #fff;
}

ul {
  padding-left: 0;
  list-style-position: inside;
  text-align: center;
}

@media (max-width: 600px) {
  /* Allow page to start near top and scroll naturally on mobile */
  body {
    align-items: flex-start;
    padding-top: 1.5rem;
  }
  main {
    padding: 1rem;
    margin-top: 0.5rem;
  }
  .links {
    flex-direction: column;
    gap: 1rem;
  }
  .links .btn {
    width: min(92vw, 360px);
    padding: 0.9em 1rem;
    margin: 0 auto; /* center when stacked */
    display: block; /* ensure margins and centering work */
    align-self: center;
  }
  .logo {
    max-width: 80vw;
  }
  h2 {
    margin-top: 0.4rem;
  }
}

/* Tighter mobile breakpoint and safe-area adjustments */
@media (max-width: 480px) {
  body {
    align-items: flex-start;
    /* ensure content doesn't sit behind a notch */
    padding-top: calc(env(safe-area-inset-top, 0px) + 0.75rem);
  }
  main {
    padding: 0.75rem;
    margin-top: 0.25rem;
  }
  .links {
    gap: 0.9rem;
  }
  .links .btn {
    width: min(94vw, 360px);
    padding: 0.85em 0.9rem;
    font-size: 1rem;
  }
  h2 {
    font-size: 1.4rem;
    letter-spacing: 0.06em;
    margin-bottom: 0.4rem;
  }
}