@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&display=swap');

* {
  font-family: monospace;
  font-style: normal;
}

/* colors */
:root {
  --red-dot: #ff00000c;
  --green-dot: #00FF00;
  --blue-dot: #0000FF;
  --yellow-dot: #FFFF00;
  --cyan-dot: #00FFFF;
  --purple-dot: #a600ff;
  --grey-dot: #808080;
  --orange-dot: #FFA500;
}


/* Floating dots container */
.floating-dots-container {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* Individual floating dot */
.floating-dot {
  position: absolute;
  border-radius: 9999px;
  opacity: 0.2;
  animation: bounce ease-in-out infinite;
  z-index: -100;
}

/* Bounce animation */
@keyframes bounce {
  0%, 100% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}


body {
  background: linear-gradient(-45deg, rgba(255, 0, 0, 0.177), rgba(128, 0, 128, 0.177), rgba(0, 0, 255, 0.177), rgba(0, 255, 255, 0.177), rgba(0, 255, 0, 0.177), rgba(255, 255, 0, 0.177), rgba(255, 166, 0, 0.177), rgba(255, 166, 0, 0.177));
  background-size: 400% 400%;
  animation: gradient 30s ease infinite;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

main {
  margin-left: 300px;
  margin-right: calc(300px - 212px);
}

h1 {
    text-align: center;
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(to right, #ec4899, #a855f7, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
    font-family: monospace;
      text-transform: uppercase;

}


form {
    background-color: #ffffff;
    box-shadow: 8px 8px 0px 0px rgba(255, 107, 157, 0.3);
    border: 4px solid #f472b6;
    padding: 2rem;
    position: relative;
    max-width: 500px;
    margin: 2rem auto;
}

/* Corner pixels */
.corner-pixel {
    position: absolute;
    width: 1rem;
    height: 1rem;
    background-color: #f472b6;
    image-rendering: pixelated;
} /* Form header */

.top {
    top: 0.5rem;
}
.left {
    left: 0.5rem;
}
.right {
    right: 0.5rem;
}
.bottom {
    bottom: 0.5rem;
} 

h2 {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(to right, #ec4899, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
    margin-top: 0;
    text-transform: uppercase;
} /* Subtitle */
p {
    color: #9333ea;
    margin-bottom: 1.5rem;
    font-weight: 900;
} /* Input labels */
label {
    display: block;
    font-size: 0.875rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    color: #db2777;
        text-transform: uppercase;

} /* Input fields */
input::placeholder {
    color: #aeabb0;
    opacity: 1;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: calc(100% - 2rem - 8px);
    padding: 0.75rem 1rem;
    border: 4px solid #d8b4fe;
    background-color: #ffffff;
    color: #1f2937;
    box-shadow: 4px 4px 0px 0px rgba(167, 139, 250, 0.3);
    font-weight: 900;
    font-family: monospace;
    outline: none;
    margin-bottom: 20px;
      transition: all 0.2s;

}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    box-shadow: 6px 6px 0px 0px rgba(255, 107, 157, 0.5);
    border-color: #f472b6;
    transform: translate(-2px, -2px);
} /* Checkbox */
input[type="checkbox"] {
    width: 1.5rem;
    height: 1.5rem;
    border: 4px solid #f472b6;
    accent-color: #ec4899;
    image-rendering: pixelated;
}
input[type="checkbox"] + label {
    font-size: 0.875rem;
    font-weight: 900;
    color: #7e22ce;
    font-family: monospace;
} /* Login button */
button[type="submit"] {
    cursor: pointer;
    width: 100%;
    background: linear-gradient(to right, #f472b6, #c084fc);
    color: #ffffff;
    font-weight: 900;
    padding: 1rem;
    border: 4px solid #ec4899;
    box-shadow: 6px 6px 0px 0px rgba(255, 107, 157, 0.3);
    font-size: 1.25rem;
    font-family: monospace;
    transition: all 0.2s;
}
button[type="submit"]:hover {
    box-shadow: 8px 8px 0px 0px rgba(255, 107, 157, 0.5);
    transform: translate(-2px, -2px);
}
button[type="submit"]:active {
    box-shadow: 2px 2px 0px 0px rgba(255, 107, 157, 0.3);
    transform: translate(4px, 4px);
} /* Register link */
a {
    color: #db2777;
    font-weight: 900;
    text-decoration: underline;
    font-family: monospace;
}
a:hover {
    color: #9333ea;
}


#kids-list {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: center;
}

.child-entry {
  padding: 1rem;
  border: 4px solid #d8b4fe; /* purple-300 */
  background-color: #ffffff;
  color: #9333ea; /* purple-600 */
  font-weight: 900;
  font-family: monospace;
  box-shadow: 4px 4px 0px 0px rgba(167, 139, 250, 0.3);
  width: 130px;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.child-entry p {
  margin: 0;
}

.child-name {
  font-size: 1.5rem;
  margin: 0;
  margin-bottom: 0.5em !important;
  text-align: center;
  line-height: 1.1;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
  white-space: normal;
}

.delete-button {
  margin-top: 0.5rem;
  background-color: #ef4444;
  color: #ffffff;
  border: none;
  padding: 0.5rem;
  width: 100%;
  font-weight: 900;
  font-family: monospace;
  cursor: pointer;
  transition: all 0.2s;
}

@media (max-width: 767px) {
  #loginForm, #registerForm {
    margin: 1rem;
    max-width: calc(100% - 2rem);
  }

  .manage-kids-page .sidebar-container {
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
  }

  .manage-kids-page .sidebar {
    display: flex !important;
    width: min(16rem, 82vw);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    pointer-events: auto;
  }

  body.sidebar-open .manage-kids-page .sidebar {
    transform: translateX(0);
  }

  .manage-kids-page .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(17, 24, 39, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    pointer-events: auto;
  }

  body.sidebar-open .manage-kids-page .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
  }

  .manage-kids-page .sidebar-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 120;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    border: 4px solid #ec4899;
    background: #ffffff;
    color: #374151;
    font-family: monospace;
    font-weight: 900;
    box-shadow: 4px 4px 0 rgba(255, 107, 157, 0.3);
    cursor: pointer;
  }

  .manage-kids-page main {
    margin-left: 0;
    padding: 4.5rem 1rem 1rem;
    box-sizing: border-box;
  }

  .manage-kids-page h1 {
    font-size: 2rem;
    margin-top: 0.5rem;
  }

  .manage-kids-page form {
    max-width: 100%;
    margin: 1rem auto;
    padding: 1rem;
  }

  .manage-kids-page #kids-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .manage-kids-page .child-entry {
    width: 100%;
  }

  .manage-kids-page .child-name {
    font-size: 1.2rem;
  }
}

@media (min-width: 768px) and (max-width: 1100px) {
  .manage-kids-page main {
    margin-left: 16rem;
    padding: 1.25rem;
  }

  .manage-kids-page #kids-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .manage-kids-page .child-entry {
    width: 100%;
  }
}

.login-message {
    min-height: 1.25rem;
    margin: 0.5rem 0 0;
    color: #b91c1c;
    font-weight: 700;
}

