:root {
  --nord0: #2e3440;
  --nord1: #3b4252;
  --nord2: #434c5e;
  --nord3: #4c566a;
  --nord4: #d8dee9;
  --nord5: #e5e9f0;
  --nord6: #eceff4;
  --nord7: #8fbcbb;
  --nord8: #88c0d0;
  --nord9: #81a1c1;
  --nord10: #5e81ac;

  /*  Default colors for color pickers */
  --accent-color: var(--nord8);
  /* Nord blue */
  --main-color: var(--nord6);
  /* Light text */
  --background-color: var(--nord3);
  --navbar-color: var(--nord2);
  /* Navbar background */
}



:root,
body,
.sidebar,
.content,
.text,
.games-grid,
button,
input,
select {
  transition:
    background-color 0.6s ease,
    color 0.6s ease,
    fill 0.6s ease,
    border-color 0.6s ease;
}

body {
  background: var(--background-color);
  height: 100vh;
  margin: 10px;
  padding: 10px;
  overflow-x: hidden;
  /* prevent horizontal overflow */

}

/* Fade */
.fade {
  opacity: 0;
  animation: fadeIn 1.2s ease-out forwards;
}

/* Make sure fixed elements with fade are visible */
.fade.fixed {
  position: fixed;
  /* keep it fixed */
  z-index: 9999;
  /* stay on top */
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.text-color {
  color: var(--accent-color);
  /* Nord Aurora orange accent */
  font-size: 2em;
  text-align: center;
  font-family: 'Quicksand', 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 12px rgba(208, 135, 112, 0.18), 0 1px 2px rgba(0, 0, 0, 0.10);
  margin-bottom: 2em;
  font-size: 50px;
}

.footer {
  color: #81a1c1;
  position: fixed;
  bottom: 0;
  width: 100%;
  background-image: linear-gradient(to right,
      #bf616a,
      #d08770,
      #a75a99,
      #bf616a);
  background-size: 200% auto;
  -webkit-text-fill-color: transparent;
  animation: TextColor 5s linear infinite;
}

@keyframes TextColor {
  to {
    background-position: -200% center;
  }

}

/* Grid*/
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  /* dynamic 4-column layout */
  gap: 1.5rem;
  padding: 2rem;
  justify-items: center;
  background-color: var(--background-color);
  margin-left: 57px;
  /* same as sidebar width */
  transition: margin-left 0.3s ease;
  /* optional smooth shift */
  /* Nord dark background */
}

#element {
  color: var(--textcolor2-color);
  font-weight: 600;
}

/* Center and glow for <p> tag */
.text {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  /* centers vertically based on viewport height */
  text-align: center;
  font-size: 2rem;
  text-shadow: var(--accent-color) 0 0 15px;
  animation: fadeUpText 1.2s ease-out forwards;
  margin: 0;
  padding: 0 1rem;
  /* small padding for smaller screens */
  font-size: 50px;
  color: var(--accent-color);
}

.text2 {
  display: flex;
  justify-content: center;
  align-items: center;  /* centers vertically based on viewport height */
  text-align: center;
  font-size: 1rem;
  text-shadow: var(--textcolor2-color) 0 0 15px;
  animation: fadeUpText 1.2s ease-out forwards;
  /* small padding for smaller screens */
  font-size: 50px;
  color: var(--textcolor2-color);
}

/* fade + slight upward motion */
@keyframes fadeUpText {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Sidebar styling --- */
.sidebar {
  height: 100%;
  /* Full height of the screen */
  width: 55px;
  /* Small fixed width */
  position: fixed;
  /* Keeps the sidebar in place during scroll */
  z-index: 1;
  /* Ensures the sidebar is on top of other content */
  top: 0;
  left: 0;
  background-color: var(--navbar-color);
  /* Dark background color */
  padding-top: 20px;
  /* Space from the top */
  display: flex;
  flex-direction: column;
  /* Stacks images vertically */
  align-items: center;
  /* Centers images horizontally */
}

/* --- Image styling within the sidebar --- */
.sidebar img {
  width: 35px;
  /* Image size */
  height: autopx;
  margin-bottom: 15px;
  /* Spacing between images */
  transition:
    background-color 0.3s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease,
    color 0.3s ease;
  color: var(--accent-color);
}

.sidebar a:hover img {
  transform: scale(1.1);
  /* Slightly enlarge image on hover */
}

/* --- Main content styling --- */
.content {
  margin-left: 60px;
  /* This margin MUST match the width of the sidebar */
  padding: 20px;
}

/* Centered logo image */
.center-image {
  display: block;
  margin: 0 auto;
  position: absolute;
  top: 38%;
  /* slightly above center */
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: auto;
  transition: transform 0.3s ease, top 0.3s ease, filter 0.3s ease;
  opacity: 0;
  animation: fadeInLogo 1.5s ease-in-out forwards;
  animation-delay: 0.3s;
  /* fades slightly after container */
}

/* Hover motion */
.center-image:hover {
  transform: translate(-50%, -55%);
  filter: brightness(1.2);
}

/* Fade-in animation just for the image */
@keyframes fadeInLogo {
  from {
    opacity: 0;
    transform: translate(-50%, -40%);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* Discord button — small square bottom-right */
/* ✨ Discord Button Fade-in ✨ */
.discord-button {
  position: fixed;
  bottom: 5rem;
  /* was 2rem — moved up slightly */
  right: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-color), var(--navbar-color));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s ease forwards;
  animation-delay: 1.5s;
  z-index: 1000;
}


.discord-button:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 0 35px var(--accent-color);
  /* 💡 dynamic glow */
  background: linear-gradient(135deg, var(--navbar-color), var(--accent-color));
  filter: brightness(1.15);
}

.discord-button img {
  width: 36px;
  height: auto;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.discord-button:hover img {
  transform: scale(1.1);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.7));
}


/* Fade animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes discordFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Discord icon inside */
.discord-button img {
  width: 40px;
  height: 40px;
  filter: brightness(1.1);
  transition: transform 0.4s ease, filter 0.3s ease;
}

/* Hover effect */
.discord-button:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 0 35px var(--accent-color);
  /* 💡 dynamic glow */
  background: linear-gradient(135deg, var(--navbar-color), var(--accent-color));
  filter: brightness(1.15);
}

.discord-button:hover img {
  transform: scale(1.1);
  filter: brightness(1.3);
}

/* Fade animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes discordFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}


/* Game Card + Hover */
.game {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #4c566a, #5e81ac);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-width: 300px;
  transition: transform 0.4s ease, box-shadow 0.4s ease, filter 0.4s ease;
}

.game input[type="image"] {
  all: unset;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.5s ease, filter 0.5s ease;
}

/* Hover effects */
.game:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow:
    var(--accent-color) 0 8 20px;
  filter: brightness(1.1);
}

/* Parallax zoom + subtle glow on image */
.game:hover input[type="image"] {
  transform: scale(1.08);
  filter: brightness(1.2) saturate(1.1);
}

.game::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 50%, rgba(136, 192, 208, 0.2), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.game:hover::after {
  opacity: 1;
  animation: subtleGlow 2s ease-in-out infinite alternate;
}

@keyframes subtleGlow {
  from {
    opacity: 0.3;
  }

  to {
    opacity: 0.6;
  }
}

@media (max-width: 900px) {
  .games-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 600px) {
  .games-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1rem;
  }
}

/* Base game card animation */
.game {
  opacity: 0;
  transform: translateY(20px);
  /* start slightly lower */
  animation: fadeUp 0.6s ease forwards;
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Sidebar Icon Masking (Color-Changeable) === */
.sb-icon {
  width: 35px;
  height: 35px;
  display: inline-block;
  background-color: var(--accent-color);
  /* dynamic accent color */
  -webkit-mask: center/contain no-repeat;
  mask: center/contain no-repeat;
  transition: background-color 0.3s ease, transform 0.25s ease, box-shadow 0.25s ease;
  margin-bottom: 15px;
}

.sb-icon:hover {
  background-color: var(--nord6);
  /* hover color (light text color) */
  transform: scale(1.1);
  box-shadow: 0 0 12px var(--accent-color);
}

/* Specific icons — point to your PNGs or SVGs */
.icon-home {
  -webkit-mask-image: url("Images/home-icon.png");
  mask-image: url("Images/home-icon.png");
}

.icon-game {
  -webkit-mask-image: url("Images/game-icon.png");
  mask-image: url("Images/game-icon.png");
}

.icon-settings {
  -webkit-mask-image: url("Images/settings-icon.png");
  mask-image: url("Images/settings-icon.png");
}


.games-grid .game:nth-child(1) {
  animation-delay: 0.1s;
}

.games-grid .game:nth-child(2) {
  animation-delay: 0.2s;
}

.games-grid .game:nth-child(3) {
  animation-delay: 0.3s;
}

.games-grid .game:nth-child(4) {
  animation-delay: 0.4s;
}

.games-grid .game:nth-child(5) {
  animation-delay: 0.5s;
}

.games-grid .game:nth-child(6) {
  animation-delay: 0.6s;
}

.games-grid .game:nth-child(7) {
  animation-delay: 0.7s;
}

.games-grid .game:nth-child(8) {
  animation-delay: 0.8s;
}

.games-grid .game:nth-child(9) {
  animation-delay: 0.9s;
}

.games-grid .game:nth-child(10) {
  animation-delay: 1s;
}

.games-grid .game:nth-child(11) {
  animation-delay: 1.1s;
}

.games-grid .game:nth-child(12) {
  animation-delay: 1.2s;
}

.games-grid .game:nth-child(13) {
  animation-delay: 1.3s;
}

.games-grid .game:nth-child(14) {
  animation-delay: 1.4s;
}

.games-grid .game:nth-child(15) {
  animation-delay: 1.5s;
}

.games-grid .game:nth-child(16) {
  animation-delay: 1.6s;
}

.games-grid .game:nth-child(17) {
  animation-delay: 1.7s;
}

.games-grid .game:nth-child(18) {
  animation-delay: 1.8s;
}

.games-grid .game:nth-child(19) {
  animation-delay: 1.9s;
}

.games-grid .game:nth-child(20) {
  animation-delay: 2s;
}

.games-grid .game:nth-child(21) {
  animation-delay: 2.1s;
}

.games-grid .game:nth-child(22) {
  animation-delay: 2.2s;
}

.games-grid .game:nth-child(23) {
  animation-delay: 2.3s;
}

.games-grid .game:nth-child(24) {
  animation-delay: 2.4s;
}

.games-grid .game:nth-child(25) {
  animation-delay: 2.5s;
}

.games-grid .game:nth-child(26) {
  animation-delay: 2.6s;
}

.games-grid .game:nth-child(27) {
  animation-delay: 2.7s;
}

.games-grid .game:nth-child(28) {
  animation-delay: 2.8s;
}

.games-grid .game:nth-child(29) {
  animation-delay: 2.9s;
}

.games-grid .game:nth-child(29) {
  animation-delay: 2.9s;
}

.games-grid .game:nth-child(30) {
  animation-delay: 3s;
}

.games-grid .game:nth-child(31) {
  animation-delay: 3.1s;
}

.games-grid .game:nth-child(32) {
  animation-delay: 3.2s;
}

.games-grid .game:nth-child(33) {
  animation-delay: 3.3s;
}

.games-grid .game:nth-child(34) {
  animation-delay: 3.4s;
}

.games-grid .game:nth-child(35) {
  animation-delay: 3.5s;
}

.games-grid .game:nth-child(36) {
  animation-delay: 3.6s;
}

.games-grid .game:nth-child(37) {
  animation-delay: 3.7s;
}

.games-grid .game:nth-child(38) {
  animation-delay: 3.8s;
}

.games-grid .game:nth-child(39) {
  animation-delay: 3.9s;
}

.games-grid .game:nth-child(40) {
  animation-delay: 4s;
}

.games-grid .game:nth-child(41) {
  animation-delay: 4.1s;
}

.games-grid .game:nth-child(42) {
  animation-delay: 4.2s;
}

.games-grid .game:nth-child(43) {
  animation-delay: 4.3s;
}

.games-grid .game:nth-child(44) {
  animation-delay: 4.4s;
}

.games-grid .game:nth-child(45) {
  animation-delay: 4.5s;
}

.games-grid .game:nth-child(46) {
  animation-delay: 4.6s;
}

.games-grid .game:nth-child(47) {
  animation-delay: 4.7s;
}

.games-grid .game:nth-child(48) {
  animation-delay: 4.8s;
}

.games-grid .game:nth-child(49) {
  animation-delay: 4.9s;
}

.games-grid .game:nth-child(50) {
  animation-delay: 5s;
}

.games-grid .game:nth-child(51) {
  animation-delay: 5.1s;
}

.games-grid .game:nth-child(52) {
  animation-delay: 5.2s;
}

.games-grid .game:nth-child(53) {
  animation-delay: 5.3s;
}

.games-grid .game:nth-child(54) {
  animation-delay: 5.4s;
}

.games-grid .game:nth-child(55) {
  animation-delay: 5.5s;
}

.games-grid .game:nth-child(56) {
  animation-delay: 5.6s;
}

.games-grid .game:nth-child(57) {
  animation-delay: 5.7s;
}

.games-grid .game:nth-child(58) {
  animation-delay: 5.8s;
}

.games-grid .game:nth-child(59) {
  animation-delay: 5.9s;
}

.games-grid .game:nth-child(60) {
  animation-delay: 6.0s;
}

.games-grid .game:nth-child(61) {
  animation-delay: 6.1s;
}

.games-grid .game:nth-child(62) {
  animation-delay: 6.2s;
}

.games-grid .game:nth-child(63) {
  animation-delay: 6.3s;
}

.games-grid .game:nth-child(64) {
  animation-delay: 6.4s;
}

.games-grid .game:nth-child(65) {
  animation-delay: 6.5s;
}

.games-grid .game:nth-child(66) {
  animation-delay: 6.6s;
}

.games-grid .game:nth-child(67) {
  animation-delay: 6.7s;
}

/* ...continue as needed for more cards */