/* -------------------------------------------------------- */
/* VARIABLES */
/* -------------------------------------------------------- */

/* Variables are used like this: var(--text-color) */
:root {
  /* Background Colors: */
  --background-color: #89CFF0;
  --content-background-color: #ffffff;
  --sidebar-background-color: #ffffff;

  /* Text Colors: */
  --text-color: #0096FF;
  --sidebar-text-color: #0096FF;
  --link-color: #0096FF;
  --link-color-hover: #0096FF;

  /* Text: */
  --font: Brush Script, arial; /* Current font, can be changed as discussed */
  --heading-font: Brush Script, arial; /* Current heading font, can be changed */
  --font-size: 14px;

  /* Other Settings: */
  --margin: 16px;
  --padding: 24px;
  --border: 5px solid #89CFF0; /* This variable still defines the border style */
  --round-borders: 0px;
  --sidebar-width: 200px;
}

/* -------------------------------------------------------- */
/* BASICS */
/* -------------------------------------------------------- */

* {
  box-sizing: border-box;
}

body {
  display: flex;
  align-items: flex-start; /* Changed from 'center' to prevent header cutoff */
  justify-content: center;
  background-image: url("https://sadhost.neocities.org/images/tiles/sora5.gif");
  background-repeat: repeat;
  background-attachment: fixed;
  color: var(--text-color);
  font-family: var(--font);
  font-size: var(--font-size);
  margin: 0;
  padding: var(--margin);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link-color);
}

a:hover {
  color: var(--link-color-hover);
}

h1 {
  font-family: var(--heading-font);
  font-size: 2.5em;
  color: var(--text-color);
  margin-bottom: 0.5em;
}

/* This is where your entire site's layout is set. */
.layout {
  width: 1000px;
  display: grid;
  grid-gap: 0; /* Changed from 'var(--margin)' to remove white gaps between boxes */
  grid-template: "header header header" auto
                 "leftSidebar main rightSidebar" auto
                 "footer footer footer" auto / var(--sidebar-width) auto var(--sidebar-width);
  background-color: var(--content-background-color);
  /* border: var(--border); */ /* THIS LINE WAS COMMENTED OUT to remove the border around the entire layout */
  border-radius: var(--round-borders);
  overflow: visible; /* Changed from 'hidden' to prevent content cutoff */
}

/* -------------------------------------------------------- */
/* HEADER */
/* -------------------------------------------------------- */

header {
  grid-area: header;
  font-size: 1.2em;
  border: var(--border); /* If you want to keep the header border, uncomment 'border' for .layout as well */
  border-radius: var(--round-borders);
  background: var(--content-background-color);
  padding: var(--padding);
}

.header-image img {
  width: 100%;
  height: auto;
  display: block;
}

header nav {
  display: flex;
  justify-content: center;
  gap: 1em;
  padding-top: 1em;
}

nav > ul {
  list-style-type: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

nav > ul li {
  margin: 0.5em;
}

nav > ul li > a,
nav > ul li > details summary,
nav > ul li > strong {
  display: inline-block;
  padding: 0.5em 1em;
  border: 1px solid var(--text-color);
  border-radius: 5px;
  text-decoration: none;
  background-color: var(--content-background-color);
  transition: background-color 0.3s ease;
}

nav > ul li > a:hover,
nav > ul li > details summary:hover,
nav > ul li > strong:hover {
  background-color: var(--link-color-hover);
  color: var(--content-background-color);
}

.sidebar-title {
  font-size: 1.2em;
  font-weight: bold;
  padding: var(--padding);
  text-align: center;
  background-color: var(--sidebar-background-color);
  border-bottom: var(--border);
}

/* -------------------------------------------------------- */
/* MAIN CONTENT */
/* -------------------------------------------------------- */

main {
  grid-area: main;
  font-size: 1em;
  padding: var(--padding);
  background: var(--content-background-color);
  border: var(--border); /* If you want to remove the main content border, comment this out */
  border-radius: var(--round-borders);
  max-height: none; /* Allows content to expand without fixed height */
  overflow: hidden; /* This can hide content that overflows vertically. Consider 'visible' if content is cut off. */
}

/* -------------------------------------------------------- */
/* SIDEBARS */
/* -------------------------------------------------------- */

.left-sidebar {
  grid-area: leftSidebar;
  background: var(--sidebar-background-color);
  padding: var(--padding);
  border: var(--border); /* If you want to remove the sidebar borders, comment this out */
