/* Lavender theme colours + 90s grey accents */
:root {
  --header-bg: #a98fdc;
  --nav-bg: #c3b0ea;
  --nav-active: #dccff5;
  --accent: #5b34a8;
  --button-bg: #cbbaef;
  --button-hover: #b9a3e6;
  --page-bg: #e4e2e8;
  --text: #2b1550;

  /* 90s grey box palette */
  --retro-grey: #c0c0c0;
  --retro-grey-hover: #cccccc;
  --retro-grey-active: #b0b0b0;
  --retro-light: #ffffff;
  --retro-shadow: #6b6b6b;
  --retro-dark: #222222;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--text);
  font-family: "MS Sans Serif", "Tahoma", "Verdana", Arial, sans-serif;
  line-height: 1.5;
}

/* Layout wrapper: stacks on mobile/tablet, side-by-side on desktop */
.layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Heading at the top */
.site-header {
  background: var(--header-bg);
  padding: 1.25rem 1rem;
  text-align: center;
  border-bottom: 3px ridge var(--retro-grey);
}

.site-title {
  margin: 0;
  color: var(--text);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-shadow: 1px 1px 0 var(--retro-light);
}

/* Navigation area */
.site-nav {
  background: var(--nav-bg);
  padding: 0.5rem 0.75rem;
  border-bottom: 3px ridge var(--retro-grey);
}

.site-nav ul {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 90s Grey Boxes for Nav Links */
.site-nav a {
  display: block;
  padding: 0.3rem 3.25rem;
  background: var(--retro-grey);
  color: #000000;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.2;
  border-top: 2px solid var(--retro-light);
  border-left: 2px solid var(--retro-light);
  border-right: 2px solid var(--retro-dark);
  border-bottom: 2px solid var(--retro-dark);
  box-shadow: inset -1px -1px 0 var(--retro-shadow);
}

.site-nav a:hover {
  background: var(--retro-grey-hover);
}

/* Pressed-in 90s look for active/clicked link */
.site-nav a[aria-current="page"],
.site-nav a:active {
  background: var(--retro-grey-active);
  border-top: 2px solid var(--retro-dark);
  border-left: 2px solid var(--retro-dark);
  border-right: 2px solid var(--retro-light);
  border-bottom: 2px solid var(--retro-light);
  box-shadow: inset 1px 1px 0 var(--retro-shadow);
}

.site-nav a:focus-visible {
  outline: 1px dotted #000000;
  outline-offset: -4px;
}

/* Desktop Sidebar (901px and wider) */
@media (min-width: 901px) {
  .layout {
    flex-direction: row;
  }

  .sidebar {
    width: 230px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--nav-bg);
    border-right: 3px ridge var(--retro-grey);
  }

  .site-header {
    padding: 1.5rem 1rem;
    border-bottom: 3px ridge var(--retro-grey);
  }

  .site-nav {
    flex: 1;
    padding: 0.85rem;
    border-bottom: none;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.45rem;
  }

  .site-nav a {
    width: 100%;
    text-align: left;
    padding: 0.25rem 0.65rem;
  }
}

/* Page content */
.content {
  flex: 1;
  min-width: 0;
  max-width: 60rem;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* GIF above the info box */
.banner-gif {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 1rem auto;
}

/* Info box above the buttons */
.info-box {
  margin-bottom: 1rem;
  padding: 0.65rem 1rem;
  background: #f4f3f7;
  color: var(--text);
  border: 2px solid var(--accent);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}

/* Rectangular link buttons on the home page */
.button-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.button-grid li {
  min-width: 0;
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.6rem 0.25rem;
  background: var(--button-bg);
  color: var(--text);
  border: 2px solid var(--accent);
  border-radius: 0;
  text-align: center;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  overflow-wrap: break-word;
}

.button:hover {
  background: var(--button-hover);
}

.button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Latest YouTube video preview box */
.video-box {
  margin-top: 1.5rem;
  background: #f4f3f7;
  border: 2px solid var(--accent);
}

.video-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0.75rem;
  background: var(--nav-bg);
  border-bottom: 2px solid var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.video-channel-link {
  color: var(--text);
  text-decoration: none;
}

.video-channel-link:hover {
  text-decoration: underline;
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Skins page grid */
.skins-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.skin-card {
  display: flex;
  flex-direction: column;
  background: #f4f3f7;
  border: 2px solid var(--accent);
}

.skin-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 2px solid var(--accent);
}

.skin-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.85rem;
  gap: 0.75rem;
}

.skin-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

.skin-links {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
}

.skin-links .button {
  flex: 1;
  min-width: 0;
}

/* Buttons wrap as the screen gets smaller: 6 across, then 3 + 3, then 2 + 2 + 2 */
@media (max-width: 1050px) {
  .button-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .skins-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .button-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}