@import url("./colors.css");

@font-face {
  font-family: "SpaceMono Nerd Font";
  font-display: swap;
  src:
    local("SpaceMono Nerd Font"),
    url(../fonts/SpaceMonoNF.woff2) format("woff2"),
    url(../fonts/SpaceMonoNF.woff) format("woff");
}

:root {
  color-scheme: dark;
}

img {
  transition:
    transform 0.15s ease-in-out,
    opacity 0.2s ease-in-out;
}

html {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100svh;
  background-color: var(--color0);
  background-image: url("../bgs/topography.svg");
  overflow-x: clip;
}

html.loaded {
  transition: background-color 0.2s ease-in-out;
}

body {
  display: flex;
  color: var(--text-color);
  font-family:
    SpaceMono Nerd Font,
    monospace;
  justify-content: center;
  align-items: center;
}

#text,
#image {
  opacity: 0;
  transition: opacity 0.2s ease-in;
}

#text.loaded,
#image.loaded {
  opacity: 1;
}

#text.loaded * {
  transition: color 0.2s ease-in-out;
}

#carouselImage {
  height: 550px;
  aspect-ratio: 9 / 16;
  border-radius: 6px;
  box-shadow: 0px 5px 15px 0px rgba(0, 0, 0, 0.5);
  object-fit: cover;
}

.wallpaper {
  height: 550px;
  aspect-ratio: 9 / 16;
  border-radius: 6px;
  box-shadow: 0px 5px 15px 0px rgba(0, 0, 0, 0.5);
  object-fit: cover;
}

.wallpaper:hover {
  transform: scale(1.1);
  cursor: pointer;
}

#image {
  margin-right: 1em;
}

#carouselImage:hover {
  transform: scale(1.1);
  cursor: pointer;
}

@media (max-width: 800px) {
  img,
  #image {
    display: none;
    margin: 0;
    padding: 0;
  }
}

#greeting {
  color: var(--color2);
  font-size: 2.5em;
  font-weight: 900;
  grid-column: 1/-1;
  text-align: center;
  display: grid;
}

#date {
  font-size: 1.3em;
  font-weight: 600;
  color: var(--color8);
  display: grid;
  grid-column: 1/-1;
  text-align: center;
  margin: 1em 0;
}

.header {
  color: var(--color4);
  font-size: 1.6em;
  font-weight: 600;
}

#links {
  display: grid;
  grid-row-gap: 0.5em;
  grid-template-columns: repeat(2, 1fr);
}

ul {
  list-style-type: none;
  padding-left: 1em;
  margin-left: 0;
}

a {
  color: var(--text-color);
  font-size: 1.2em;
  text-decoration: none;
}

a:hover {
  color: var(--color9);
  font-style: italic;
}

.indihome .urls:nth-child(even) {
  padding-left: 1.5em;
}

#image {
  padding-right: 1em;
}

#text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#search-container {
  width: 100%;
  max-width: 300px;
  margin-top: 1.5em;
}

#search-form {
  display: flex;
  align-items: center;
  background-color: var(--color0);
  border: 2px solid var(--color8);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

#search-input {
  flex-grow: 1;
  background: none;
  border: none;
  color: var(--text-color);
  font-family: "SpaceMono Nerd Font", monospace;
  font-size: 1em;
  padding: 0.75em 1em;
  outline: none;
}

#search-input::placeholder {
  color: var(--color8);
  opacity: 0.7;
}

#search-button {
  background: none;
  border: none;
  color: var(--color8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75em;
  transition: color 0.3s ease;
}

#search-button:hover {
  color: var(--color9);
}

#search-button svg {
  width: 20px;
  height: 20px;
}

/* Hamburger Menu Styles */
.hamburger-menu {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  cursor: pointer;
  width: 30px;
  height: 20px;
}

.hamburger-icon {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-icon span {
  width: 100%;
  height: 3px;
  background-color: var(--text-color, white); /* Ensure visibility */
  transition: all 0.3s ease;
}

.hamburger-icon.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-icon.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-icon.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.sidebar {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100%;
  background-color: var(--bg-color, rgba(0, 0, 0, 0.8));
  transition: left 0.3s ease;
  z-index: 999;
  overflow-y: auto;
  padding-top: 60px;
}

.sidebar.active {
  left: 0;
}

.sidebar-content {
  padding: 20px;
}

.sidebar-menu {
  list-style-type: none;
  padding: 0;
}

.sidebar-menu li {
  padding: 10px;
  color: var(--text-color, white);
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-menu li:hover {
  background-color: rgba(255, 255, 255, 0.1);
}
