@import "https://unpkg.com/normalize.css";

/* global styles */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #f7f7f7;
  overflow: auto;
  min-height: 100vh;
}

/* TODO: Dark mode */
@media (prefers-color-scheme: darkj) {
  body {
    background-color: #121212;
    color: #e0e0e0;
  }

  header {
    background-color: #1f1f1f;
  }

  main > div > a {
    border-color: #1f1f1f;
    color: #e0e0e0;
  }

  input[type="text"],
  input[type="number"],
  input[type="tel"],
  input[type="url"],
  input[type="password"],
  textarea {
    background-color: #1f1f1f;
    color: #e0e0e0;
    border-color: #333;
  }

  button,
  input[type="submit"],
  input[type="button"],
  input[type="reset"] {
    background-color: #333;
    color: #e0e0e0;
  }

  button:hover,
  button:focus-visible,
  input[type="submit"]:hover,
  input[type="submit"]:focus-visible,
  input[type="button"]:hover,
  input[type="button"]:focus-visible,
  input[type="reset"]:hover,
  input[type="reset"]:focus-visible {
    background-color: #444;
  }
}

h1,
h2 {
  margin: 0;
}
h1 > a {
  font-size: 1em !important;
  border: 0px !important;
  padding: 0px !important;
  margin: 0px !important;
  text-decoration: none !important;
  color: white !important;
}
main > div > a {
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
}

main > div > a:hover,
main > div > a:focus-visible {
  color: #007bff;
}
/* header styles */
header {
  background-color: #007bff;
  color: #fff !important;
  padding: 20px;
}
header * {
  margin: 0px;
}
/* main content styles */
main {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

#mySearchInput {
  background-image: url("https://www.w3schools.com/css/searchicon.png");
  background-position: 10px 10px;
  background-repeat: no-repeat;
  width: 100%;
  font-size: 16px;
  padding: 12px 20px 12px 40px;
  border: 1px solid #ddd;
  margin-bottom: 12px;
}

.links-container {
  display: flex;
  flex-wrap: wrap;
}

main > div > a {
  margin: 10px;
  padding: 10px;
  border: 2px solid #007bff;
  border-radius: 5px;
  font-size: 1.2rem;
  font-weight: bold;
}
p {
  font-size: 1.2rem;
  text-align: justify;
  text-justify: auto;
}
p > a {
  font-size: 1.2rem !important;
}

/* Form styles or wannabe (added Jan 6 2024) */
form,
div.form {
  margin: 10px auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
  background-color: #0078d7;
  color: #fff;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  margin: 4px 2px;
  cursor: pointer;
  font-size: 1em;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease-in-out,
    box-shadow 0.2s ease-in-out,
    opacity 0.1s ease;
}
button:hover,
button:focus-visible,
input[type="submit"]:hover,
input[type="submit"]:focus-visible,
input[type="button"]:hover,
input[type="button"]:focus-visible,
input[type="reset"]:hover,
input[type="reset"]:focus-visible {
  background-color: #0063ad;
  /*  background-color: rgba(0, 0, 0, 0.8);*/
  transform: scale(1.05);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}
button:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled,
input[type="reset"]:disabled {
  /* CSS styles for disabled button */
  opacity: 0.3;
  cursor: not-allowed;
}

input[type="text"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="password"],
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  margin-bottom: 16px;
  font-size: 1.1em;
  font-family: inherit; /* Bcuz in textareas it uses courier font.*/
  transition: border-color 0.5s;
}
input[type="text"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
textarea:focus {
  border-color: #0078d7;
  outline: none;
}

.avoid-clicks {
  pointer-events: none;
  user-select: none;
  -moz-user-select: none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  -o-user-select: none;
}

/* pixel image styles */
.pixel-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-top: 50px;
}

/* responsive styles */
@media (max-width: 768px) {
  a {
    font-size: 1rem;
  }
}

/* animation styles */

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.13);
  }
  100% {
    transform: scale(1.09);
  }
}

main > div > a:hover,
main > div > a:focus-visible {
  transform: scale(1.09);
  animation: pulse 0.5s ease-in-out;
}

/*background-shapes*/
@keyframes circle {
  from {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(10);
    opacity: 1;
  }
}

@keyframes rect {
  from {
    transform: translate(-50%, -50%) scale(0) rotate(0);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(10) rotate(360deg);
    opacity: 1;
  }
}

.background-shapes {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
  -moz-user-select: none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  -o-user-select: none;
}

.background-shapes__circle {
  position: absolute;
  top: 20%;
  left: 30%;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgba(255, 180, 0, 0.2);
  animation: circle 10s linear infinite alternate;
  pointer-events: none;
  user-select: none;
  -moz-user-select: none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  -o-user-select: none;
}

.background-shapes__rect {
  position: absolute;
  top: 60%;
  left: 80%;
  width: 50px;
  height: 50px;
  background-color: rgba(10, 200, 20, 0.1);
  animation: rect 20s linear infinite alternate;
  pointer-events: none;
  user-select: none;
  -moz-user-select: none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  -o-user-select: none;
}

.background-shapes__rect:nth-child(even) {
  animation-duration: 15s;
}

.background-shapes__rect:nth-child(3n) {
  top: 80%;
  left: 15%;
  /*  animation: rect 20s linear infinite alternate-reverse;*/
  animation-direction: alternate-reverse;
}
