body,html {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  /* Remove default solid colour to let the gradient layer shine through */
  background: transparent;
  height: 100%;
  min-height: 100vh;
  color: #fff;
}

/* Apply border-box sizing globally to ensure consistent width calculations */
*, *::before, *::after {
  box-sizing: border-box;
}
/*
 * Animated gradient backdrop
 * A fluid gradient flows between purple and orange hues to create a
 * dynamic backdrop without relying on external images. The background
 * size is scaled up and the gradient positions are animated to
 * transition smoothly across the view.
 */
.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Start with a deep purple, transition to bright orange, then back to purple */
  background: linear-gradient(45deg, #5a00a2, #ff8c00, #5a00a2);
  background-size: 300% 300%;
  animation: gradientAnimation 20s ease infinite;
  z-index: -1;
}

@keyframes gradientAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}
.logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 10px;
  border-radius: 50%;
  overflow: hidden;
}
h1 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 2.2em;
}
.tagline {
  margin: 0 0 20px;
  font-size: 0.9em;
  line-height: 1.4;
}
.links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

/* Standardise width of all direct children in the links list.  This ensures
   details (dropdowns) and simple anchor links have identical widths and
   horizontal centering. */
.links > * {
  width: 85%;
  margin-left: auto;
  margin-right: auto;
}
/*
 * Links and summary headers share styling for consistent sizing.  A light
 * grey background reminiscent of modern mobile interfaces is used.  The
 * buttons stretch to fill the available width and are centered via flex.
 */
/*
 * Base style for top-level links.
 */
.link-item {
  background-color: rgba(240, 240, 240, 0.85);
  backdrop-filter: blur(5px);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  /* width and centering are now handled by the parent .links rule */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Hover state for top-level links */
.link-item:hover {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
/* Hover and open state for top-level links; summary states handled by .dropdown */
.link-item:hover {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.link-item .icon {
  width: 24px;
  height: 24px;
  margin-right: 10px;
}
details {
  width: 100%;
  margin: 0;
  padding: 0;
}
details summary {
  list-style: none;
  outline: none;
}
details summary::-webkit-details-marker {
  display: none;
}
details .submenu {
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 0 0 10px 10px;
  /* reduce horizontal padding so sub-links can span full width */
  padding: 12px 0;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #000;
}
details .submenu p {
  margin: 0 0 10px;
  font-size: 0.9em;
}
details .sub-link {
  background-color: rgba(245, 245, 245, 0.85);
  /* remove individual rounding; container handles radius */
  border-radius: 0;
  /* match summary padding for consistent width */
  padding: 12px;
  /* enforce a minimum row height so links with and without icons align */
  min-height: 42px;
  color: #000;
  text-decoration: none;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  /* center contents and allow an icon */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}
details .sub-link:hover {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Dropdown styling for expandable sections (support and bug report) */
.dropdown {
  /* width and centering are handled by the parent .links rule */
  background-color: rgba(240, 240, 240, 0.85);
  backdrop-filter: blur(5px);
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  /* ensure padding doesn't increase width */
  box-sizing: border-box;
}
.dropdown > summary {
  /* use same vertical padding as link items for consistent height */
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #000;
  list-style: none;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}
.dropdown > summary:hover,
.dropdown[open] > summary {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.dropdown .submenu {
  background-color: rgba(255, 255, 255, 0.7);
  /* remove horizontal padding so submenu aligns flush with summary */
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #000;
  border-radius: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Small icon for inline usage in sub-links */
.icon-small {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  vertical-align: middle;
}

/* Hidden icon placeholder used to equalize sub-link heights */
.hidden-icon {
  visibility: hidden;
}
footer {
  margin-top: 20px;
  font-size: 0.8em;
}
footer a {
  color: #ffffff;
  text-decoration: none;
  margin: 0 5px;
}
footer a:hover {
  text-decoration: underline;
}
@media (max-width: 480px) {
  .logo {
    width: 80px;
    height: 80px;
  }
  h1 {
    font-size: 1.8em;
  }
  .tagline {
    font-size: 0.8em;
  }
  .link-item,
  .dropdown > summary {
    padding: 12px;
    font-size: 0.9em;
  }
  .dropdown .submenu {
    font-size: 0.8em;
  }
  /* Use full width on very small screens */
  .link-item,
  .dropdown {
    width: 100%;
  }

  /* Ensure all children of .links span full width on small screens */
  .links > * {
    width: 100%;
  }
}
@media (min-width: 481px) and (max-width: 768px) {
  .container {
    max-width: 90%;
    padding: 20px;
  }
}
