﻿* {
    box-sizing: border-box;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body{
    background: linear-gradient(to bottom, rgba(0, 255, 200, 0.75), rgba(0, 255, 200, 0));
    font-family: system-ui, sans-serif;
}

#nav-header {
    height: 100px;
    background-color: black;
    padding-top: 25px;
    color: white;
    text-align: center;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}

.btn {
    text-align: left;
    display: block;
    margin-left: 20px;
    text-decoration: none;
    color: silver;
}

#javascript {
    position: relative;
    display: inline-block;
    animation: slideRight 3s linear;
}

#exercise {
    position: relative;
    display: inline-block;
    animation: slideLeft 3s linear;
}




/*Rock, Paper, Scissor Game*/
#block1 h1 {
    text-align: center;
    margin: 50px 0;
    color: black;
}

#block1-1 {
    margin: auto;
    height: 550px;
    width: 600px;
    background-color: black;
    border-radius: 25px;
    padding: 25px;
    margin-bottom: 50px;
}

#scoreboard {
    display: flex;
    margin-top: 20px;
    gap: 200px;
    color: white;
}

.score {
    margin-left: 50px;
    font-size: 1.2rem;
    color: white;
}

#buttons {
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 75px;
    margin-bottom: 45px;
}

#results {
    display: flex;
    margin-top: 20px;
    gap: 200px;
    color: white;
}

.result {
    margin-left: 30px;
    font-size: 1.2rem;
    color: white;
}

#reset {
    color: white;
    border-radius: 4px;
    border: 1px solid white;
    background: transparent;
    margin-top: 20px;
    cursor: pointer;
}
    #reset:hover {
        color: black;
        background: white;
        transform: scale(1.1);
    }

.btn2 {
    margin-top: 75px;
    border-radius: 50px;
    border: solid 2px blue;
    background-color: transparent;
    height: 100px;
    width: 100px;
    font-size: 60px;
    cursor: pointer;
}

    .btn2:hover {
        background-color: blue;
        color: white;
        transform: scale(1.2);
    }

#message {
    margin-top: 50px;
    text-align: center;
    color: white;
}
/*END Rock, Paper, Scissor Game*/

        @keyframes slideRight {
            from {
                transform: translateX(-1000px) rotate(0deg);
            }

            to {
                transform: translateX(0) rotate(360deg);
            }
        }

        @keyframes slideLeft {
            from {
                transform: translateX(1000px) scale(0);
            }

            to {
                transform: translateX(0) scale(1);
            }
        }


#block-2 {
    display: flex;
    justify-content: center;
    padding: 50px;
}

#details {
    position: relative;
    color: black;
    right: 125px;
    margin: 25px;
}

    #details h1, h3 {
        margin-bottom: 80px;
    }


#board {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    justify-content: center;
    width: 300px;
    height: 300px;
    max-width: 90vw;
    max-height: 90vw;
    overflow: hidden;
}

.cell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border: 1px solid black;
    text-align: center;
    font-family: 'Bookman Old Style';
    font-size: 72px;
    color: black;
    box-shadow: 0 0 8px green;
}

    .cell:nth-child(1) {
        border-top-left-radius: 15px;
    }
    .cell:nth-child(3) {
        border-top-right-radius: 15px;
    }
    .cell:nth-child(7) {
        border-bottom-left-radius: 15px;
    }
    .cell:nth-child(9) {
        border-bottom-right-radius: 15px;
    }
        .cell:hover {
        background-color: lightgray;
        cursor: pointer;
    }

    .cell.win-line {
        position: relative;
        background-color: rgba(0, 255, 0, 0.2);
        border: 3px solid #00ff00;
    }

#win-line {
    position: absolute;
    background: red;
    height: 4px;
    width: 100%;
    top: 50%;
    left: 0;
    transform-origin: center center;
    display: none;
}

    /* Horizontal rows (values are % of board height) */
    #win-line.row-0 {
        top: 16.6%;
        transform: none;
    }

    #win-line.row-1 {
        top: 50%;
        transform: none;
    }

    #win-line.row-2 {
        top: 83.3%;
        transform: none;
    }

    /* Vertical columns */
    #win-line.vertical {
        width: 4px;
        height: 100%;
        top: 0;
        transform: none;
    }

    #win-line.col-0 {
        left: 16.6%;
    }

    #win-line.col-1 {
        left: 50%;
    }

    #win-line.col-2 {
        left: 83.3%;
    }

    /* Diagonals */
    #win-line.diag-main {
        width: 140%;
        top: 50%;
        left: -20%;
        transform: rotate(45deg);
    }

    #win-line.diag-anti {
        width: 140%;
        top: 50%;
        left: -20%;
        transform: rotate(-45deg);
    }

#restart {
    border: 2px solid black;
    border-radius: 10px;
    padding: 5px 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

    #restart:hover {
        background-color: black;
        color: white;
        transform: scale(1.1);
        box-shadow: 0 0 30px green;
    }

#mode {
    border: 2px solid black;
    border-radius: 10px;
    padding: 5px 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

    #mode:hover {
        background-color: black;
        color: white;
        transform: scale(1.1);
        box-shadow: 0 0 30px green;
    }

/* Calulator */
#block-3 {
    margin: auto;
    height: 80vh;
    width: 90%;
    border-radius: 25px;
    padding: 25px;
    margin-bottom: 50px;
}

#calculator {
    margin: auto;
    height: 95%;
    width: 500px;
    background-color: dimgrey;
    box-shadow: 1px 3px 20px black;
    border-radius: 15px;
    padding: 20px;
}

#calc-display {
    width: 100%;
    height: 90px;
    background-color: black;
    color: white;
    font-size: 2rem;
    text-align: right;
    align-content: center;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 2.5rem;
}

#calc-pad {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 10px;
    justify-items: center;
    align-items: center;
    height: calc(100% - 100px);
    width: 100%;
}

.calc-btn {
    width: 100%;
    height: 100%;
    margin: 10px;
    font-size: 1.5rem;
    justify-content: center;
    align-items: center;
    text-align: center;
    align-content: center;
    font-weight: bold;
    background-color: ghostwhite;
    border-radius: 10px;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 5px black;
    transition: transform 1s;
}
    .calc-btn:hover {
        background-color: lightgray;
        transform: scale(1.1);
        transform: rotate(3deg);
    }

.op {
    background-color: orange;
    font-size: 1.8rem;
    color: white;
}
    .op:hover {
        background-color: darkorange;
    }

.clear {
    background-color: red;
    color: white;
}
    .clear:hover {
        background-color: darkred;
    }

@media screen and (max-width: 768px) {

    #block1-1 {
        width: 100%;
        max-width: 100%;
        height: auto;
        padding: 16px;
    }

    #scoreboard,
    #results {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .score,
    .result {
        margin-left: 0;
        text-align: center;
    }

    #buttons {
        flex-wrap: wrap;
        gap: 20px;
    }

    .btn2 {
        margin-top: 20px;
    }

    #block1 h1 {
        margin: 20px 0;
    }

    #block-2 {
        flex-direction: column;
        align-items: center;
    }

    #details {
        margin-top: 20px;
        left: 10%;
        width: 90%;
    }

    #board {
        width: 100vw;
        height: 100vw;
    }

    .cell {
        font-size: 48px;
    }

    #block-3 {
        width: 100%;
        height: auto;
    }

    #calculator {
        width: 100%;
        height: auto;
    }

    #calc-display {
        height: 70px;
        font-size: 1.6rem;
    }
}