* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-padding-top: 80px;

    font-size: 16px;

    scroll-behavior: smooth; 
    -ms-overflow-style: none;  /*For Old IE / Edge to  hide scroll bar*/
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    display: flex;
    flex-direction: column;
    padding-top: 5rem;

    font-family: Arial, sans-serif;
    color: #f5f5f5;

    background-color: rgb(13, 27, 53);
    user-select: none;
}

main {
    flex: 1;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    border-bottom: 1px solid rgb(84, 207, 255);

    text-align: center;

    background-color: rgb(13, 27, 53);
}

#reycademy-logo {
    width: 8rem;
}

h2 {
    padding-bottom: 5px;

    color: rgb(84, 207, 255);
    font-size: 1.3rem;
    font-weight: bold;
}

#brand {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

nav ul {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem;

    list-style: none;
}

nav ul.show {
    display: flex;
}

nav a {
    color: #ccc;
    margin: 0 15px;
    text-decoration: none;
}

nav a:hover {
    color: rgb(84, 207, 255);
}

#authentication {
    margin: 0;
    padding: 10px;

    color: black;
    text-decoration: none;

    background-color: rgb(84, 207, 255);
    border: 1px solid rgb(84, 207, 255);
    border-radius: 4px;
}

#authentication:hover {
    background-color: rgb(65, 184, 231);
}

#hamburger-icon {
    color: white;
    font-size: 1.5rem;    

    background: none;
    border: none;

    cursor: pointer;
}

#hero {
    margin: 2rem 0.875rem 3rem;

    text-align: center;
}

#hero-heading {
    font-size: 2rem;
    color: rgb(84, 207, 255);
    margin: 0.875rem;
}

#hero p {
    font-size: 1.1rem;
    padding: 1rem;
    color: #aaa;
}

#search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#search-bar {
    padding: 5px;
    width: clamp(1rem, 50%, 15rem);
    
    text-align: center;

    border: none;
    outline: none;
    border-radius: 15px;
}

#search-bar:focus {
     outline: 2px solid rgb(84, 207, 255);
}

#search-container i:hover {
    color: rgb(84, 207, 255);
}

#videos {
    padding: 40px 10px;

    text-align: center;

    background-color: rgb(7, 14, 26);
    border-top: 1px solid rgb(84, 207, 255);
}

#videos h2 {
    font-size: 1.6rem;
    color: white;
}

#videos p {
    margin: 10px;
    
    font-size: 0.775rem; 
    color: #aaa;
}

#video-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 2rem 15px;
}

.video-bar {
    padding: 10px;

    color: black;

    background-color: rgb(84, 207, 255);
    border-radius: 20px;
}

.video-bar h3 {
    font-size: 0.875rem;
}   

.video-bar:hover {
    background-color: rgb(65, 184, 231);
}

#video-list {
   display: flex;
   flex-wrap: wrap;
   justify-content: center;
   gap: 20px;

}

.video-card {
    padding: 15px;
    width: 90%;

    text-align: center;

    background-color: rgb(13, 27, 53);
    border: 1px solid rgb(84, 207, 255);
    border-radius: 8px;
}

.difficulty {
    padding: 5px;

    color: black;

    background-color: lime;
    border-radius: 5px;
}

.video-card iframe {
    width: 100%;
    height: 170px;
    border: none;
    border-radius: 4px;
}

.video-card h3 {
    margin: 10px 0 5px;

    color: rgb(84, 207, 255);
}

.video-card p {
    margin: 16px;
    word-wrap: break-word;
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 0.875rem;
}

.video-button {
    padding: 5px;
    width: 30%;

    color: black;

    background-color: rgb(84, 207, 255);
    text-decoration: none;
    border-radius: 5px; 
}

.video-button:hover {
    background-color: rgb(65, 184, 231);
}

.cheatsheet {
    margin: auto;
    padding: 5px;
    width: 64%;

    background-color: rgb(84, 207, 255);
    text-decoration: none;
    border-radius: 5px; 
}

.cheatsheet a {
    color: black;
    text-decoration: none;
}

.cheatsheet:hover {
    background-color: rgb(65, 184, 231);
}

.video-meta {
    margin-top: 1rem; 
    display: flex;
    justify-content: center;
}

.author-pic {
    width: 2rem;
    height: 2rem;

    border-radius: 50%;
    object-fit: cover;
}

.teacher {
    color: #aaa;
    text-decoration: none;
}

.teacher:hover {
    text-decoration: underline;
}

footer {
    padding: 1.5rem;

    font-size: 0.9em;
    text-align: center;

    background-color: rgb(13, 27, 53);
    border-top: 1px solid rgb(84, 207, 255);
}

#platforms {
    display: flex;
    justify-content: center;
    gap: 25px;
}

#platforms a{
    text-decoration: none;
}

footer p {
    margin: 1rem;
}

footer p a { 
    color: white;

    text-decoration: none;
}

footer p a:hover {
    color: skyblue;

    text-decoration: underline;
}

.legal-container {
    color: white;
    text-decoration: none;
}

.legal-container:hover {
    color: skyblue;

    text-decoration: underline;
}

@media (max-width: 301px) {
  body::before {
    content: "You can't view Reycademy at 301px or less. Enjoy the void :)";
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    height: 100vh;

    font-size: 24px;
    text-align: center;
    color: white;

    background: black;
  }

  body > * {
    display: none;
  }
}

@media (min-width: 768px) {

    header {
        flex-direction: row;
    }

    #brand {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 0;
    }

    nav ul {
        display: flex;
        flex-direction: row;
        padding: 0.700rem;
        gap: 0;
    }

    #hamburger-icon {
       display: none;
    }

    .video-card {
        width: 350px;
    }
}

@media (min-width: 900px) {
    .video-card {
        width: 400px;
    }
    
    #video-container {
        display: flex;   
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 20px;
    }

    .video-bar {
        padding: 15px;
        width: 18%;

        background-color: rgb(84, 207, 255);
        color: black;
        border-radius: 20px;
    }
}

@media (min-width: 1024px) {

    header {
        flex-direction: row;
    }

    #reycademy-logo {
        width: 10rem;
    }   

    h2 {
        font-size: 1.5rem;
    }   

    #hero {
        margin: 2rem 1.2rem 3rem;
    }

    #hero-heading {
        font-size: 3rem;
    }

    nav a {
        display: inline;
    }

    nav a:hover {
        color: rgb(84, 207, 255);
    }

    #videos h2 {
        font-size: 2.5rem;
    }

    #videos p {   
        font-size: 0.875rem; 
    }

    .video-bar h3 {
        font-size: 1rem;
    }
    
    .video-card {
        width: 350px;
    }
}