/* Variables */
:root {
  --card-size: 180px;
  --expanded-card-height: 400px;
  --expanded-card-width: 180px;
  --content-size: 80%;
  --transition-duration: 0.3s;
  --spacing: 4px;
}

/* Font */
@font-face {
  font-family: 'JetBrainsMono Nerd Font';
  src: url('../fonts/JetBrainsMonoNerdFont-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background-image: url('../img/wall-gruv.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  font-family: 'JetBrainsMono Nerd Font';
}

/* Container */
#container,
.content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
}

#container {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.5);
}

/* Square */
.sqr {
  display: inline-block;
  width: var(--card-size);
  height: var(--card-size);
  margin: var(--spacing);
  border: 0 solid #282828;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background-color: #FABD2F;
  transition: all var(--transition-duration) ease-in-out;
}

.sqr span {
  line-height: var(--card-size);
  font-size: 18px;
  color: #282828;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sqr .content {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 100%);
  opacity: 0;
  transition: opacity var(--transition-duration) ease-in-out, transform var(--transition-duration) ease-in-out;
  text-align: center;
  width: 100%;
}

.sqr:hover {
  height: var(--expanded-card-height);
  width: var(--expanded-card-width);
  border-top: 9px solid #EBDBB2;
  border-bottom: 9px solid #EBDBB2;
}

.sqr:hover .content {
  height: var(--expanded-card-height);
  width: var(--expanded-card-width);
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* Content */
.content {
  top: 50%;
  transform: translate(-50%, -50%);
  height: var(--content-size);
  opacity: 0;
  transition: opacity var(--transition-duration) ease-in-out, transform var(--transition-duration) ease-in-out;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.sqr:hover .content,
.content {
  opacity: 1;
}

.sqr img {
  position: absolute;
  top: 15px; /* Adjust the top position as needed */
  left: 50%;
  transform: translateX(-50%);
  width: 50px; /* Adjust the width as needed */
  height: auto;
}


/* Links */
.content a, .editLink {
  font-size: 14px;
  color: #282828;
  margin: var(--spacing);
  text-decoration: none;
  line-height: 25px;
  display: block;
}

/* Search Input */
#searchinput {
  padding: 5px;
  border: none;
  width: 90%;
  margin: 0 auto;
  box-sizing: border-box;
  background-color: #EBDBB2;
}

#searchinput:focus {
  outline: none;
  border: none;
}

/* Greeting Container */
#greetingContainer,
#timeContainer {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'JetBrainsMono Nerd Font';
  z-index: 1;
  color: #EBDBB2;
}

#greetingContainer {
  position: fixed;
  top: 20%;
  font-size: 20px;
  left: 50%;
}

#timeContainer {
  font-size: 25px;
  top: 15%;
}

/* Version and Edit Icon */
#version,
#editIcon {
  z-index: 1;
  position: absolute;
}

#version {
  bottom: 5px;
  right: 5px;
}

#editIcon {
  bottom: 20px;
  right: 20px;
  cursor: pointer;
}

#editIcon img {
  width: 30px;
  height: auto;
}

/* Edit Menu */
#editMenu {
  position: fixed;
  bottom: 60px;
  right: 30px;
  background-color: #FABD2F;
  box-shadow: 0 0 10px #282828;
  opacity: 0;
  transform: translateY(20px);
  transition: transform 0.5s ease, opacity 0.5s ease;
}

#editMenu.show {
  opacity: 1;
  transform: translateY(0);
}

/* Edit Link */
.editLink {
  padding: 5px;
  text-decoration: none;
  display: block;
  font-size: 18px;
  text-align: center;
  color: #282828;
  transition: background-color 0.3s ease;
}

.editLink:hover {
  background-color: #EBDBB2;
}

/* Styles for the weather container */
#weatherContainer {
  text-align: center;
  color: #EBDBB2;
  position: fixed;
  top: 10%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 30px;
  font-family: 'JetBrainsMono Nerd Font';
  z-index: 1;
}

/* Update font size and white-space property for larger screens */

#greetingContainer,
#weatherContainer,
#timeContainer {
  white-space: nowrap; /* Ensures the text stays on a single line */
}

/* Media query for smaller screens */
@media screen and (max-width: 600px) {
  :root {
    --base-font-size: 14px;
  }

  #greetingContainer,
  #weatherContainer,
  #timeContainer {
    font-size: var(--base-font-size);
  }
}

#termButton {
  position: fixed;
  bottom: 20px;
  left: 20px;
  cursor: pointer;
  z-index: 1000;
}



#termButton img {
  width: 36px;
  height: auto;
}

#termSection {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 55%; /* Adjust as needed */
  height: 50%; /* Adjust as needed */
  background-image: url('../img/term-wall-gruv.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.3s ease-in-out; /* Smooth transition */
  color: #EBDBB2;
  border: 1px solid #FABD2F;
  overflow: hidden;
  font-family: 'JetBrainsMono Nerd Font';
  font-size: 12px;
  border-radius: 5px;
  box-shadow: 0px 0px 10px 0px #000000;
  z-index: 1;
}

#termTitleBar {
  background-color: #333;
  padding: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
  user-select: none;
}

#termButtons {
  display: flex;
  gap: 5px;
}

.termButton {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  cursor: pointer;
}

#termContent {
  background-color: rgba(0, 0, 0, 0.5);
  height: calc(100% - 60px);
  overflow-y: scroll;
  padding: 10px;
}

#termInput {
  width: 100%;
  height: 30px;
  border: none;
  background-color: #141414;
  color: #EBDBB2;
  outline: none;
  font-family: 'JetBrainsMono Nerd Font';
  font-size: 12px;
  padding: 5px;
  box-sizing: content-box;
  border-top: 1px solid #FABD2F;
}

body {
  transition: background-color 0.3s;
}

.theme-switch {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #fff;
  cursor: pointer;
  z-index: 1; /* Set z-index to 1 */
}

.theme-slider {
  width: 60px;
  height: 30px;
  background-color: #FABD2F;
  border-radius: 15px; /* Make it a rounded rectangle */
  display: flex;
  align-items: center;
  padding: 2px;
  transition: background-color 0.3s; /* Transition background color only */
}

.theme-slider:before {
  content: '';
  width: 26px;
  height: 26px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: transform 0.3s; /* Transition transform property only */
}

.theme-switch.active .theme-slider {
  background-color: #FABD2F; /* Change color when active */
}

.theme-switch.active .theme-slider:before {
  transform: translateX(30px);
}

#themeText {
  margin-left: 10px;
  color: #ffeeb5;
}