:root {
  --iconsize: clamp(0.82rem, 2.5vw, 1.1rem);
  --text-md: clamp(1rem, 2.5vw, 1.3rem);
  --text-lg: clamp(1.4rem, 8vw, 2rem);
  --text-xlg: clamp(2rem, 16vw, 4rem);
  --darkblue: #008;
  --elevation: 0 4px 10px rgba(0, 0, 0, 0.1), 0 8px 20px rgba(0, 0, 0, 0.05);
}

body,
a,
button,
input,
label,
select,
textarea {
  cursor:
    url("pink.png") 10 10,
    auto;
}

html {
  max-width: 100%;
  font-size: 18px;
  background-color: #8fecfa;
  /* background-image: url('microsoft.jpg'); */
  /*  background-size: cover;       */ /* Cover full screen */
  /*  background-position: center;   */ /* Center the image */
  /*  background-repeat: no-repeat;  */ /* No tiling */
  /*  background-attachment: fixed;   */ /* Optional: keeps it fixed while scrolling */
  cursor:
    url("pink.png") 10 10,
    auto;
}

.scroll-wrapper {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth; /* optional: enables smooth scroll */
}

.sections {
  height: 100vh;
  scroll-snap-align: start;
  display: flex; /* enable flex */
  justify-content: center; /* horizontal center */
  align-items: center; /* vertical center */
  flex-direction: column;
}

body {
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 600;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

/* Typing container */
.intro {
  position: relative;
  z-index: 15;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

/* style.css */

/* 1) Hide side‑nav by default */
.side-nav {
  display: none; /* keep your mobile‑hide breakpoint if you have one */
  flex-direction: column;
  position: fixed;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  gap: 16px;
  z-index: 100;
}

/* At your “desktop” breakpoint */
@media (min-width: 1024px) {
  .side-nav {
    display: flex;
  }
}

/* Each nav item holds a line + label */
.nav-item {
  display: flex;
  align-items: center;
  cursor:
    url("pink.png") 10 10,
    auto;
  transition: color 0.3s;
}
.nav-item .nav-line {
  width: 4px;
  height: 40px;
  background: var(--darkblue);
  transition: background 0.3s;
}
.nav-item .nav-label {
  margin-left: 8px;
  font-size: 0.9rem;
  color: var(--darkblue);
  white-space: nowrap;
  transition: color 0.3s;
}

/* Active state */
.nav-item.active .nav-line,
.nav-item:hover .nav-line {
  background: #fff;
}
.nav-item.active .nav-label,
.nav-item:hover .nav-label {
  color: #fff;
}

#partyButton {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 140px;
  height: 140px;
  background-color: rgba(0, 0, 136, 0.4);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.6rem;
  font-weight: bold;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.2s ease,
    background-color 0.3s;
  z-index: 1000;
  cursor:
    url("pink.png") 10 10,
    auto;
}

#partyButton:hover {
  transform: scale(1.1) translateY(-2px);
  background-color: #00a;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  z-index: 10;
}

@keyframes shake {
  from {
    transform: rotate(-2deg);
  }

  to {
    transform: rotate(2deg);
  }
}

@keyframes dropBall {
  from {
    top: -100px;
  }
  to {
    top: 50px;
  }
}

@keyframes spin {
  from {
    transform: translateX(-50%) rotate(0deg);
  }
  to {
    transform: translateX(-50%) rotate(360deg);
  }
}

/* Red "Had Enough" button, same size & shape as #partyButton */
#stopPartyButton {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 140px;
  height: 140px;
  background-color: rgba(204, 0, 0, 0.4); /* red */
  color: white;
  border: none;
  border-radius: 50%;
  display: none;
  font-size: 1.6rem;
  font-weight: bold;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.2s ease,
    background-color 0.3s;
  z-index: 1000;
  cursor:
    url("pink.png") 10 10,
    auto;
}
#stopPartyButton:hover {
  transform: scale(1.1) translateY(-2px);
  background-color: #e00; /* brighter red */
}

#discoBall {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 60px;
  opacity: 0;
  display: block;
  pointer-events: none;
  z-index: 1600;
  filter: drop-shadow(0 0 10px white);
}

#lasers {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 550;
  pointer-events: none;
}

#partyWarning {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1rem;
  background: #ff0;
  color: #000;
  padding: 8px 12px;
  border: 2px dashed red;
  border-radius: 8px;
  font-weight: bold;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  animation: wiggle 1s infinite ease-in-out;
  white-space: nowrap;
}

#main-content {
  width: 80%;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 5; /* Above canvas, below h1 */
  opacity: 1;
}

.scroll-cue {
  color: #448;
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  animation: fadeIntro 1s ease-in forwards 8s; /* same as your word */
}

h2 {
  font-family: "DM Serif Text", serif;
  color: var(--darkblue);
  font-size: var(--text-lg);
  line-height: 0;
  padding: 5px 0;
}

h3 {
  font-size: var(--text-md);
  font-weight: 500;
  color: #448;
}

p {
  font-size: var(--text-md);
  line-height: 1.6;
  color: #000;
}

a {
  text-decoration: none;
  color: var(--darkblue);
  font-weight: 500;
  transition: color 0.3s;
  font-size: var(--text-md);
}

a:hover {
  font-weight: bold;
}

/* WRAPPERS */

.container {
  margin-top: 20px;
  background-color: rgba(246, 246, 246, 0.4);
  border-radius: 20px;
  padding: 25px clamp(20px, 4vw, 30px) 40px;
  box-shadow: var(--elevation);
  text-align: left;
}

.container a {
  line-height: 2;
}

footer {
  width: 80%;
  background-color: rgba(246, 246, 246, 0.4);
  padding: 20px;
  display: flex; /* center content */
  align-items: center;
  font-family: "IBM Plex Sans", sans-serif;
  box-shadow: var(--elevation);
  justify-content: center; /* horizontal center */
}

/* TIC TAC TOE */
.TicTac {
  height: 100vh;
  gap: clamp(8px, 2vw, 16px);
  display: flex;
  flex-direction: column;
  justify-content: center; /* vertical centering */
  align-items: center; /* horizontal centering */
}
.board {
  display: grid;
  grid-template-columns: repeat(3, 100px);
  grid-template-rows: repeat(3, 100px);
  gap: 8px;
  /* Slightly larger gap */
  margin-bottom: 20px;
  /* Space below the board */
  /* Semi-transparent white background for 'glass' effect */
  background-color: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.6);
  /* Light border */
  padding: 10px;
  /* Padding inside the board */
  border-radius: 12px;
  /* More rounded corners */
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.2),
    inset 0 1px 2px rgba(255, 255, 255, 0.7);
  /* Outer shadow and inner highlight */
}

.cell {
  width: 100px;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3.5rem;
  /* Slightly larger X and O */
  cursor:
    url("pink.png") 10 10,
    auto;
  border-radius: 8px;
  /* Rounded corners for cells */
  /* Glossy button effect */
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(255, 255, 255, 0.3) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.15),
    inset 0 1px 1px rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease-in-out;
  color: #005a9e;
  /* Darker blue for X/O */
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
  /* Subtle text highlight */
}

.cell:hover {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0.5) 100%
  );
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 1);
  transform: translateY(-1px);
}
.status {
  font-size: 36px;
  font-weight: bold;
  color: var(--darkblue);
}

/* BUTTONS */
.reset-btn {
  display: block;
  padding: 10px 20px;
  font-size: var(--text-md);
  text-align: center;
  font-weight: bold;
  border: none;
  border-radius: 50px;
  background-color: rgba(246, 246, 246, 0.4);
  color: var(--darkblue);
  transition: background 0.3s ease;
  box-shadow: var(--elevation);
  cursor:
    url("pink.png") 10 10,
    auto;
}
.reset-btn:hover {
  background-color: #ffffff;
}
/* GAME LABELS */
#games {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
}

.column {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
}

.title {
  font-family: "DM Serif Text", serif;
  font-size: 40px;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  text-align: center;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(255, 255, 255, 0.3) 100%
  );
  padding: 10px;
  color: var(--darkblue);
  box-shadow: var(--elevation);
}

@media (max-width: 420px) {
  #partyButton,
  #stopPartyButton {
    width: 90px;
    height: 90px;
    font-size: 1rem;
  }

  .scroll-cue {
    bottom: 6rem;
    font-size: 24px;
  }

  .status {
    margin-top: -60px;
  }

  .board {
    margin-top: -120px;
  }

  .reset-btn,
  #toggleGames {
    padding: 8px 15px;
    margin-bottom: 70px;
  }

  .title {
    margin-top: 0px;
    margin-bottom: 150px;
  } /* Tic Tac Toe title */
  .board {
    grid-template-columns: repeat(3, 80px);
    grid-template-rows: repeat(3, 80px);
  }
  .cell {
    width: 80px;
    height: 80px;
  }
  h1#title {
    font-size: clamp(2rem, 18vw, 3.5rem);
    top: 20px;
    line-height: 1.1;
  }
  .player-controls button {
    padding: 8px 10px;
    font-size: 0.8rem;
  }
}

#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -5; /* Behind other content but above html background */
  pointer-events: none; /* Allow clicks to pass through to elements behind if needed, but mousemove still works for canvas script */
}
