/* Import Inter font family from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

/* Overall Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

/* Custom CSS Variables */
:root {
    --footer-color: black;
    --custom-green: #5d9c69;

    --bg-gradient-color: green;
    --bg-mid-color: var(--bg-white);
    --buttons-color: var(--bg-green);
    --text-color: var(--bg-white);

    --bg-profile-color: #3b5140;
    --foot-color: transparent;

    --bg-pink: #e767b5;
    --bg-red: rgb(255, 120, 120);
    --bg-orange: rgb(248, 191, 85);
    --bg-yellow: rgb(248, 248, 140);
    --bg-green: rgb(54, 135, 54);
    --bg-light-blue: rgb(96, 237, 253);
    --bg-dark-blue: rgb(98, 98, 236);
    --bg-purple: rgb(155, 83, 203);
    --bg-white: #FFFFFF;

    --btn-red: rgb(250, 17, 17);
    --btn-orange: rgb(228, 149, 3);
    --btn-yellow: rgb(173, 173, 5);
    --btn-green: rgb(0, 112, 0);
    --btn-light-blue: rgb(0, 153, 170);
    --btn-dark-blue: rgb(0, 0, 178);
    --btn-purple: rgb(103, 0, 172);

    --txt-white: white;
    --txt-off-white: #EAEAEA;
    --txt-beige: rgb(248, 248, 208);
    --txt-gray: rgb(213, 213, 213);
}

body {
    min-height: 100vh;
    overflow-y: hidden;
    overflow-x: hidden;
    transition: .25s ease;
    background-image: linear-gradient(to right bottom, white, var(--bg-mid-color), var(--bg-gradient-color));
    background-size: cover;
    background-attachment: fixed;
}

/* NAVBAR */

nav {
    position: fixed;
    top: 0;
    z-index: 100;
    display: flex;
    width: 100%;
    height: 5rem;
    justify-content: space-between;
    align-items: center;
    padding: 1rem calc((100vw - 1300px) / 2);
    box-shadow: 0 0 .3rem rgba(0, 0, 0, .2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    user-select: none;
}

/* TOM Text Styling */
.logo {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-main-color);
    text-decoration: none;
    transition: .2s ease;
    user-select: none;
}

.logo:hover {
    color: var(--custom-green);
}

/* Menu Styling */
.top-menu {
    position: relative;
    margin: 0 .3rem;
    padding: .6rem .9rem;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main-color);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.3s;
    user-select: none;
}

.top-menu:hover {
    background-color: rgba(220, 220, 220, 0.5);
}

.top-menu.active {
    background: var(--custom-green); /* Active green button */
    color: white;
    transition: box-shadow .2s ease; 
}

.top-menu.active:hover {
    box-shadow: 0 0 .3rem var(--custom-green); /* Green box shadow on button of active page when active */
}

.icon {
    display: none; /* Keep icon hidden when wide screen */
    color: white;
    transition: 0.25s;
    background: var(--nav-bar-color);
}

.icon:hover {
    color: black;
    background: var(--nav-bar-color);
}

/* FOOTER */

footer {
    position: fixed;
    z-index: 100;
    bottom: 0;
    display: flex;
    flex-direction: column;
    padding: .4rem 0 .6rem;
    width: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--footer-color);
    color: white;
    user-select: none;
}

/* Footer Link Styling */
footer a {
    display: flex;
    margin-bottom: .2rem;
    width: 3rem;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    text-decoration: none;
}

/* Footer Github Icon Styling */
footer .github {
    width: 3rem;
    height: 3rem;
    fill: white;
    transition: 0.1s;
}

footer .github:hover {
    fill: var(--custom-green);
}

footer p {
    font-size: 0.75rem;
    margin: 0;
    background-color: transparent;
}

/* TOMODORO */

.tom-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 85vh;
    padding: 0rem calc((100vw - 1300px) / 2);
}

.tom-image {
    margin-left: 8rem;
    width: 24rem;
    height: auto;
    user-select: none;
}

.tom-image img {
    cursor: pointer;
    transition: scale .3s ease;
}

.tom-image img:hover {
    scale: 1.1;
}

.hidden-tom {
    opacity: 0;
    filter: blur(5px);
    transform: translateX(-100%);
    transition: transform 1s;
}

.show-tom {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0);
}

.hidden-timer-buttons {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(100%);
    transition: all 1s;
}

.show-timer-buttons {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

.icon {
    display: none;
    color: white;
    transition: 0.25s;
    background: none;
}

.icon:hover {
    color: black;
    background: none;
}

@media screen and (max-width: 1182px) {
    nav {
        flex-direction: row;
        align-items: flex-start;
        background: var(--nav-bar-color);
    }

    .logo {
        margin: 0.75rem 0rem 0rem 1rem;
    }

    .top-menu {
        display: none; 
    }

    .icon {
        display: block;
        float: right;
        padding: 14px 16px;
        background: var(--nav-bar-color);
        border-radius: 50%;
        color: black;
    }

    .icon:hover {
        background: rgb(186, 186, 186);
    }

    .nav-items.responsive .top-menu {
        display: block;
        background-color: white;
        margin: 1rem;
    }

    .nav-items.responsive {
        position: relative;
        background-color: white;
        color: black;
        z-index: 1;
        border-radius: 15px;
        box-shadow: 0px 8px 16px rgba(28, 28, 28, 0.288);
        position: absolute;
        right: 0; 
        top: 60px; 
        width: auto;
        border: 2px solid var(--custom-green);
    }

    .nav-items.responsive a {
        float: none;
        color: black;
        padding: 12px 16px;
        text-decoration: none;
        display: block;
        text-align: left;
        background-color: white;
    }

    .nav-items.responsive a:hover {
        background-color: var(--custom-green);
        color: white;
    }

    .nav-items.responsive {
        display: block;
    }
}

.tom-button {
    padding: 0.75rem;
    width: 10rem;
    text-align: center;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    box-shadow: 0 0 .3rem var(--buttons-color);
    background: var(--buttons-color);
    color: var(--text-color);
    text-decoration: none;
    transition: .25s ease;
    cursor: pointer;
}

.tom-button:hover {
    box-shadow: 0 0 .3rem black;
    background: black;
    color: white;
    transform: scale(1.1);
}

.top-buttons,
.bottom-buttons {
    display: grid;
    grid-template-columns: repeat(3, auto);
}

.top-buttons {
    gap: 2rem;
}

.top-buttons > *.selected {
    box-shadow: 0 0 .3rem black;
    background: black;
    color: white;
}

.timer-div {
    display: grid;
    margin: 8rem 0 5rem;
    grid-template-columns: 1fr 2fr;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

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

.timer {
    display: flex;
    margin-bottom: 2rem;
    height: 17rem;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 15rem;
    font-weight: 500;
    color: black;
    text-decoration: none;
    user-select: none;
}

#start-timer {
    padding: .5rem 2rem;
    width: 18rem;
    font-size: 1.8rem;
}

#start-timer.start-mode {
    background: var(--buttons-color);
}

#start-timer.pause-mode {
    box-shadow: 0 0 .3rem black;
    background: black;
}

#start-timer.start-mode:hover {
    transform: scale(1.05);
    background: black;
}

#start-timer.pause-mode:hover {
    transform: scale(1.05);
    background: black;
}

#restart-button {
    width: 3rem;
    height: 3rem;
    transition: 0.25s;
    background-image: url('../../media/restart-black.png');
    background-color: transparent;
}

#settings-button {
    width: 3rem;
    height: 3rem;
    transition: 0.25s;
    background-image: url('../../media/gear-black.png');
    background-color: transparent;
}

#restart-button:hover {
    transform: scale(1.25);
    background-color: transparent;
}

#settings-button:hover {
    transform: scale(1.25);
    background-color: transparent;
}

.no-button {
    background-size: contain;
    background-repeat: no-repeat;
    border: none;
    cursor: pointer;
    margin: 1rem;
}
/* End Tomodoro Styling */

/* Start Popup Styling */
.popup {
    background:white;
    opacity: 0;
    position: absolute;
    top: 6rem;
    bottom: 6rem;
    right: 16rem;
    left: 16rem;
    border-radius: 3.125rem;
    display: flex;
    flex-direction: row;
    z-index: -1;
    border: none;
    box-shadow: none;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    filter: blur(5px);
    max-width: 75rem;
    max-height: 40rem;
    overflow: scroll;
}

.popup.open {
    opacity: 1;
    z-index: 999;
    border: 2px solid var(--custom-green);
    box-shadow: 0 0 1rem black;
    transform: translateY(0);
    transition: transform 0.3s ease-in-out;
    filter: blur(0);
}

.main-area { 
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    width: 100%;
    margin: 1rem;
}

.popup h1,
.popup h2 {
    color: var(--custom-green);
    background-color: white;
    font-size: 1.5rem;
}

.popup label,
.popup h5 {
    color: black;
    background-color:white;
    font-size: 1rem;
}

.title {
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
    padding-left: 1rem;
}

.title h1 {
    font-size: 2rem;
    padding-bottom: 0.5rem;
}

.title h4 {
    padding-bottom: 0.5rem;
}

.title-top {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.cancel-icon {
    margin-right: 0.4rem;
    margin-top: 0.25rem;
    height: 2rem;
    width: 2rem;
    border: none;
    background-color: transparent;
    cursor: pointer;
    filter:invert(40%);
    transition: ease-in-out .25s;
}

.cancel-icon:hover {
    filter:invert(0%);
}

.box-title {
    padding-left: 1rem;
}

.bottom-title {
    padding-left: 1rem;
    padding-bottom: 1rem;
}

.top-half{
    display: flex;
    flex-direction: column;
    width: 50%;
}

.labels {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    padding-right: 1rem;
}

.input-label {
    font-size: 1rem;
    padding-left: 1rem;
    display: flex;
    align-items: center;
    font-weight: bold;
}

.input-boxes {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.input {
    display: flex;
    flex-direction: row;
    padding-top: 1rem;
    padding-right: 2.5rem;
}

.min-label {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    padding-left: 0.4rem;
    font-size: 1rem;
    font-weight: normal;
}

.bottom-half {
    display: flex;
    flex-direction: column;
}

.options {
    display: flex;
    flex-direction: row;
    width: 90%;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.left-side {
    display: flex;
    flex-direction: column;
    padding-left: 1rem;
    padding-right: 3rem;
    justify-content: space-between;
}

.right-side {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: left;
}

.right-side .send {
    align-self: flex-start;
}

/*Styling for the four drop downs below*/
.bg-1,
.bg-2,
.btn-drop,
.txt-drop {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

#background-1 {
    padding-right: 1rem;
}

/*Styling for the text area for the user to send their desired mood to TOM*/
#mood-prompt {
    background-color: white;
    border-radius: 1.875rem;
    height: 9.375rem;
    width: 30.625rem;
    resize: none;
    padding: 1rem;
    margin: 1rem 0 1rem 0;
    flex:1;
    border: 2px solid black; 
    transition: 0.1s ease-in-out;
}

#mood-prompt:hover {
    border: 2px solid var(--custom-green); 
    transition: 0.1s ease-in-out;
}

/*Styling for the input boxes that the user uses to change the study timer times*/
.time-input {
    padding: .3rem;
    width: 6rem;
    text-align: left;
    font-size: 1.3rem;
    font-weight: 600;
    background: white;
    border: 2px solid black; 
    border-radius: 1.875rem;
    transition: 0.1s ease-in-out;
}

.time-input:hover {
    border: 2px solid var(--custom-green); 
    transition: 0.1s ease-in-out;
}

/*Styling for button that closes the pop up (the Select button)*/
#closePop {
    padding: 0.75rem;
    width: 9.375rem;
    border: none;
    cursor: pointer;
    border-radius: 1.875rem;
    transition: 0.25s;
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    margin: 0 auto;
    box-shadow: 0 0 .5rem var(--custom-green);
    background-color: var(--custom-green);
    border-radius: 1.875rem;
    color: white;
}

#closePop:hover {
    background-color: black;
    box-shadow: 0 0 0.5rem black;
}

/*Styling for the button that sends the user mood to Gemini API (the Send to TOM button)*/
.form-button {
    padding: 0.75rem;
    width: 15rem;
    border: none;
    cursor: pointer;
    border-radius: 1.875rem;
    transition: 0.25s;
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    margin: 0 auto;
    box-shadow: 0 0 .5rem var(--custom-green);
    background-color: var(--custom-green);
    color: white;
}

.form-button:hover {
    background-color: black;
    box-shadow: 0 0 0.5rem black;
}

.hexcodes {
    display: none;
}

select {
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    color: black;
    border: 2px solid black;
    border-radius: 1.875rem;
    width: 6rem;
    text-align: center;
    transition: 0.1s ease-in-out;
}

select:hover {
    border: 2px solid var(--custom-green);
    transition: 0.1s ease-in-out;
}

textarea {
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    color: black;
    text-align: left;
}

/*Narrow page version of the pop up UI. Adjusts placement and width of key elements.*/
@media screen and (max-width: 1400px) {
    .popup {
        width: 40rem;
    }

    .input-boxes {
        flex-direction: column;
    }

    .options {
        flex-direction: column;
        margin: 1rem;
    }

    #message {
        margin-bottom: 1rem;
    }

    .input-label {
        width: 5rem;
    }

    .left-side {
        padding-left: 0rem;
        width: 30.625rem;
        margin-bottom: 2rem;
    }

    .bottom-title {
        padding-bottom: 0rem;
    }

    .bg-1 {
        width: 15rem;
        padding-bottom: 1rem;
    }

    .bg-2 {
        width: 15rem;
        padding-bottom: 1rem;
    }

    .btn-drop {
        width: 15rem;
        padding-bottom: 1rem;
    }

    .txt-drop {
        width: 15rem;
        padding-bottom: 1rem;
    }
}

/* Animation Styling */
.exit {
    filter: blur(5px);
    opacity: 0;
    transform: translateY(100%);
    transition: all 1s ease-in-out
}

/* Start Responsiveness Styling */
@media screen and (max-width: 768px) {
    .tom-container {
        grid-template-columns: 1fr;
    }   

    .timer-boxes {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .options {
        flex-direction: column;
        gap: 0rem;
        margin: 1rem;
    }
}

/* Collapsed menu visible once screen width under 1182px */
@media screen and (max-width: 1182px) {
    body {
        overflow-x: scroll;
    }

    nav {
        flex-direction: row;
        align-items: flex-start;
        background: var(--nav-bar-color);
    }

    .logo {
        margin: 1.5rem 0rem 0rem 1rem;
    }

    .top-menu {
        display: none; 
    }

    .icon {
        display: block;
        float: right;
        padding: 14px 16px;
        background: var(--nav-bar-color);
        border-radius: 50%;
        color: black;
    }

    .icon:hover {
        background: rgb(186, 186, 186);
    }

    .nav-items.responsive .top-menu {
        display: block;
        background-color: white;
        margin: 1rem;
    }

    .nav-items.responsive {
        position: relative;
        background-color: white;
        color: black;
        z-index: 1;
        border-radius: 15px;
        box-shadow: 0px 8px 16px rgba(28, 28, 28, 0.288);
        position: absolute;
        right: 0; 
        top: 60px; 
        width: auto;
        border: 2px solid var(--custom-green);
    }

    .nav-items.responsive a {
        float: none;
        color: black;
        padding: 12px 16px;
        text-decoration: none;
        display: block;
        text-align: left;
        background-color: white;
    }

    .nav-items.responsive a:hover {
        background-color: var(--custom-green);
        color: white;
    }

    .nav-items.responsive {
        display: block;
    }
}
/* End Responsiveness Styling */