* {
  box-sizing: border-box;
}

html {
  box-sizing: border-box;
  height: 100%;
}

.wrapper {
  box-sizing: border-box;
  min-height: 100%;

  display: flex;
  flex-direction: column;
}

/* 🌌 Base layout */
body {
  box-sizing: border-box;
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: #170117;
  color: #efeff1;
}

/* Center content */
main {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

/* 🧭 Header */
header {
  background-color: #320434;
  padding: 15px 20px;
}

/* 🧾 Footer */
footer {
  background-color: #320434;
  text-align: center;
  margin-top: 40px;
  font-size: 14px;
  color: #adadb8;
}

.page-header,
.page-footer {
  padding: 20px;
  flex-grow: 0;
  flex-shrink: 0;
}

.page-body {
  padding: 20px;

  flex-grow: 1;
}

nav ul {
  display: flex;
  justify-content: center;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

nav a {
  color: #bf94ff;
  text-decoration: none;
  font-weight: bold;
}

nav a:hover {
  color: #ffffff;
}

/* 🖼 Images */
img {
  border-radius: 0px;
  margin: 20px 0;
}

/* 🔘 Buttons */
button {
  background: #9146ff;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: medium;
}

button:hover {
  background: #772ce8;
}

/* 🔍 Search input */
input[type="text"] {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #2f2f35;
  background: #18181b;
  color: white;
  width: 100%;
  box-sizing: border-box;
}

/* grid for the emotes page */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 112px);
  gap: 16px;
}

.grid-item {
  display: flex;
  flex-direction: column; /* Stacks image and caption vertically */
  align-items: center;    /* Centers items horizontally */
  text-align: center;
  font-size: 20px;   /* Changes the text size */
}

.grid-item a {
    font-size: 20px;     /* Adjust the size (px, em, rem, or %) */
    text-decoration: none; /* Optional: removes the default underline */
}

/* card for each emote */
.card {
  width: 122px;
  height: 122px;
  border-radius: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* prevents overflow artifacts */
  transition: transform 0.15s ease, background 0.15s ease;
}

/* Hover effect */
.card:hover {
  transform: translateY(-4px) scale(1.05);
  background: #b15cb6;
}

.card img {
  width: 112px;
  height: 112px;
  border-radius: 0px;
}

/* ✨ Links */
a {
  color: #bf94ff;
}

a:hover {
  color: #ffffff;
}

#suggestions li {
  padding: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

#suggestions li:hover {
  background-color: #333; /* dark grey */
}