/* Global site styles */

:root {
  --main-purple: rgba(131, 32, 189, 1);
  --main-yellow: rgba(255, 236, 64, 1);
  --main-gray: #262626;
  --main-lightgray: rgba(200, 200, 200, 1);
  --main-bg-gradient: linear-gradient(45deg,var(--main-purple) 0%, var(--main-yellow) 100%);
  --main-bg-gradient-outline: linear-gradient(white, white) padding-box, var(--main-bg-gradient) border-box;
}

body {
  font-family: Arial, sans-serif;
  background: var(--main-purple);
  background: var(--main-bg-gradient);
  background-attachment: fixed;
  background-size: 160% 160%;
  animation: gradientShift 12s ease infinite;
  color: black;
  padding: 2rem;
}

/* Background gradient animation */
@keyframes gradientShift {
  0% {background-position: 0% 50%;}
  50% {background-position: 100% 50%;}
  100% {background-position: 0% 50%;}
}

/* Base navbar styles */
nav, .content {
  background-color: white;
  border-radius: 10px;
  padding: 1.5rem 2rem;
  max-width: 700px;
  margin: 0 auto 20px auto;
}

/* Navbar */
nav {
  padding: 0.2rem 2rem 1rem 2rem;
  text-align: center;
}
.nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-title {
  display: none;
  font-weight: bold;
  color: var(--main-gray);
  font-size: 1rem;
  margin-left: 1.5rem;;
}
.nav-toggle {
  display: none;
  background: none;
  margin-right: 1.5rem;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--main-gray);
  transition: transform 0.2s ease;
}
.nav-toggle:hover {
  color: var(--main-purple);
  transform: scale(1.2);
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}
nav a {
  text-decoration: none;
  color: var(--main-gray);
  cursor: pointer;
  font-size: 14px;
  transition: 0.05s linear;
}
nav a:hover {
  color: var(--main-purple);
  font-size: 14.5px;
  text-decoration: underline;
}

/* Site Logo */
#mrwang-logo {
  position: fixed;
  bottom: 10px;
  left: 0;
  height: 120px;
  transition: 0.2s ease-in-out;
}
#mrwang-logo:hover {
  transform: scale(1.1);
}

/* Footer */
footer {
  color: white;
  font-size: 12px;
  text-align: center;
  font-style: italic;
  padding: 2rem;
  cursor: default;
}

/* Headings */
h1, h2, h3 {
  font-family: "Major Mono Display", monospace;
  font-weight: 400;
  font-style: normal;
  text-align: center;
  margin: 1rem auto 2rem auto;
  background: var(--main-bg-gradient-outline);
  border-radius: 10px;
  padding: 10px;
  cursor: default;
}
h1 {
  font-size: 40px;
  border: 3px solid transparent;
  max-width: 500px;
}
h2, h3 {
  margin-top: 30px;
  border-bottom: 2px solid transparent;
  max-width: 400px;
}
h4 {
  text-align: center;
}

/* Button grid */
.content-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);  /* 2 columns */
  gap: 2rem;
}
.content-grid a, .content-grid div {
  flex: 1;
  transition: 0.1 ease-in-out;
}
.content-grid a:hover, .content-grid div:hover {
  transform: scale(1.05);
}

/* Grid buttons  */
.grid-button {
  position: relative;
  background-color: var(--main-gray);
  height: 6rem;
  border: 2px solid white;
  color: white;
  font-size: 1rem;
  font-weight: bold;
  text-align: left;
  padding: 0.75rem;
  border-radius: 0.5rem;
  overflow: hidden;
  text-decoration: underline;
  text-underline-offset: 0.3rem;
  line-height: 2rem;
  transition: all 0.5s ease;
  cursor: pointer;
}
/* --- Pseudo elements --- */
.grid-button::before,
.grid-button::after {
  content: '';
  position: absolute;
  border-radius: 9999px;
  filter: blur(20px);
  transition: all 0.5s ease;
  z-index: 10;
}
/* Purple circle */
.grid-button::before {
  width: 4rem;
  height: 4rem;
  right: 0.25rem;
  top: 4.5rem;
  background-color: var(--main-purple);
}
/* Yellow circle */
.grid-button::after {
  width: 6rem;
  height: 6rem; 
  right: 2rem;
  top: 5rem;
  background-color: var(--main-yellow);
}
/* --- Hover effects --- */
.grid-button:hover {
  border-color: var(--main-yellow);
  color: var(--main-yellow);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.7rem;
}
/* Move and blur pseudo elements */
.grid-button:hover::before {
  right: 3rem;
  top: 5rem;
  filter: blur(30px);
  box-shadow: 10px 10px 10px 20px var(--main-purple);
}
.grid-button:hover::after {
  right: -2rem;
}


/* --- Modal Overlay --- */
.app-modal {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.2);
  backdrop-filter: blur(5px);
  z-index: 100;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.app-modal.show {
  pointer-events: auto;
  opacity: 1;
}

/* --- Modal content --- */
.app-modal-content {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  width: 50%;
  max-width: 500px;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(30px);
  opacity: 0;
  transition: all 0.4s ease;
}
.app-modal.show .app-modal-content {
  transform: translateY(0);
  opacity: 1;
}
.app-modal-content img {
  width: 60%;
  margin: 0 20%;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.app-modal-content h2 {
  margin-bottom: 0.5rem;
}
.app-modal-content p {
  font-size: 1rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
/* Close modal button */
.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  transition: 0.2s ease-in-out;
}
.close-modal:hover {
  transform: scale(1.2);
}

/* Launch button */
.launch-btn {
  background: var(--main-purple);
  border: 1px solid black;
  padding: 10px 30px;
  color: white;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  transition: 0.1s linear;
}

.launch-btn:hover {
  background: var(--main-yellow);
  color: black;
  transform: scale(1.01);
}

/* Back to previous page button */
.back-button {
  display: inline-block;
  padding: 0.5rem 0.5rem;
  text-decoration: none;
  font-size: 0.8rem;
  color: var(--main-gray);
  transition: 0.1s ease-in-out;
}

.back-button:hover {
  transform: scale(1.05);
}

/* Secondary content grid */
.content-grid-small {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  list-style-type: none;
  padding-left: 0;
  gap: 0.5rem 1rem;
}

.grid-button-small {
  box-sizing: border-box;
  background-color: var(--main-lightgray);
  border-radius: 10px;
  padding: 0.5rem 1rem;
  width: 100%;
  margin: 0.2rem 0;
  text-decoration: underline;
  text-underline-offset: 0.5rem;
  line-height: 2rem;
  color: black;
  font-size: 0.8rem;
  font-weight: bold;
  transition: 0.1s ease-in-out;
}
.grid-button-small:hover {
  cursor: pointer;
  transform: scale(1.02);
  text-underline-offset: 0.7rem;
}
