@import url('https://fonts.googleapis.com/css2?family=Tourney:ital,wght@0,600..900;1,600..900&display=swap');

@font-face {
  font-family: "Tourney";
  src: 
  local("Tourney-Regular.ttf")
  url("./fonts/Tourney/static/Tourney-Medium.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Tourney";
  src: 
  local("Tourney-Italic-Italic.ttf")
  url("./fonts/Tourney/static/Tourney-SemiBold.ttf") format("truetype");
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: "Komika";
  src: 
  local("Komika_display.ttf")
  url("./fonts/Komika-Display/Komika_display.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Komika";
  src: url("./fonts/Komika-Display/Komika_display_bold.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "Komika";
  src: url("./fonts/Komika-Display/Komika_display_kaps.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Komika";
  src: url("./fonts/Komika-Display/Komika_display_kaps_bold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
}

:root{
  --primary-color: #11121a;
  --secondary-color: rgba(70, 235, 235, 1);

  --line-clr: rgba(245, 10, 28, 0.08);
  --secondary-line-clr: rgba(251, 10, 38, 1);
  
  --hover-clr: rgb(47, 53, 47);
  
  --primary-text-clr: rgba(50, 205, 50, 1);
  --secondary-text-clr: rgba(50, 205, 50, 1);
  
}
*{
  margin: 0;
  padding: 0;
}
html{
  font-family: "Tourney", "Komika",'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
  line-height: 1.5rem;
}
body{
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--primary-color);
  background: url(https://firefox-settings-attachments.cdn.mozilla.net/main-workspace/newtab-wallpapers-v2/55b678ff-15c3-49d5-bdbc-40f8413cfb8a.avif);
  background-size: cover;
  background-repeat: no-repeat;
  color: var(--primary-text-clr);
  display: grid;
  grid-template-columns: auto 1fr;
}
#sidebar{
  box-sizing: border-box;
  height: 100vh;
  width: 250px;
  padding: 5px 1em;
  background-color: var(--line-clr);
  backdrop-filter: blur(8px);
  border-right: 1px solid var(--line-clr);

  position: sticky;
  top: 0;
  align-self: start;
  transition: 300ms ease-in-out;
  overflow: hidden;
  word-wrap: no;
}
#sidebar.close{
  padding: 5px;
  width: 60px;
}
#sidebar ul{
  list-style: none;
}
#sidebar > ul > li:first-child{
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
  .logo{
    font-weight: 600;
  }
}
#sidebar ul li.active a{
  color: var(--secondary-color);

  svg{
    fill: var(--secondary-color);
  }
}

#sidebar a, #sidebar .dropdown-btn, #sidebar .logo{
  border-radius: .5em;
  padding: .85em;
  text-decoration: none;
  color: var(--primary-text-clr);
  display: flex;
  align-items: center;
  gap: 1em;
}
.dropdown-btn{
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}
#sidebar svg{
  flex-shrink: 0;
  fill: var(--primary-text-clr);
}
#sidebar a span, #sidebar .dropdown-btn span{
  flex-grow: 1;
}
#sidebar a:hover, #sidebar .dropdown-btn:hover{
  background-color: var(--hover-clr);
}
#sidebar .sub-menu{
  display: grid;
  grid-template-rows: 0fr;
  transition: 300ms ease-in-out;

  > div{
    overflow: hidden;
  }
}
#sidebar .sub-menu.show{
  grid-template-rows: 1fr;
}
.dropdown-btn svg{
  transition: 200ms ease;
}
.rotate svg:last-child{
  rotate: 180deg;
}
#sidebar .sub-menu a{
  padding-left: 2em;
}
#toggle-btn{
  margin-left: auto;
  padding: 1em;
  border: none;
  border-radius: .5em;
  background: none;
  cursor: pointer;

  svg{
    transition: rotate 150ms ease;
  }
}
#toggle-btn:hover{
  background-color: var(--hover-clr);
}

main{
  padding: min(30px, 7%);
}
p:first-of-type, p:last-of-type, p:nth-of-type(4), p:nth-of-type(2){
  text-indent: 30px;
}
main p{
  color: var(--secondary-text-clr);
  margin-top: 5px;
  margin-bottom: 15px;
}
.container{
  border-right: 8px double var(--secondary-line-clr);
  border-bottom: 8px double var(--secondary-line-clr);
  border-left: 4px solid var(--line-clr);
  border-top: 4px solid var(--line-clr);
  border-radius: 1em;
  margin-bottom: 20px;
  padding: min(3em, 15%);
  background-color: rgba(48, 69, 48, 0.05);
  backdrop-filter: blur(8px);
  h2, p { margin-top: 1em }
}

@media(max-width: 800px){
  body{
    grid-template-columns: 1fr;
  }
  main{
    padding: 2em 1em 60px 1em;
  }
  .container{
    /*border: none;*/
    padding: 0;
    /*Added below attributes to give a similiar feel to PC view*/
    border-right: 8px double var(--secondary-line-clr);
  border-bottom: 8px double var(--secondary-line-clr);
  border-left: 4px solid var(--line-clr);
  border-top: 4px solid var(--line-clr);
    border-radius: 1em;
    margin-bottom: 20px;
    padding: min(3em, 15%);
    background-color: rgba(48, 69, 48, 0.05);
    backdrop-filter: blur(8px);
    h2, p { margin-top: 1em }
  }
  #sidebar{
    height: 60px;
    width: 100%;
    border-right: none;
    border-top: 1px solid var(--line-clr);
    padding: 0;
    position: fixed;
    top: unset;
    bottom: 0;
    z-index: 9;

    > ul{
      padding: 0;
      display: grid;
      grid-auto-columns: 80px;
      grid-auto-flow: column;
      align-items: center;
      overflow-x: scroll;
    }
    ul li{
      height: 100%;
    }
    ul a, ul .dropdown-btn{
      width: 60px;
      height: 60px;
      padding: 0;
      border-radius: 0;
      justify-content: space-evenly;
    }

    ul li span, ul li:first-child, ul li:nth-child(3), .dropdown-btn svg:last-child{
      display: none;
    }

    ul li .sub-menu.show{
      position: fixed;
      bottom: 60px;
      left: 0;
      box-sizing: border-box;
      height: 60px;
      width: 100%;
      margin-left: 4px;
      background-color: var(--hover-clr);
      border-top: 1px solid var(--line-clr);
      display: flex;
      justify-content: center;

      > div{
        overflow-x: auto;
      }
      li{
        display: flex;
        flex-direction: row;  
      
      }
      a{
        box-sizing: border-box;
        padding: 1em;
        width: auto;
        justify-content: center;
      }
    }
  }
}