* {
    box-sizing: border-box;
}

#portfolio-home {
    background-color: #f7f5f2;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    padding: 10px 15px;
    position: fixed;
    bottom: 5px;
    z-index: 999;
    border-radius: 5px;
    margin-left: 10px;
    color: #ff6600;
    text-decoration: none;
    font-weight: 600;
    font-size: medium;
    border: #ff6600 solid 2px;
}

@font-face {
    font-family: 'Departure Mono';
    src: url('fonts/DepartureMono-Regular.woff2') format('woff2'),
        /* Modern browsers */
        url('fonts/DepartureMono-Regular.woff') format('woff');
    /* Older browsers */
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Terminal';
    src: url('fonts/BigBlue_TerminalPlus.TTF') format('woff2');
    font-weight: normal;
    font-style: normal;
}


/* variables */
:root {
    --light-grey: #D9D9D9;
    --dark-grey: #cdcdcd;
    --darker-grey: #87888F;
    --red: #FF0000;
    --background-colour: #57A8A8;
    --cmd: black;
    --background: linear-gradient(90deg, rgba(0, 2, 129, 1) 0%, rgba(16, 131, 207, 1) 91%);
    --border-top: white;
    --border-bottom: black;
    --clippy-speach: #FBFFBF;
}

body {
    margin: 0;
    background-color: var(--background-colour);
    font-family: 'Departure Mono', monospace;
    cursor: url(img/cursor.png), auto;
}

h1 {
    color: white;
}

h2 {
    color: white;
}

.display-flex {
    display: flex;
}

.flex-spacebetween {
    display: flex;
    justify-content: space-between;
}

/* desktop nav styling */
nav {
    z-index: 999;
    height: 75px;
    background-color: var(--light-grey);
    position: fixed;
    width: 100%;
    border-bottom: 3px solid black;
}

.nav-content {
    height: 70px;
    padding: 10px;
    display: flex;
    justify-content: space-between;
}

.logo {
    height: 50px;
    margin-left: 25px;
    z-index: 999;
    position: relative;
}

#nav-buttons-desktop {
    gap: 10px;
    display: none;
}

#nav-shadow {
    height: 75px;
}

.button {
    background-color: var(--dark-grey);
    padding: 12px 20px;
    text-decoration: none;
    color: black;
    border-top: 3px solid var(--border-top);
    border-left: 3px solid var(--border-top);
    border-bottom: 3px solid var(--border-bottom);
    border-right: 3px solid var(--border-bottom);
    cursor: pointer;
}

.button:hover {
    outline: 2px dotted black;
    outline-offset: -8px;
}

.button:active {
    border-top: 3px solid var(--border-bottom);
    border-left: 3px solid var(--border-bottom);
    border-bottom: 3px solid var(--border-top);
    border-right: 3px solid var(--border-top);
    outline: 2px dotted black;
    outline-offset: -8px;
}

/* help button */
.help {
    background-color: var(--red);
    padding: 12px 20px;
    text-decoration: none;
    color: white;
    border-top: 3px solid var(--border-top);
    border-left: 3px solid var(--border-top);
    border-bottom: 3px solid var(--border-bottom);
    border-right: 3px solid var(--border-bottom);
}

.help:active {
    border-top: 3px solid var(--border-bottom);
    border-left: 3px solid var(--border-bottom);
    border-bottom: 3px solid var(--border-top);
    border-right: 3px solid var(--border-top);
    outline: 2px dotted black;
    outline-offset: -8px;
}

.help:hover {
    outline: 2px dotted white;
    outline-offset: -8px;
}

/* nav styling for mobile */

#hamburgerClosed {
    width: 50px;
    z-index: 998;
    width: 80px;

    img {
        width: 45px;
        margin: -12px 0 0 -4px;
    }
}

#hamburgerOpen {
    width: 80px;
    display: none;
    z-index: 998;

    img {
        position: absolute;
        width: 45px;
        margin: -12px 0 0 -4px;
    }
}

#mobile-nav {
    z-index: 997;
    width: 0;
    overflow: hidden;
    transition: width 0.4s ease;
    margin-top: -70px;
    height: 100vh;
    background-color: var(--light-grey);
    position: fixed;
    right: 0;
    display: flex;
    justify-content: center;

    /* white-space: nowrap; this stops the text from crushing and flowing to the next line with width change */
    ul {
        padding: 90px 0;
        font-family: 'Departure Mono', monospace;
        margin: 0;
        list-style: none;
        width: 80%;
        overflow: hidden;

        a {
            text-decoration: none;
            color: black;
            font-size: 1.6rem;
        }

        li {
            margin-bottom: 25px;
        }
    }
}

/* cmd/header area */
#cmd {
    height: 550px;
    width: 100%;
    background-color: var(--cmd);
    border-bottom: var(--light-grey) solid 6px;
    outline: 4px solid black;

    ul {
        color: white;
        margin: 0;
        padding: 10px;
        list-style: none;

        & span {
            color: #00FF66;
        }
    }

    li {
        opacity: 0;
        /* Initially hidden for the animation */
        white-space: pre-wrap;
    }
}

#welcome-ascii {
    margin: 15px 0 0 5px;
    width: 100px;
    opacity: 0;

    p {
        margin: 0;
        color: white;
        white-space: pre;
        font-size: clamp(10px, 3vw, 28px);
    }
}

#welcome-subtext {
    color: white;
    margin-left: 15px;
    opacity: 0;
}


/* peoples stories section */
#peoples-stories {
    margin: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.featured-story {
    min-width: 330px;
    width: 100%;
    height: 360px;
    background-color: var(--light-grey);
    border-bottom: 3px solid black;
    border-left: 3px solid white;
    border-right: 3px solid black;
    margin-bottom: 25px;
    transform-origin: left bottom;
    transform: scale(0);
    position: relative;
    z-index: 99;
}


#peoples-stories-heading {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;

    h1 {
        margin-left: 15px;
    }
}

/* window styling */
.window-button {
    background-color: var(--dark-grey);
    padding: 12px 15px;
    text-decoration: none;
    color: black;
    border-top: 3px solid var(--border-top);
    border-left: 3px solid var(--border-top);
    border-bottom: 3px solid var(--border-bottom);
    border-right: 3px solid var(--border-bottom);
}

.window-button:hover {
    outline: 2px dotted black;
    outline-offset: -8px;
}

.window-button:active {
    border-top: 3px solid var(--border-bottom);
    border-left: 3px solid var(--border-bottom);
    border-bottom: 3px solid var(--border-top);
    border-right: 3px solid var(--border-top);
    outline: 2px dotted black;
    outline-offset: -8px;
}

.toolbar {
    display: flex;

    p {
        padding: 0 10px;
        margin: 0;
    }
}

.window-content {
    background-color: white;
    border: 3px solid black;
    margin: 5px;
    width: calc(100% - 10px);
    height: 270px;
    box-sizing: border-box;
    overflow: scroll;

    p {
        margin: 5px;
    }

    li {
        margin: 25px 10px 0 0;
        font-weight: 600;
    }
}

.window-icon {
    margin: 0 5px;
    width: 32px !important;
    height: 32px;
}

.story-name {
    color: white;
    margin: 5px;
    font-size: clamp(12px, 1vw, 15px);
    white-space: nowrap;
}

.story-window-container {
    width: 60%;
    padding: 25px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.window-button-container {
    width: 100%;
    display: flex;
    justify-content: right;
    margin-right: 8px;
}

.share-story-btn-container {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.share-story-btn {
    text-align: center;
}

.desktop-icon {
    width: 80%;
    position: relative;
    z-index: 0;
}

.desktop-icon-container {
    display: none;
}

/* ai fam section */
.window-top {
    width: 100%;
    height: 50px;
    background: var(--background);
    border-top: 3px solid var(--border-top);
    border-bottom: 3px solid var(--border-top);
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.window-main {
    width: 100%;
    height: 370px;
    background-color: var(--cmd);
    border-bottom: var(--light-grey) solid 6px;
    outline: 4px solid black;
    overflow: visible;

    h4 {
        color: white;
        font-family: 'Terminal', monospace;
    }
}

.ai-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 320px;
    max-width: 550px;
    height: 365px;
    margin-top: -5px;
    color: white;
    background-color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 1) 90%, rgba(255, 255, 255, 0) 100%),
        linear-gradient(to left, rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 1) 90%, rgba(255, 255, 255, 0) 100%);

    h4 {
        font-weight: 100;
    }
}

#ai-container {
    position: relative;
}

.ai-text {
    width: 60%;
}

.cmd-icon {
    height: 32px;
    margin: 0 10px;
}

/* info section */
#info-section {
    margin: 50px 25px;
    width: 60%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.info-img {
    width: 50%;
    min-width: 130px;
    max-width: 300px;
    margin-bottom: 25px;
}

.info-window {
    min-width: 350px;
    width: 100%;
    height: 360px;
    background-color: var(--light-grey);
    border: 3px solid black;
    margin-bottom: 25px;
}

#info-section-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 25px;
}

/* game catalog */
#game-catalog {
    text-align: center;
    margin: 25px 0 0;
    h1 {
        margin: 25px 0 30px;
    }
}

.game-window {
    width: 80vw;
    overflow: hidden;
}

.game-window {
    background-color: var(--light-grey);
    background-color: var(--light-grey);
    border-bottom: 3px solid black;
    border-left: 3px solid white;
    border-right: 3px solid black;
    transform-origin: left bottom;
    max-width: 1060px;
}

.game-img {
    width: 100%;
    padding: 5px 5px;
    object-fit: cover;
}

/* question section */
#question {
    width: 80%;
    min-width: 360px;
    margin: 25px 0;
    hr {
        background-color: var(--border-top);
        height: 3px;
    }
    img {
        margin: 25px 0;
    }
}

#question-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    h1 {
        font-size: 3rem;
        margin: 25px 0;
    }
}

#question-window {
    width: 100%;
    height: 15vw;
    max-height: 160px;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--light-grey);
    border-top: 3px solid var(--border-top);
    border-left: 3px solid var(--border-top);
    border-bottom: 3px solid var(--border-bottom);
    border-right: 3px solid var(--border-bottom);

    h4 {
        margin: 0;
        color: black !important;
        font-size: clamp(11px, 1.5vw, 20px);
        white-space: nowrap;
        font-weight: 300;
        width: 100%;
    }
}

#question-input-field-top {
    height: 50%;
    max-height: 50px;
    width: 95%;
    margin: 0 auto;

}

#question-input-field-bottom {
    height: 50%;
    max-height: 70px;
    width: 95%;
    margin: 0 auto;
    position: relative;
}

#dropdown-top {
    background-color: white;
    padding: 5px;
    border-top: 3px solid var(--border-bottom);
    border-left: 3px solid var(--border-bottom);
    border-bottom: 3px solid var(--border-top);
    border-right: 3px solid var(--border-top);
}

#dropdown-bottom {
    background-color: white;
    padding: 5px;
    border-top: 3px solid var(--border-bottom);
    border-left: 3px solid var(--border-bottom);
    border-bottom: 3px solid var(--border-top);
    border-right: 3px solid var(--border-top);
    cursor: pointer;
    box-shadow: 3px black;
}

#password-answer-dropdown {
    z-index: 2;
    background-color: var(--light-grey);
    width: 100%;
    transition: 0.3s ease;
    position: absolute;
    overflow-y: scroll;
    overflow-x: hidden;
    border-left: 3px solid var(--border-top);
    border-right: 3px solid var(--border-bottom);
}

#passwords {
    list-style: decimal;
    padding: 8px 0 0 40px;
    background-color: white;
    margin: 5px;

    li {
        font-size: clamp(12px, 1.5vw, 20px);
    }
}

#button-arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 10px solid black;
    /* Inner triangle color */
    transition: 0.2s ease;
}

#password-answers .button {
    padding: 0;
    width: 10vw;
    min-width: 35px;
    max-width: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* interactive binary  */
#interactive-binary {
    font-size: 1.5rem;
    overflow: hidden;
    width: 100%;
    height: 100%;
    cursor: url(img/cursor.png);
}

.highlight {
    transform: scale(5);
    /* Scales the text */
    transition: transform 0.01s;
    /* Smooth transition for scaling */
}

b {
    color: white;
    display: inline-block;
    /* Ensure scaling works without pushing neighbors */
    transition: transform 3s ease-in-out;
    /* Apply the transition to all <b> elements */
    cursor: url(img/cursor.png), auto;
}

/* clippy */
#clippy {
    width: 80%;

    img {
        width: 100%;
        max-width: 350px;
        margin: -25px 0 25px 0;
    }
}

.centering {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#speach-box {
    margin-top: 25px;
    width: 80%;
    max-width: 360px;
    height: 195px;
    background-color: var(--clippy-speach);
    border: 3px solid;
    border-radius: 15px;
}

#speach-box-content {
    padding: 20px;

    p {
        margin: 0;
    }
}

.clippy-btns {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;

    a {
        margin-top: 10px;
        padding: 10px 15px;
        border: 2px solid;
        border-radius: 3px;
        text-decoration: none;
        color: black;
    }

    a:hover {
        text-decoration: underline;
    }
}

.triangle-outline {
    position: relative;
    width: 0;
    height: 0;
    border-left: 28px solid transparent;
    /* Slightly larger border for outline */
    border-right: 28px solid transparent;
    border-top: 55px solid black;
    /* Outline color */
    margin: -3px 0 0 15px;
}

.triangle {
    position: absolute;
    top: -55px;
    /* Position to center within the outline */
    left: -25px;
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-top: 50px solid var(--clippy-speach);
    /* Inner triangle color */
}

/* animations */

#top-arrow {
    position: absolute;
    top: 780px;
    transform-origin: top;
    transition: 0.3s ease;
}


/* footer */
footer {
    position: relative;
    height: 300px;
    background-color: var(--light-grey);
    border-top: 3px solid black;
    margin-top: 15px;

    p {
        margin: 0;
        padding: 10px;
        bottom: 0;
        position: absolute;
        height: 100%;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: flex-end;
    }

    ul {
        list-style: none;
    }
}



/* people's stories page */
#viewport {
    width: 100vw;
    height: 100%;
}

#story-window {
    width: 100%;
    height: 100vh;
    background-color: var(--light-grey);
}

#peoples-stories-title {
    background-color: var(--darker-grey);
    padding: 10px;
    text-align: center;

    h1 {
        margin: 0;
    }
}

.add-story-button-style {
    width: 100%;
    height: 50px;
    margin: 5px 0;
    background-color: var(--darker-grey);
    position: relative;
    color: white;

    img {
        position: absolute;
        right: 0;
        top: 0;
        height: 50px;
        padding: 5px;
    }
}

.stories-sub-title {
    margin: 0;
    background-color: var(--light-grey);
    border-bottom: 2px solid var(--border-bottom);
    border-right: 2px solid var(--border-bottom);
    border-left: 2px solid var(--border-top);
    border-top: 2px solid var(--border-top);
}

#files {
    background-color: white;
    width: 100%;
    height: 150px;
    margin-bottom: 5px;
    border-left: 2px solid black;
    border-right: 2px solid black;
    border-bottom: 2px solid black;
    overflow-y: scroll;
}

#user-story {
    height: 200px;
    background-color: white;
    border-left: 2px solid black;
    border-right: 2px solid black;
    border-bottom: 2px solid black;
    overflow-y: scroll;
}

/* 
post a story */

#name {
    width: 100%;
}

#user-story-submission {
    width: 100%;
    height: 300px;

}

#taskbar {
    display: none;
}


@media (min-width: 1026px) {
    #nav-buttons-desktop {
        display: flex;
    }

    #hamburgerClosed {
        display: none;
    }

    #cmd ul {
        padding: 25px;
    }

    #welcome-ascii {
        margin-left: 25px;
    }

    .story-window-container {
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
    }

    #peoples-stories {
        display: flex;
    }

    .featured-story {
        width: 80%;
        margin: 0 5px;
    }

    #info-section {
        width: 80%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        place-items: center;
    }

    #game-img {
        grid-column: 2;
        grid-row: 2;
    }

    .info-window {
        width: 80%;
        min-width: 360px;
    }

    #clippy {
        margin: 25px 0;
        display: flex;
        justify-content: center;
        width: 80%;

        img {
            margin: 0;
            max-width: 460px;
        }
    }

    .triangle-outline {
        top: -170px;
        left: 270px;
        transform: rotate(-90deg);
    }

    .triangle {
        top: -56px;
        /* this fixes a small outline problem between triangle and speachbox   */
    }

    #question-window {
        width: 80%;
    }

    #question-input-field-bottom {
        margin-bottom: 10px;
    }

    #passwords {
        padding-left: 60px;
    }

    #welcome-subtext {
        margin: 25px;
    }

    #top-arrow {
        bottom: 7%;
    }

    .desktop-icon-container {
        width: 100%;
        display: flex;
        margin-top: -64px;
        justify-content: space-between;

        img {
            width: 64px;
        }

        p {
            color: white;
            margin: 0;
            font-size: 0.8rem;
        }
    }

    /* peoples stories page */
    #taskbar {
        display: flex;
        width: 100%;
        height: 50px;
        background-color: var(--light-grey);
        position: absolute;
        bottom: 0;
        border: 3px solid black;
    }

    #story-window {
        top: 20%;
        left: 20%;
        width: 1000px;
        height: 590px;
        position: absolute;
        border-bottom: 3px solid var(--border-bottom);
        border-right: 3px solid var(--border-bottom);
        border-left: 3px solid var(--border-top);
        border-top: 3px solid var(--border-top);
    }

    #start {
        padding: 5px 15px;
        margin: 5px;
    }
    .start-btn-devider {
        margin: 5px;
        width: 6px;
        height: 35px;
        border-left: 3px solid var(--darker-grey);
        border-right: 3px solid white;
    }
    .start-btn-devider2 {
        margin: 6.5px;
        width: 10px;
        height: 30px;
        background-color: var(--dark-grey);
        border-left: 3px solid var(--border-top);
        border-right: 3px solid var(--darker-grey);
        border-top: 3px solid var(--border-top);
        border-bottom: 3px solid var(--darker-grey);
    }
    #solitaire-btn {
        padding: 5px 15px;
        margin: 5px;
    }
    #solitaire {
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 70%;
        z-index: 1000;
        width: 690px;
        height: 491px;
        overflow-y: hidden;
    }
    .window {
        margin: 0 !important;
    }
}