/* -------------------------------------------------------- */
/* VARIABLES */
/* -------------------------------------------------------- */

/* Variables are used like this: var(--text-color) */
:root {
  /* Background Colors: */
  --background-color-dark: #000000;
  --background-color-light: #ffffff;
  --background-image-dark: url("https://sadhost.neocities.org/images/tiles/stars5.gif");
  --background-image-light: url("https://i.pinimg.com/1200x/3c/cb/e9/3ccbe99ae92a547834249151dc70735c.jpg");
  --sidebar-background-color: rgba(0, 0, 0, 0.5);
  --content-background-color: rgba(0, 0, 0, 0.5);
  --light-content-background-color: rgba(255, 255, 255, 0.5);

  /* Default (Dark/Matrix) Text: */
  --font: 'Monaco';
  --heading-font: 'Monaco' ;
  --text-color: #ffffff; /* Changed from black to white */
  --sidebar-text-color: #00ff00;
  --link-color: #00ff00;
  --link-color-hover: #ffffff;
  --border-color-dark: #ffffff;

  /* Light (Cartoonish) Text: */
  --light-font: 'Comic Sans MS', sans-serif;
  --light-heading-font: 'Impact', sans-serif;
  --light-text-color: #333333;
  --light-link-color: #0066cc; /* Added missing variable */
  --light-link-color-hover: white;
  --border-color-light: #333333;

  /* Other Settings: */
  --font-size: 12px;
  --margin: 40px;
  --padding: 24px;
  --border: 1px solid var(--border-color-dark);
  --round-borders: 6px;
  --sidebar-width: 300px;
}

/* -------------------------------------------------------- */
/* BASICS */
/* -------------------------------------------------------- */
/* Night (default) */

html, body {
  height: 100%;
  min-height: 100%;
}

body {
  background-color: var(--background-color-dark);
  background-image: var(--background-image-dark);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
  color: var(--text-color);
  font-family: var(--font);
}

/* Light theme */
body.light-mode {
  background-color: var(--background-color-light);
  background-image: var(--background-image-light);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  color: var(--light-text-color);
  font-family: var(--light-font);
}

body.light-mode a {
  color: var(--light-link-color);
}

body.light-mode a:hover {
  color: var(--light-link-color-hover);
}

* {
  box-sizing: border-box;
}

#preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  font-size: var(--font-size);
  margin: 0;
  padding: 0;
  color: var(--text-color);
  font-family: var(--font);
  line-height: 1.2;
}

::selection {
  background: rgba(0, 0, 0, 0.2);
}

mark {
  text-shadow: 1px 1px 4px var(--link-color);
  background-color: inherit;
  color: var(--text-color);
}

/* Links: */
a {
  text-decoration: underline;
}

a,
a:visited {
  color: var(--link-color);
}

a:hover,
a:focus {
  color: var(--link-color-hover);
  text-decoration: none;
}

/* -------------------------------------------------------- */
/* LAYOUT */
/* -------------------------------------------------------- */

.layout {
  width: 100%;
  display: grid;
  grid-gap: var(--margin);
  grid-template:
    "header header header" auto
    "leftSidebar main rightSidebar" auto
    "footer footer footer" auto
    / var(--sidebar-width) auto var(--sidebar-width);
}

main {
  grid-area: main;
  overflow-y: auto;
  padding: var(--padding);
  background: var(--content-background-color);
  border-radius: var(--round-borders);
  color: var(--text-color);
}

body.light-mode main {
  background: var(--light-content-background-color);
  border: 1px solid var(--border-color-light);
  color: var(--light-text-color);
}

/* -------------------------------------------------------- */
/* HEADER */
/* -------------------------------------------------------- */

header {
  grid-area: header;
  font-size: 1.2em;
  border: var(--border);
  border-radius: var(--round-borders);
  background: var(--content-background-color);
  color: var(--text-color);
}

body.light-mode header {
  background: var(--light-content-background-color);
  border: 1px solid var(--border-color-light);
  color: var(--light-text-color);
}

.header-content {
  padding: var(--padding);
}

.header-title {
  font-family: var(--heading-font);
  font-size: 1.5em;
  font-weight: bold;
  color: var(--text-color);
}

body.light-mode .header-title {
  font-family: var(--light-heading-font);
  color: var(--light-text-color);
}

.header-image img {
  width: 100%;
  height: auto;
}

/* -------------------------------------------------------- */
/* SIDEBARS */
/* -------------------------------------------------------- */

aside {
  grid-area: aside;
  border: var(--border);
  border-radius: var(--round-borders);
  overflow: hidden;
  background: var(--sidebar-background-color);
  padding: var(--padding);
  color: var(--sidebar-text-color);
}

body.light-mode aside {
  background: var(--light-content-background-color);
  border: 1px solid var(--border-color-light);
  color: var(--light-text-color);
}

.left-sidebar {
  grid-area: leftSidebar;
  text-align: center;
}

.right-sidebar {
  grid-area: rightSidebar;
  text-align: center;
}

.sidebar-title {
  font-weight: bold;
  font-size: 1.2em;
  font-family: var(--heading-font);
}

body.light-mode .sidebar-title {
  font-family: var(--light-heading-font);
  color: var(--light-text-color);
}

.sidebar-section #statuscafe {
  margin: 0 auto;
  text-align: center;
  width: fit-content;
}

.sidebar-section:not(:last-child) {
  margin-bottom: 3em;
}

.sidebar-section ul,
.sidebar-section ol {
  padding-left: 1.5em;
}

.sidebar-section > *:not(p):not(ul):not(ol):not(blockquote) {
  margin-top: 10px;
}

/* Sidebar Blockquote: */
.sidebar-section blockquote {
  background: rgba(0, 0, 0, 0.1);
  padding: 15px;
  margin: 1em 0;
  border-radius: 10px;
  overflow: hidden;
}

body.light-mode .sidebar-section blockquote {
  background: rgba(255, 255, 255, 0.5);
}

.sidebar-section blockquote > *:first-child {
  margin-top: 0;
}

.sidebar-section blockquote > *:last-child {
  margin-bottom: 0;
}

/* Site Button: */
.site-button {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.site-button textarea {
  font-family: monospace;
  font-size: 0.7em;
}

/* -------------------------------------------------------- */
/* FOOTER */
/* -------------------------------------------------------- */

footer {
  grid-area: footer;
  border: var(--border);
  border-radius: var(--round-borders);
  overflow: hidden;
  font-size: 0.75em;
  padding: 15px;
  background: var(--content-background-color);
  display: flex;
  justify-content: center;
  color: var(--text-color);
}

body.light-mode footer {
  background: var(--light-content-background-color);
  border: 1px solid var(--border-color-light);
  color: var(--light-text-color);
}

footer a,
footer a:visited {
  color: var(--link-color);
}

body.light-mode footer a,
body.light-mode footer a:visited {
  color: var(--light-link-color);
}

footer a:hover,
footer a:focus {
  color: var(--link-color-hover);
}

body.light-mode footer a:hover,
body.light-mode footer a:focus {
  color: var(--light-link-color-hover);
}

/* -------------------------------------------------------- */
/* NAVIGATION */
/* -------------------------------------------------------- */

.navbar {
  display: flex;
  flex-direction: row;
  gap: 0.5em;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav .sidebar-title {
  margin-bottom: 0.5em;
}

nav ul {
  margin: 0 -5px;
  padding: 0;
  list-style: none;
  user-select: none;
}

nav ul li {
  margin-bottom: 0;
}

nav > ul li > a,
nav > ul li > strong {
  display: inline-block;
}

nav > ul li > a,
nav > ul li > details summary,
nav > ul li > strong {
  padding: 5px 10px;
  color: var(--text-color); 
}

body.light-mode nav > ul li > a,
body.light-mode nav > ul li > details summary,
body.light-mode nav > ul li > strong {
  color: var(--light-text-color);
}

nav > ul li > a.active,
nav > ul li > details.active summary {
  font-weight: bold;
}

nav ul summary {
  cursor: pointer;
}

nav ul ul li > a {
  padding-left: 30px;
}

#sunIcon, #moonIcon {
  width: 40px;
  height: 40px;
  
}

/* -------------------------------------------------------- */
/* CONTENT */
/* -------------------------------------------------------- */
body {
  cursor: url('https://cdn.cursor.style/collections/66-marvel_comics/2001-celovek-pauk-cursor.svg'), auto;
}

main {
  line-height: 1.5;
}

main a,
main a:visited {
  color: var(--link-color);
}

main a:hover,
main a:focus {
  color: var(--link-color-hover);
  text-decoration-style: wavy;
}

main p,
main .image,
main .full-width-image,
main .two-columns {
  margin: 0.75em 0;
}

main ol,
main ul {
  margin: 0.5em 0;
  padding-left: 1.5em;
  color: var(--text-color);
}

body.light-mode main ol,
body.light-mode main ul {
  color: var(--light-text-color);
}

main ol li,
main ul li {
  margin-bottom: 0.2em;
  line-height: 1.3;
}

main ol {
  padding-left: 2em;
}

main blockquote {
  background: rgba(0, 0, 0, 0.1);
  padding: 15px;
  margin: 1em 0;
  border-radius: 10px;
}

main pre {
  margin: 1em 0 1.5em;
}

main code {
  text-transform: none;
}

main center {
  margin: 1em 0;
  padding: 0 1em;
}

main hr {
  border: 0;
  border-top: var(--border);
  margin: 1.5em 0;
}

/* HEADINGS: */
main h1,
main h2,
main h3,
main h4,
main h5,
main h6 {
  font-family: var(--heading-font);
  margin-bottom: 0;
  line-height: 1.5;
  color: var(--text-color);
}

main h1:first-child,
main h2:first-child,
main h3:first-child,
main h4:first-child,
main h5:first-child,
main h6:first-child {
  margin-top: 0;
}

main h1 { font-size: 1.5em; }
main h2 { font-size: 1.4em; }
main h3 { font-size: 1.3em; }
main h4 { font-size: 1.2em; }
main h5 { font-size: 1.1em; }
main h6 { font-size: 1em; }

body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode h5,
body.light-mode h6 {
  font-family: var(--light-heading-font);
  color: var(--light-text-color);
}

/*Status */
#statuscafe-username {
  display: none;
}

#statuscafe {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 1em;
  background-color: azure;
  border: 1px solid midnightblue;
  text-align: center;
  border-radius: 6px;
  color: var(--light-text-color);
}

body.light-mode #statuscafe {
  background-color: #f0f8ff;
  border-color: #333333;
}

/*music player*/
.box {
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #111;
  color: var(--text-color);
}

body.light-mode .box {
  background: #eeeeee;
  border-color: #333333;
  color: var(--light-text-color);
}

#musicbox {
  display: flex;
  align-items: center;
  gap: 10px;
}

#albumcover {
  border-radius: 6px;
}

#songname {
  font-weight: bold;
}

#artist {
  font-size: 0.9em;
  color: gray;
}

#lastplayed {
  display: block;
  margin-top: 5px;
  font-size: 0.8em;
  color: gray;
}

/* COLUMNS: */
.two-columns {
  display: flex;
}

.two-columns > * {
  flex: 1 1 0;
  margin: 0;
}

.two-columns > *:first-child {
  padding-right: 0.75em;
}

.two-columns > *:last-child {
  padding-left: 0.75em;
}

/* MAIN CONTENT BOXES */
.main-box,
.main-box-bottom {
  width: 100%;
  margin-bottom: 20px; 
  padding: 1rem;
  border: 1px solid var(--border-color-dark);
  border-radius: var(--round-borders);
  background: var(--content-background-color);
}

body.light-mode .main-box,
body.light-mode .main-box-bottom {
  background: var(--light-content-background-color);
  border: 1px solid var(--border-color-light);
  color: var(--light-text-color);
}
dt {
  font-weight: bold;
  color: var(--link-color); 
}

dd {
  margin-left: 1.5em; 
}

.content-box dl {
  display: grid;
  grid-template-columns: max-content 1fr; 
  gap: 0.5em 1em; 
}
.main-box-bottom .info-columns {
  display: flex;
  gap: 32px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.main-box-bottom .info-col {
  flex: 1 1 250px;
  min-width: 220px;
}

.main-box-bottom h3 {
  margin-top: 1em;
  margin-bottom: 0.5em;
  color: #6B8E23;
}

.main-box-bottom ul {
  margin: 0 0 1em 0;
  padding-left: 1.2em;
}
.info-columns {
  display: flex;
  gap: 32px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.info-col {
  flex: 1 1 220px;
  min-width: 220px;
}

.info-col-image {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.info-col-image img {
  max-width: 180px;
  border-radius: 12px;
  box-shadow: 0 2px 8px #0003;
}
.theme-img {
  display: none;
  max-width: 180px;
  border-radius: 12px;
  box-shadow: 0 2px 8px #0003;
}

body:not(.light-mode) .dark-img {
  display: block;
}

body.light-mode .light-img {
  display: block;
}

.second-bottom {
  margin-top: 40px;
}

.game-slider {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 10px;
  scroll-snap-type: x mandatory;
}

.game-slider {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 15px;
  scroll-snap-type: x mandatory;
}

.game-box {
  flex: 0 0 auto;
  width: 340px;
  background: #222;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  text-align: center;
  scroll-snap-align: start;
}

.game-box h3 {
  color: white;
  margin-bottom: 10px;
}

.game-slider::-webkit-scrollbar {
  display: none;
}
.game-slider {
  -ms-overflow-style: none;
  scrollbar-width: none;
}


/* -------------------------------------------------------- */
/* CONTENT IMAGES */
/* -------------------------------------------------------- */

.image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
}

.full-width-image {
  display: block;
  width: 100%;
  height: auto;
}

.images {
  display: flex;
  width: calc(100% + 5px + 5px);
  margin-left: -5px;
  margin-right: -5px;
}

.images img {
  width: 100%;
  height: auto;
  padding: 5px;
  margin: 0;
  overflow: hidden;
}

.comic-month-list {
  max-height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comic-month-list img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.main-box-bottom {
  position: relative;
}
.corner-images {
  position: static;
}
.garfield-img {
  position: absolute;
  right: 0;             
  top: 50%;
  transform: translateY(-50%);
  max-width: 130px;
  border-radius: 12px;
  box-shadow: 0 2px 8px #0003;
  z-index: 2;
}


.tiger-img {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  max-width: 100px; 
  border-radius: 12px;
  box-shadow: 0 2px 8px #0003;
  z-index: 2;
}
/* -------------------------------------------------------- */
/* ACCESSIBILITY */
/* -------------------------------------------------------- */

#skip-to-content-link {
  position: fixed;
  top: 0;
  left: 0;
  display: inline-block;
  padding: 0.375rem 0.75rem;
  line-height: 1;
  font-size: 1.25rem;
  background-color: var(--content-background-color);
  color: var(--text-color);
  transform: translateY(-3rem);
  transition: transform 0.1s ease-in;
  z-index: 99999999999;
}

#skip-to-content-link:focus,
#skip-to-content-link:focus-within {
  transform: translateY(0);
}

body.light-mode #skip-to-content-link {
  background-color: var(--light-content-background-color);
  color: var(--light-text-color);
}

/* -------------------------------------------------------- */
/* MOBILE RESPONSIVE */
/* -------------------------------------------------------- */

@media (max-width: 800px) {
  body {
    font-size: 14px;
  }

  .layout {
    width: 100%;
    grid-template:
      "header" auto
      "rightSidebar" auto
      "leftSidebar" auto
      "main" auto
      "footer" auto / 1fr;
    .left-sidebar,
    .right-sidebar {
      display: none;
    }
  }

  aside {
    border-bottom: 1px solid;
    padding: 9px;
    font-size: 0.9em;
  }

  nav {
    padding: 0;
  }

  nav > ul {
    padding-top: 0.5em;
  }

  nav > ul li > a,
  nav > ul li > details summary,
  nav > ul li > strong {
    padding: 0.5em;
  }

  main {
    max-height: none;
    padding: 15px;
  }

  .images {
    flex-wrap: wrap;
  }

  .images img {
    width: 100%;
  }

  #skip-to-content-link {
    font-size: 1rem;
  }
}

/* --- Burger menu and responsive nav --- */
#menu-icon {
  display: none;
  font-size: 2em;
  cursor: pointer;
  color: var(--link-color);
  margin-left: 20px;
}

body.light-mode #menu-icon {
  color: var(--light-link-color);
}

@media (max-width: 800px) {
  .left-sidebar,
  .right-sidebar {
    display: none;
  }

  #menu-icon {
    display: block;
  }

  nav {
    position: relative;
  }

  .navbar {
    display: none;
    flex-direction: column;
    background: #111;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 999;
    margin: 0;
    padding: 0;
    border-radius: 0 0 10px 10px;
  }

  body.light-mode .navbar {
    background: #dddddd;
  }

  .navbar.open {
    display: flex;
  }

  .navbar li {
    width: 100%;
  }

  .navbar a,
  .navbar details summary {
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
    border-bottom: 1px solid #222;
    background: transparent;
    color: var(--text-color);
    text-align: left;
    border-radius: 0;
  }

  body.light-mode .navbar a,
  body.light-mode .navbar details summary {
    border-bottom: 1px solid #aaaaaa;
    color: var(--light-link-color);
  }

  .navbar a:hover,
  .navbar details summary:hover {
    background: #222;
    color: #fff;
  }

  body.light-mode .navbar a:hover,
  body.light-mode .navbar details summary:hover {
    background: #f0f0f0;
    color: #000;
  }
}

  @media (max-width: 800px) {
  .main-box-bottom .info-columns {
    flex-direction: column;
    gap: 16px;
  }
}

@media (max-width: 800px) {
  .main-box-bottom .corner-images {
    position: absolute;
    bottom: 50px;
    right: 10px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }
  .main-box-bottom .corner-images img {
    max-width: 100px;
    max-height: 100px;
    margin: 0;
    box-shadow: 0 2px 8px #0003;
  }
}