/*
hey there! this is the CSS file for my personal website,
feel free to use it as a template or reference for your own projects!
it's based on sadgrl.online's design, but i made a lot of changes to make it my own.
*/

/* =========================================================
   THEME VARIABLES
========================================================= */

:root {
  /* Images */
  --body-bg-image: url("../images/background-mid-quality.webp");

  /* Core Colors */
  --color-body-bg: #1b2e23;
  --color-body-text: #e7f1de;
  --color-strong-text: #da3636;

  /* Links */
  --color-link: #96e353;
  --color-link-hover: #da3636;

  /* Layout Sections */
  --color-topbar-bg: #314325;
  --color-navbar-bg: #314325;
  --color-header-bg: #5e8937;
  --color-sidebar-bg: #3b4c2c;
  --color-main-bg: #455933;
  --color-footer-bg: #314325;

  /* Components */
  --color-box-bg: #324427;
  --color-box-border: #5e8937;
  --color-heading: #d9ffaa;

  /* Layout */
  --website-width: 950px;
  /* Yo if you are copying my code,
  don't forget to change media query breakpoints! */
}

/* =========================================================
   FONTS
========================================================= */

@font-face {
  font-family: "MS-Gothic-Fallback";
  src:
    url("../fonts/MS-Gothic.ttf.woff") format("woff"),
    url("../fonts/MS-Gothic.ttf.svg#MS-Gothic") format("svg"),
    url("../fonts/MS-Gothic.ttf.eot"),
    url("../fonts/MS-Gothic.ttf.eot?#iefix") format("embedded-opentype");
  font-weight: normal;
  font-style: normal;
}

/* =========================================================
   GLOBAL RESETS
========================================================= */

* {
  box-sizing: border-box;
  scrollbar-color: var(--color-sidebar-bg) var(--color-body-bg);
}

::-webkit-scrollbar-track {
  background: var(--color-body-bg);
  border-left: 2px ridge var(--color-header-bg);
  border-top: 2px ridge var(--color-header-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-sidebar-bg);
  border: 2px outset var(--color-header-bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-header-bg);
}

html,
body {
  min-height: 100%;
}

body {
  line-height: 1.5;
  margin: 0;
  font-family: "MS Gothic", "MS-Gothic-Fallback", monospace, sans-serif;
  color: var(--color-body-text);
  background-color: var(--color-body-bg);
  background-image: var(--body-bg-image);
  background-position: center top;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: auto;
}

hr {
  border: none;
  border-top: 4px ridge var(--color-header-bg);
}

strong {
  font-weight: bold;
  color: var(--color-strong-text);
}

/* =========================================================
   LAYOUT STRUCTURE
========================================================= */

#container {
  max-width: var(--website-width);
  margin: 60px auto 40px;
  border: 4px ridge var(--color-header-bg);
}

#flex {
  display: flex;
}

/* =========================================================
   HEADER
========================================================= */

header img {
  display: block;
  width: 100%;
  height: auto;
}

/* =========================================================
   NAVIGATION
========================================================= */

#navbar {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 5px 0;
  width: 100%;
  background-color: var(--color-navbar-bg);
  margin-bottom: 0;
}

#navbar ul {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

#navbar li {
  display: flex;
  align-items: center;
}

#navbar a {
  text-decoration: none;
  font-weight: 800;
  color: var(--color-link);
}

#navbar a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

/* =========================================================
   SIDEBARS & MAIN CONTENT
========================================================= */

aside {
  line-height: 1.25;
  width: 250px;
  padding: 20px;
  font-size: small;
  background-color: var(--color-sidebar-bg);
}

main {
  flex: 1;
  padding: 20px;
  background-color: var(--color-main-bg);
  order: 2;
  min-width: 0;
}

#sidebar-left {
  order: 1;
  margin-right: 0;
}
#sidebar-right {
  order: 3;
  margin-left: 0;
}

/* =========================================================
   FOOTER
========================================================= */

footer {
  height: auto;
  padding: 10px;
  background-color: var(--color-footer-bg);
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

footer .footer-text {
  flex: 1;
  text-align: center;
}

footer img {
  max-width: 100%;
  height: auto;
  margin-left: auto;
}

/* =========================================================
   TYPOGRAPHY
========================================================= */

h1,
h2,
h3 {
  color: var(--color-heading);
}

h1 {
  font-size: clamp(20px, 4vw, 28px);
}

#container a {
  font-weight: bold;
  color: var(--color-link);
}

#container a:hover {
  color: var(--color-link-hover);
}

pre {
  overflow-x: auto;
  max-width: 100%;
  padding: 10px;
}

code {
  word-wrap: break-word;
}

/* =========================================================
   COMPONENTS
========================================================= */

.box {
  padding: 10px;
  background-color: var(--color-box-bg);
  border: 4px ridge var(--color-box-border);
  min-width: 0; /* Might remove */
  word-wrap: break-word; /* Might remove */
  overflow-wrap: break-word; /* Might remove */
}

.box ul {
  padding-left: 10px;
}

.blog-image {
  max-width: 100%;
  height: auto;
  border: 4px ridge var(--color-box-border);
}

.image-container {
  text-align: center;
  margin: 20px 0;
}

.image-caption {
  display: block;
  margin-top: 8px;
  color: var(--color-body-text);
  opacity: 0.8;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 750px) {
  #container {
    margin: 0px; /* Might change this, idk. */
    border: 4px outset var(--color-header-bg);
  }

  #flex {
    flex-wrap: wrap;
  }

  aside {
    width: 100%;
  }

  main {
    order: 1;
  }
  #sidebar-left {
    order: 2;
  }
  #sidebar-right {
    order: 3;
  }
  #navbar ul {
    flex-wrap: wrap;
  }
}

/* =========================================================
   GIF BACKGROUND LAYER
========================================================= */

#gif-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
  opacity: 1;
}

.random-gif {
  position: absolute;
  user-select: none;
  will-change: transform;
  transform: translate(-50%, -50%) rotate(var(--rot));
  animation: float var(--duration) ease-in-out infinite;
}

.random-gif:hover {
  transform: translate(-50%, -50%) rotate(var(--rot)) scale(1.15);
  filter: drop-shadow(0 0 8px rgba(120, 200, 120, 0.6));
}

@keyframes float {
  0% {
    transform: translate(-50%, -50%) rotate(var(--rot)) translateY(0);
  }
  50% {
    transform: translate(-50%, -50%) rotate(var(--rot))
      translateY(calc(-1 * var(--float)));
  }
  100% {
    transform: translate(-50%, -50%) rotate(var(--rot)) translateY(0);
  }
}

/* =========================================================
   BUTTON
========================================================= */
button {
  background-color: var(--color-box-border);
  padding: 5px 10px;
  border: 4px outset var(--color-box-border);
  color: var(--color-body-text);
  cursor: pointer;
}

button:hover {
  background-color: var(--color-box-bg);
  border: 4px inset var(--color-box-border);
}

button:disabled {
  background-color: var(--color-box-bg);
  border: 4px inset var(--color-box-border);
  color: var(--color-body-text);
  opacity: 0.6;
  cursor: not-allowed;
}

/* =========================================================
   FILE UPLOAD DROPZONE
========================================================= */
#drop-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 2rem;
  border: 4px dashed var(--color-box-border);
  cursor: pointer;
}

#gameInfo .box {
  text-align: center;
}

/* =========================================================
   STATUS CAFE WIDGET
========================================================= */

aside iframe {
  width: 100%;
}

/* =========================================================
   LISTS
========================================================= */

ol li::marker {
  color: var(--color-strong-text);
}