@import url('https://fonts.googleapis.com/css2?family=Asap:wght@500;600;700;900&family=Kanit:wght@100;400;500;600;700;800&family=Russo+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300;400;700&display=swap');
* {
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: #1a1a1d;
    font-family: Russo One, sans-serif;
    align-items: center;
    justify-content: center;
    display: flex;
    flex-direction: column;
    
}

body.quizBody {
    overflow: hidden;
}


a {
    list-style: none;
    text-decoration: none;
    color: inherit;

}

button:hover {
    cursor: pointer;
}

#sortTheme {
    background-color: aqua;
}
#datastructureTheme {
    background-color: coral;
}
#treesTheme {
    background-color: darkorchid;
}
#graphsTheme {
    background-color: forestgreen;
}
#hashingTheme {
    background-color: lightseagreen;
}
#runtimeComplexity {
    background-color: crimson;
}

/*------------------------- HEADER ----------------------*/

header {
    background: crimson;
    min-height: 63px;
    width: 100%;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-top: 0;
    padding-top: 0;
    color: #060606;
}

header .logo {
    float: left;
    height: inherit;
    margin-left: 2em;
}

header .logo-text {
    margin: 13px;
}

header ul {
  float: right;
  margin: 0px;
  padding: 0px;
  list-style: none;
    
}
header ul li {
    float: left;
    position: relative;
}

header ul li a {
    display: block;
    padding: 21px;
    font-size: 1.1em;
    text-decoration: none;
    transition: ease 0.3s;
    color: #1a1a1d;
}

header ul li a:hover {
    color: #fff;
}

header .menu-toggle {
    display: none;
  }

/*------------------------- </HEADER ----------------------*/

.temaer {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* To like store kolonner */
    grid-template-rows: repeat(auto-fit, minmax(100px, 1fr)); /* Automatisk antall rader som minst er 100px høye */
    gap: 20px; /* Avstand mellom elementene */
}

.tema {
    width: 400px;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 1rem 1rem 1rem -1rem #4e4b4b;

}

.tema h1 {
    border-bottom: 2px solid #000000;
}

.tema ul {
  margin: 0px;
  padding: 0px;
  list-style: none;
}

.tema ul li a {
    display: block;
    font-size: 1.5em;
    margin-top: 10px;
    text-decoration: none;
    transition: ease 0.3s;
    color: rgb(0, 0, 0);
    border-bottom: 1px solid #000000;
    transition: ease 0.3s;
}

.tema ul li a:hover {
    padding-left: 10px;
    transition: ease 0.3s;
}


.oversikt {
    margin-top: 30px;
   
}

.oversikt h1 {
    font-size: 40px;
    color: aliceblue;
    
}

.oversikt ol {
    margin: 0px;
    padding: 0px;
    list-style: none;
}

.oversikt ol li a {
    display: block;
    font-size: 1.5em;
    margin-top: 10px;
    text-decoration: none;
    transition: ease 0.3s;
    color: aliceblue;
    border-bottom: 1px solid #aba1a1;
    transition: ease 0.3s;
}

.oversikt ol li a:hover {
    border-bottom: 1px solid crimson;
}


.algorithms {
    margin-top: 10px;
    width: 90%;
    display: flex;
    flex-direction: column;
    color: aliceblue;
}

.algorithm {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* To like store kolonner */
    grid-template-rows: repeat(auto-fit, minmax(100px, 1fr)); /* Automatisk antall rader som minst er 100px høye */
    grid-gap: 20px; /* Avstand mellom elementene */
}

.algorithms h2 {
    font-size: 40px;
    margin-top: 50px;
    text-decoration: underline;
}

.algorithm img {
    max-width: 100%;
    max-height: 600px;
    object-fit: cover;
}

.algorithm p {
    margin-top: 20px;
    font-size: 20px;
    font-family: 'Roboto Mono', monospace;

}

.algorithm button {
    padding: 10px;
    background-color: aqua;
    font-family: 'Roboto Mono', monospace;
    font-size: 1.5rem;
    border: none;
    border-radius: 5px;
    color: #1a1a1d;
    transition: .3s ease;

}

.algorithm button:hover {
    background: rgba(0, 255, 255, .5);
    transition: .3s ease;
}


.code-container {
    border: 1px solid aqua;
    padding: 10px;
    cursor: pointer;
    width: 100%;

}

#placeholder {
    margin: 0;
    opacity: 1;
}

#code {
    display: none; 
    margin: 0;
    font-size: 20px;
    width: 100%;    
}

.code-container.show #placeholder {
    display: none; 
    
}

.code-container.show #code {
    display: block; 
}


.meny-graf {
    display: flex;
    align-items: center;
    justify-content: center;
}

.meny-graf #node {
    text-decoration: 3px solid underline;
    transition: ease .3s;
}

.meny-graf #node:hover {
    text-decoration: none;
    transition: ease .3s;
}

svg {
    margin-top: 20px;
    width: 90%;
    height: 1000px;
    transition: ease 0.3s;
}



.forklaringer {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px;
    width: 90%;
}


.grafTerminologi {
    color: aliceblue;
    padding: 20px;
    font-size: 50px;
}
.term {
    width: 100%;
    padding: 20px;
    border: 2px solid forestgreen;
    margin-bottom: 20px;
    color: aliceblue;
    font-family: 'Roboto Mono', monospace;
    margin: 5px;

  }

 .term a {
    text-decoration: 2px solid rgb(255, 255, 255) underline;
    font-weight: 600;
    transition: .3s ease;
 } 


 .term a:hover {
    text-decoration: none;
    transition: .3s ease;
 }
  .term h1 {
    margin-top: 0;
    text-decoration: 2px solid aliceblue underline;
  }

  .term img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
  }

  .mini-quiz {
    margin-top: 30px;
    color: aliceblue;
    width: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .mini-quiz h2 {
    align-self: flex-start;
    text-decoration: 2px solid underline;
    font-weight: 600;
    margin-bottom: 20px;
  }

  .choices {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  .choices button {
    background: none;
    border-bottom: 6px inset rgba(0,0,0,.5);
	border-left: 6px inset rgba(0,0,0,.5);
	border-right: 6px inset rgba(255,255,255,.5);
	border-top: 6px inset rgba(255,255,255,.5);
    transition: .3s ease;

  }

  .choices button:hover,button:active {
    background: rgba(255, 255, 255, 0.3);
    transition: .3s ease;
  }

  .choices p {
    padding: 10px;
    border-bottom: 2px solid forestgreen;
    border-right: 2px solid forestgreen;
    text-align: center;
  }

  .choices .selected-choice {
    height: 80px;
    padding: 10px;
    border-bottom: 2px solid forestgreen;
    border-right: 2px solid forestgreen;
  }
  .choices .selected-choice.correct{
    background: rgba(0, 255, 94, 0.5);
  }
  .choices .selected-choice.incorrect{
    background: rgba(255, 0, 0, 0.5);
  }
 
  #right-border {
    border-right: none;
  }
  #right-border-bottom {
    border-right: none;
    border-bottom: none;

  }
  #bottom-border {
    border-bottom: none;
  }

  .begreper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 90%;
    color: aliceblue;
    font-family: 'Roboto Mono', monospace;
  }
  
  .tabell {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    
  }
  
  .tabell td {
    border: 2px solid forestgreen;
    padding: 10px;
    text-align: center;
    
  }
  
  .tabell img {
    width: 100%;
    height: 300px;
  }


  .under-arbeid {
    width: 90%;
    height: 600px;
    background-color: rgb(126, 128, 129);
    color: #1a1a1d;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

.under-arbeid h1 {
    padding: 20px;
    font-size: 80px;
}

.under-arbeid a {
    padding: 20px;
    border: none;
    border-radius: 5px;
    background-color: crimson;
    font-size: 40px;
}

.go-to-quiz {
    margin-top: 30px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;

    color: aliceblue;

}

.go-to-quiz h2 {
    font-size: 2rem;
    margin-right: 30px;
    word-wrap: break-word;

}

.go-to-quiz i {
    margin-right: 30px;
    font-size: 2.5rem;
}

.go-to-quiz a {
    background: transparent;
    padding: 10px 10px;
    border: 2px solid aqua;
    border-radius: 5px;
    outline: none;
    text-align: center;
    font-size: 2rem;
    transition: .3s ease;

}

.go-to-quiz a:hover {
    background: rgba(0, 213, 255, 0.384);
    transition: .3s ease;
}


#scrollToTopButton {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    font-size: 16px;
    cursor: pointer;
    outline: none;
    background: crimson;
    color: #1a1a1d;
    border-radius: 3px;
    border: 1px solid #1a1a1d;
    padding: 5px;
  }


  
@media (max-width: 1250px) {
    .temaer {
        grid-template-columns: repeat(2, 1fr); /* To like store kolonner */
    }

    .algorithm {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    #copy-button {
        width: 100%;
    }

    .forklaringer {
        grid-template-columns: repeat(2, 1fr); /* To like store kolonner */
    }

    .term {
        width: 100%;
    }


}

@media (max-width: 850px) {
    .temaer {
        grid-template-columns: repeat(1, 1fr); 
        margin-bottom: 20px;
    }

    .algorithms h2 {
        font-size: 2rem;
    }

    .algorithm p{
        font-size: 1rem;
    }

    .forklaringer {
        display: grid;
        grid-template-columns: repeat(1, 1fr); 
        gap: 10px;
    }

    .choices p {
        font-size: 12px;
    }
    .choices .selected-choice {
    height: auto;
    }
}

@media (max-width: 600px) {
    header {
        position: relative;
    }

    header h1 {
        font-size: 1.2rem;
    }
  
    header ul {
          width: 100%;
          max-height: 0px;
          overflow: hidden;
          transition: height 0.5s ease;

      }
  
    .nav.showing {
        max-height: 100em;
        transition: height 0.5s ease;
    }

    header ul li {
        width: 100%;
    }

    header ul li a {
        margin-top: 10px;
        text-align: center;
        padding: 5;
        transition: ease 0.3s;
        background: inherit;
        border-top: 1px solid rgba(0, 0, 0, 0.3);
        width: 100%;
    }

    header .menu-toggle {
        display: block;
        right: 20px;
        top: 20px;
        font-size: 1.9em;
        position: absolute;
        transition: height 0.5s ease;
        
    }

    header .logo {
        float: left;
        height: inherit;
        margin-left: .5em;
    }
    
    header .logo-text {
        margin: 13px;
        font-family: Russo One,sans-serif;
    }


    .algorithms h2 {
        font-size: 1.5rem;
    }
    .algorithm img{
        width: 100%;
    }

    .grafTerminologi {
        font-size: 2rem;
    }

    svg {
        margin-top: 5px;
        width: 100%;
        height: auto;
    }

    .under-arbeid {
        width: 90%;
        height: auto;
        margin-top: 10px;
        border-radius: 5px;

    }
    
    .under-arbeid h1 {
        padding: 5px;
        font-size: 20px;
    }
    
    .under-arbeid a {
        text-align: center;
        width: 100%;
        padding: 10px;
        border: none;
        border-radius: 5px;
        background-color: crimson;
        font-size: 10px;
        border-radius: 0px 0px 5px 5px;
    }

    code {
        font-size: 12px;
        word-wrap: break-word;
    }
    #scrollToTopButton {
        bottom: 10px;
        right: 10px;
        font-size: 14px;
      }

}



@media (max-width: 400px) {
    .tema {
        width: 300px;
    }

    .tema h1 {
        font-size: 1.2rem;
    }

    .tema ul li a {
        font-size: .8rem;
    }

    .term h1 {
        font-size: 1.2rem;
    }

    .term:last-child {
        margin-right: 0;
      }

    .tabell td {
        font-size: 12px;
      }

    .term {
      flex: 1;
      margin-right: 20px;
    }

    .algorithms h2 {
        font-size: 1.2rem;
    }

    .link-quiz {
        position: relative;
    }

    .go-to-quiz {
        width: 90%;
    }

    .go-to-quiz h2 {
        font-size: 1rem;
        word-wrap: break-word;
    }
    .go-to-quiz a {
        font-size: 1rem;
    }


  

    
}



 
    



