/* these are the site colors, replace them with anything you want!
 * this version is simplified for easier color swapping!*/
:root {
  /* CHANGED: Swapped .gifv to .gif so browsers can render the raw image file */
  --site-bg: url("https://i.pinimg.com/1200x/17/ed/70/17ed706acb5b2c78308856f93b7cb129.jpg");
  
  /* Solid color backup: */
  /* --site-bg: #FFE1C6; */
  
  --post-bg: white;
  --hover-color: #FFE1C6;
  --post-text: #80593c;
  --button-bg: #fcdee0;
  --border-color: #FFFAF4;
  --accent-color: #4f3624;
  --border-shadow: #fadce5;
  
  /* Text selection highlight colors */
  --selected-bg: #bde0ff;
  --selected-text: #5244c8;
}

/* Custom Fonts */
@font-face {
  font-family: "Gaegu", sans-serif;
  font-weight: 400;
  font-style: normal;
}

 @font-face {
      font-family: "rainy";
      src: url("https://files.catbox.moe/r4oudq.ttf");
}
@font-face {
  font-family: "Gaegu", sans-serif;
  font-weight: 700;
  font-style: Bold;
}


html {
  scroll-behavior: smooth;
}

::selection {
  background: var(--selected-bg);
  color: var(--selected-text);
}

* {
  box-sizing: border-box;
  scrollbar-color: var(--accent-color) var(--post-bg);
  scrollbar-width: thin;
}

body {
  font-family: 'rainy', Verdana, Tahoma, sans-serif;
  font-size: 16px;
  margin: 0;
  background: var(--site-bg);
  color: var(--post-text);
  line-height: 1.6em;
  background-attachment: fixed;
  background-size: cover; /* Ensures the background image spans the viewport */
  background-repeat: no-repeat;
}

/* Special font for headings & buttons */
h1,
nav,
.pinned summary {
  font-family: 'Gaegu', Verdana, Tahoma, sans-serif;
  font-weight: bold;
}

details > summary,
#tag-filters label {
  cursor: pointer;
}

/* Quick helper classes */
.center { text-align: center; }
.small-text { font-size: smaller; }
.no-border { border: none; padding: 0; }

.mobile-only { display: none; }
.pc-only { display: block; }

.flex {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
}

#container {
  max-width: 1200px;
  margin: auto;
}

main {
  width: 600px;
  position: absolute;
  margin-left: 300px;
}

/* Sidebar Styles */
#sidebar {
  background: var(--border-color);
  margin-left: 20px;
  padding: 2em 1em;
  width: 240px;
  border-inline: 2px dashed var(--accent-color);
  outline: 4px solid var(--border-color);
  position: fixed;
  z-index: 99;
  height: 100%;
  overflow-y: auto;
}

#sidebar h1 { margin-block: .5em; }
#sidebar a { color: var(--post-text); }
#sidebar h1 a { font-size: 1.2em; }
#sidebar h1 a,
#sidebar a:hover { text-decoration: none; }

#icon { margin: auto; }
#icon img {
  border-radius: 50%;
  max-width: 200px;
}
#icon a img {
  outline: 2px solid var(--border-color);
  transition: .2s;
}
#icon a img:hover {
  outline: 2px solid var(--post-text);
  outline-offset: 4px;
}

#profile p {
  margin-block: .3em;
  line-height: 1.5em;
}

#bio {
  border-block: 2px dashed var(--accent-color);
  padding-block: .5em;
  margin-block: 1em;
  font-size: small;
}

/* Sidebar Navigation */
#sidebar nav { margin-block: 1.5em; }
#sidebar nav ul {
  text-align: center;
  vertical-align: middle;
  margin-top: 0;
  margin-bottom: 1em;
  padding: 0;
  list-style-type: none;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 8px;
  justify-content: space-evenly;
}
#sidebar nav li a {
  min-width: 120px;
  display: inline-block;
  background: var(--button-bg);
  color: var(--post-text);
  font-weight: bold;
  border-radius: 1rem;
  outline: 2px solid #fff0;
  transition: .2s;
  text-decoration: none;
}
#sidebar nav li a:visited { color: var(--post-text); }
#sidebar nav li a:hover {
  background: var(--hover-color);
  color: var(--accent-color);
  outline: 2px solid var(--post-text);
  outline-offset: 3px;
}

/* Pinned Blocks (Status & Tags) */
.pinned {
  background: var(--button-bg);
  font-size: smaller;
  padding: .5em;
  border-radius: 1em;
  margin: 1em 0;
  border: 2px solid var(--border-color);
  outline: 2px solid var(--post-bg);
  box-shadow: 2px 2px 6px var(--border-shadow);
}
.pinned summary {
  color: var(--post-text);
  font-size: 1.5em;
  font-weight: bold;
  border-bottom: 2px dashed var(--border-color);
  margin: .5em;
}
.pinned time {
  font-family: 'Gaegu', Verdana, Tahoma, sans-serif;
  float: right;
  font-weight: normal;
  font-size: small;
}

#status ul {
  background: var(--post-bg);
  margin: .5em;
  padding: .5em;
  border-radius: .5em;
}
#status li {
  list-style-type: none;
  padding: .2em;
}
#status li:nth-child(odd) {
  font-weight: bold;
  font-size: 1.2em;
  color: var(--accent-color);
}
#status li:nth-child(even) {
  background: var(--button-bg);
  color: var(--post-text);
  border-radius: .3em;
  padding-inline: .8em;
}
#status li a { color: var(--post-text); }
#status li a:hover { text-decoration: none; }

/* Post Styling */
.post {
  background: var(--post-bg);
  color: var(--post-text);
  border-radius: 1rem;
  padding: 0 .8rem .2rem .8rem;
  margin-bottom: 1em;
  box-shadow: 2px 2px 6px var(--border-shadow);
  min-width: 100%;
}
.post img { max-width: 100%; }
.post div + img { margin-top: 1em; }

.post-header {
  color: var(--accent-color);
  font-weight: bold;
  padding: .5rem 0;
  border-bottom: 2px dashed var(--border-color);
}
.post time {
  float: right;
  font-weight: normal;
  font-size: smaller;
  margin: .2em;
}
.post a { color: var(--post-text); }
.post a:hover { text-decoration: none; }

.post li {
  list-style-image: url("images/star.png");
}

.readmore { margin-bottom: 1em; }
.readmore summary {
  font-weight: bold;
  color: var(--accent-color);
  list-style-type: none;
}
.readmore[open] > summary { display: none; }
.readmore[open] {
  border-top: 2px dashed var(--button-bg);
  padding-top: 1em;
}

.tags {
  border-top: 2px dashed var(--border-color);
  padding: .4em 0;
}
.tags a { color: var(--post-text); }
.tags span { color: var(--accent-color); }
.tags a, .tags span {
  font-size: small;
  padding: .2em .5em;
  border-radius: 1em;
  text-decoration: none;
}
.tags a:hover {
  background: var(--button-bg);
  text-decoration: underline;
}

/* Tag Filters Logic */
.tagged:has(input:checked) article { display: none; }

.tagged:has(#all:checked) article,
.tagged:has(#intro:checked) article[class~="intro"],
.tagged:has(#personal:checked) article[class~="personal"],
.tagged:has(#secret:checked) article[class~="secret"],
.tagged:has(#art:checked) article[class~="art"] { display: inline-block; }

#tag-filters label {
  background: var(--button-bg);
  border: 1px solid var(--accent-color);
  border-radius: .5em;
  display: inline-block;
  margin-left: .5em;
  margin-block: .3em;
  padding: 0 .8em 0 .1em;
}
#tag-filters label:hover {
  background: var(--hover-color);
  text-decoration: underline;
}
#tag-filters label:has(input:checked) {
  background: var(--border-color);
  color: var(--post-text);
  text-decoration: underline;
  font-weight: bold;
}
#tag-filters label:has(input:checked):hover {
  background: var(--hover-color);
  text-decoration: none;
}
#tag-filters input { appearance: none; }

/* Navigation & Footer */
#page-nav a { color: var(--post-text); }
#page-nav a:hover { text-decoration: none; }

footer {
  color: var(--post-text);
  background: var(--border-color);
  z-index: 100;
  position: fixed;
  margin-left: 22px;
  width: 236px;
  bottom: 4px;
  font-size: small;
  opacity: 60%;
  text-align: center;
}

/* Responsive Layout */
@media only screen and (max-width: 800px) {
  .mobile-only { display: block; }
  .pc-only { display: none; }
  #container {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
  }
  #sidebar, main {
    position: static;
    height: auto;
    flex: 100%;
    max-width: none;
  }
  #sidebar {
    border-inline: none;
    margin-left: 0;
    padding: 1em;
    padding-bottom: 0;
  }
  #icon {
    max-width: 40%;
    margin-right: .5em;
  }
  #icon img { max-width: 100%; }
  #sidebar nav { margin-block: .5em; }
  main {
    left: 0;
    margin-inline: 1em;
  }
  #profile { flex: 2; }
  #profile p {
    margin-block: 0;
    margin-left: 10px;
  }
  #bio {
    border: none;
    padding-block: 0;
  }
  footer {
    position: static;
    text-align: center;
    background: none;
    margin: 0;
    width: 100%;
    opacity: 100%;
  }
}