/* Reset some default browser styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

/* Define custom fonts */
@font-face { /* Portal font */
    font-family: 'portal';
    src: url('fonts/portal.ttf') format('truetype');
}

@font-face { /* Lucon font */
    font-family: 'lucon';
    src: url('fonts/lucon.ttf') format('truetype');
}

@font-face { /* UniversLTStd font */
    font-family: 'UniversLTStd';
    src: url('fonts/UniversLTStd.ttf') format('truetype');
}

/* Set a default font for the entire document */
body {
    font-family: 'lucon', Arial, sans-serif;
    line-height: 1.6;
    background-image: url('Images/whitebackground.jpg'); /* Path to background image */
    background-size: 100% 100%; /* Make the background covers the entire page */
    background-position: center; /* Center background image */
    background-repeat: no-repeat; /* Do not repeat the background image */
    background-attachment: fixed; /* Make the background image fixed */
}

/* Style for headers */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-weight: bold;
}

/* Style for paragraphs */
p {
    margin-bottom: 1rem;
}

/* Style for links */
a {
    color: #ff5d00;
    text-decoration: none;
    font-weight: bold;
}
a:hover {
    color: #ff9a00;
}

/* Container class for layout */
.container {
    display: flex;
    flex-direction: column;
    width: 900px;
    max-width: 100%;
    margin: 30px auto;
    padding: 40px;
    border: 3px solid #00a2ff;
    border-radius: 15px;
    background-color: white;
    box-shadow: 0px 0px 8px #00a2ff; 
}

button {
    transition: background-color 0.2s ease, box-shadow 0.2s ease; /* Smooth transition for button hover */
    display: inline-block;
    padding: 0.8rem 2rem;
    border: none;
    cursor: pointer;
    background-color: #ff9a00;
    font-size: larger;
    box-shadow: #ff9a00 0px 0px 8px;
    font-weight: bold;
    color: white;
    
}
button:hover {
    background-color: #00a2ff;
    box-shadow: #00a2ff 0px 0px 10px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.3s ease;
}
img {
    max-width: 100%;
}

#videotop {
    position: relative;
    width: 100%;
}

#background-video {
    position: relative;
    max-width: 100%;
    min-height: 100%;
    mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
}

#portal-logo {
    position: absolute;
    top: 100px;
    max-width: 90%;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-family: 'portal';
    text-shadow: 1px 1px 15px black;
    
    /* clamp is a function that takes three parameters: 
    the minimum value, the preferred value, and the maximum value. */
    font-size: clamp(90px, 20vw, 300px); 
}

#portalgun-image {
    display: block;
    max-width: 40%;
    margin: 20px auto;
    animation: floating 2s infinite ease-in-out;
}
#logostrip {
    display: block;
    max-width: 70%;
    margin: 20px auto;
    filter: brightness(0.9);
}
#introduction {
    text-align: center;
    margin: 20px auto;
    text-transform: uppercase;
}
#Chell-splash {
    display: flex;
    position: relative;
    justify-content: center;
    align-items: center;
    max-height: 600px;
    margin: 0px auto;
    margin-bottom: -250px;
    z-index: -2;
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}
#background-cubes {
    display: flex;
    position: relative;
    width: 100%;
    max-width: 1400px;
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    margin: 0 auto;
    z-index: -1;
}
#black-background {
    display: block;
    position: absolute;
    width: 100%;
    height: 1400px;
    background-color: black;
    mask-composite: intersect; /* Allows the two masks to work at the same time */
    mask-image: linear-gradient(to top, black 80%, transparent 100%), 
                linear-gradient(to bottom, black 80%, transparent 100%);
    z-index: -3;
    margin: 0 auto;
}

#firstblock {
    position: flex;
    position: relative;
    background-color: rgba(0, 0, 0, 1);  
    color:white;
    margin-top: -540px;
}
#documentary-thumbnail {
    display: flex;
    max-width: 90%;
    margin: 20px auto;
    border:#FF0000 1px solid;
    border-radius: 1px;
}
#table-of-contents {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: fit-content;
    box-shadow: 0px 0px 8px #ff9a00;
    border: #ff9a00 3px solid;
    background-color: #fff3e2;
    color: #ff5d00;
    padding-left: 30px;
    padding-right: 30px;
}
#changelog {
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    width: 100%;
    padding: 60px;
    background: repeating-linear-gradient( /* Background pattern */
        rgb(30, 12, 0),
        rgb(30, 12, 0) 5px,
        rgb(35, 14, 0) 5px,
        rgb(35, 14, 0) 10px
    );
    color: rgb(232, 232, 73);
    box-shadow: inset 0px 0px 500px rgba(234, 160, 0, 0.5), 
                0px 0px 12px rgba(0, 0, 0, 1);
}
#changelog div {
    margin: 20px;
}
#changelog h2 {
    text-align: center;
}
#changelog h1 {
    text-align: center;
}
#change-log-to-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 2fr));
    gap: 20px;
    justify-content: center;
}
.ascii {
    white-space: pre; /* Preserve whitespace */
    margin: 0px auto;
    width: fit-content;
    
}
.gallery {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    justify-content: center;
    gap: 10px;
}
.gallery img {
    margin: 10px;
    border-radius: 15px;
    width: 30%;
}
.gallery p {
    text-align: center;
    font-size: small;
}
#steamdeck-image {
    display: block;
    max-width: 500px;
    margin: 20px auto;
}
footer {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-color: black;
    color: white;
    font-size: small;
    margin-top: 0px;
    padding-top: 40px;
    gap: 5%;
    font-family: lucon;
    max-width: 100%;
}
footer a {
    color: white;
}


/* Animation for enlarging elements on hover */
.enlarge-on-hover {
    transition: transform 0.3s ease;
}
.enlarge-on-hover:hover {
    transform: scale(1.1);
}

/* Animation for swaying effect */
@keyframes sway {
    0% {
        transform: rotate(-2deg);
    }
    50% {
        transform: rotate(2deg);
    }
    100% {
        transform: rotate(-2deg);
    }
}
/* Animation for floating effect */
@keyframes floating {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(10px);
    }
    100% {
        transform: translateY(0px);
    }
}
/* Responsive layout for small screens */
@media (max-width: 900px) {
    .container {
        width: 95%;
        padding: 0.5rem;
        border: none;
        background-color: transparent;
        box-shadow: none;
    }
    footer {
        gap:15px;
    }
    footer img {
        width: 90px;
    }
    .button {
        width: 100%;
        padding: 1rem;
    }
    #portalgun-image {
        max-width: 90%;
    }
    #logostrip {
        max-width: 90%;
    }
    #Chell-splash {
        max-width: 100%;
        width: 500px;
    }
    #background-cubes {
        max-width: 100%;
        top:-30px;
    }
    #black-background {
        height: 800px;
    }
    #firstblock {
        border-radius: 0px;
        margin-top: -200px;
        mask-image: linear-gradient(to bottom, black 95%, transparent 100%);
        width: 100%;
    }
    #changelog {
        padding: 40px;
        box-shadow: inset 0px 0px 80px rgba(234, 160, 0, 0.5);
        display:flex;
    }
    #documentary-thumbnail {
        margin-bottom: 60px;
    }
    #steamdeck-image {
        max-width: 95%;
    }
    .ascii {
        font-size: small;
    }
    #portal-logo {
        top: 50px;
    }
}