body { /* Basically everything */
    font-family: Arial, sans-serif;
    background-color: #f0efed;
    text-align: center;
    padding: 0; /* remove hardcoded 120px top padding */
    margin: 0;
    height: 100vh; /* occupy full screen height */
    overflow: hidden; /* prevent scrolling */
}

.main-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh; /* fills the screen */
  box-sizing: border-box;
}

.center-img {
  width: 90%;
  max-width: 400px;
  height: auto;
  margin: 0 auto;
  display: block;
  transition: transform 1s cubic-bezier(1, 0.2, 0.4, 1);
}

.image-container {
  display: flex;
  justify-content: center;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  position: relative;
}

.slide-left {
  transform: translateX(-160%);
}

.subtext { /* Basically just "MK II" */
  text-align: center;
  font-size: 0.7rem; /* small text */
  color: #040301;
  margin-top: 11px;
}

.button-group {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap; /* Optional: wraps buttons on smaller screens */
}

.button-group button {
  width: 80px; /* optional: set consistent width */
  height: 40px; 
  padding: 8px 16px;
  font-size: 0.7rem;
  cursor: pointer;
  background-color: transparent;
  color: #040301;
  border: 1px solid #040301;
  border-radius: 0;
}

.button-group button:active {
  transform: scale(0.95); /* Shrinks the button to 95% */
  transition: transform 0.1s ease-in-out;
}

#controls { /* this is for the buttons moving out of the way */
  transition: transform 1s cubic-bezier(1, 0.2, 0.4, 1);
}

#controls.move-down {
  transform: translateY(120px); /* moves down by 120px */
}

.skin-thumb {
  width: 400px;
  height: auto;
  border: 1px solid #ccc;
  border-radius: 0px;
  transition: transform 0.4s ease, border-color 0.4s ease;
  cursor: pointer;
}

.skin-thumb:hover {
  transform: scale(1.01);
  border-color: #040301;
}

#skinList {
  display: grid;                /* use grid instead of flex */
  grid-template-columns: repeat(2, 1fr); /* 2 columns, equal width */
  column-gap: 0;
  row-gap: 3px;                   /* space between skins */
  justify-items: center;       /* center items horizontally */
  max-width: 100%;
  opacity: 1;                  /* keep visible when container is shown */
  pointer-events: auto;
}

.dark-toggle {
  width: 32px;
  height: 32px;
  background-color: transparent;
  border: 2px solid #040301;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s;
}

#darkModeToggle {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background-color: transparent;
  border: 2px solid #040301;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s;
  z-index: 1000; 
}

body.dark-mode .dark-toggle {
  border-color: #f0efed;
}

body.dark-mode {
  background-color: #040301;
  color: #f0efed;
}

body.dark-mode .subtext {
  color: #f0efed;
}

body.dark-mode .button-group button {
  filter: invert(1);
}

body.dark-mode #mainImage {
  filter: invert(1);
}

body.dark-mode #darkModeToggle {
  filter: invert(1);
}

body, .button-group button, #darkModeToggle, #skinListContainer, .subtext {
  transition: all 0.3s ease;
}

#mainImage { /* This is here basically to dodge the dark mode from fucking up the panel animation */
  transition:
    transform 1s cubic-bezier(1, 0.2, 0.4, 1),
    filter 0.3s ease;
}

#skinListContainer {
  position: absolute;
  top: 46.3%; 
  left: 71.8%; 
  transform: translate(-100%, -50%); 
  width: 43.4vw;
  height: 61.4vh;
  overflow-y: auto;
  border: 1px solid #040301;
  background-color: transparent;
  padding: 8px 3px; /* top & bottom, left and right  */
  box-shadow: 0 0 10px rgba(0,0,0,0.15);
  border-radius: 0px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 1s ease-in-out; 
  z-index: 900;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

#skinListContainer::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

#skinListContainer.show {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  overflow-y: auto; /* allow scroll inside container */
}

#skinListContainer.visible {
  opacity: 1;
  pointer-events: auto;
}

body.dark-mode #skinListContainer {
  background-color: transparent;
  border-color: #f0efed;
}

#socialIcons {
  position: absolute;
  top: 0;
  left: 100%; /* Start just to the right of the socials button */
  display: flex;
  gap: 10px;
  opacity: 0;
  transform: translateX(10px);
  transition: transform 0.4s ease, opacity 0.4s ease;
  pointer-events: none;
  align-items: center;
  height: 100%;
}

#socialIcons.show {
  opacity: 1;
  transform: translateX(10px);
  pointer-events: auto;
}

.social-icon {
  display: inline-block;
  font-size: 28px;
  color: #040301;
  transition: transform 0.2s;
  width: 30px;
  height: 30px;
  vertical-align: middle;
}

.social-icon:hover {
  transform: scale(1.1);
}

body.dark-mode .social-icon {
  filter: invert(1);
}

#darkModeToggle::before {
  content: "☾"; /* or use an icon */
  font-size: 18px;
  display: block;
  text-align: center;
}
body.dark-mode #darkModeToggle::before {
  content: "☀";
}

#valentineBtn {
    position: fixed;
    top: 16px;
    right: 60px; /* next to dark mode toggle */
    width: 32px;
    height: 32px;
    background-color: transparent;
    border: 2px solid #040301;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s, transform 0.3s;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#valentineBtn svg {
    width: 18px;
    height: 18px;
}

#valentineBtn:hover {
    background-color: #040301;
    color: #f0efed;
    transform: scale(1.1);
}

/* Dark mode adaptation */
body.dark-mode #valentineBtn {
    border-color: #f0efed;
}

body.dark-mode #valentineBtn:hover {
    background-color: #f0efed;
    color: #040301;
}