@import url('https://fonts.googleapis.com/css2?family=Birthstone&family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

:root {
    --primary-color: rgb(134, 218, 233);
    --secondary-color: rgb(106, 169, 179);
    --tertiary-color: rgb(59, 137, 132);
    --background-color: rgb(250, 254, 255);
    --container-color: rgb(250, 254, 255);
    --shadow-color: rgb(120, 124, 125);
    
    --primary-font: "Nunito", sans-serif;
}

html, body {
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgb(41, 68, 162), rgb(69, 221, 215));
}

* {
    font-family: var(--primary-font);
}

/* ===== Global ===== */
.back-button {
    background-color: rgb(197, 199, 226);
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1;
    font-size: 2rem;
    cursor: pointer;
    border: 2px solid rgba(72, 63, 160, 0.5);
    border-bottom: 4px solid rgba(72, 63, 160, 0.5);
    box-shadow: 0 0 0 2px rgb(54, 26, 109);
    border-radius: 50%;
}

input[type="submit"],
.button {

    background-color: rgb(255, 172, 92);
    border: 2px solid rgba(147, 97, 15, 0.5);
    border-bottom: 4px solid rgba(147, 97, 15, 0.5);
    box-shadow: 0 0 0 2px rgb(83, 38, 2);
    border-radius: 10px;
    height: 6vh;
    width: 10vw;
    padding: 0 !important;
    margin: 0 !important;

    cursor: pointer;
}

input[type="submit"]:hover,
.button:hover { 
    background-color: rgb(255, 183, 116);
}

input[type="submit"]:active,
.button:active {
    background-color: rgb(179, 97, 31);
}

input[type="text"] {
    padding: 1vw;
    border-radius: 10px;
    border: none;
    background-color: rgb(197, 199, 226);
}

#background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#background-image > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== Log-in ===== */
#login-background {
    position: fixed;
    
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    height: 55vw;
    width: 80vw;
    border-radius: 10px;
    
    
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.15);
}

#login-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    display: flex;
    flex-direction: column;
    justify-content: space-evenly;

    width: 40vw;

    
    border: 4px solid rgba(72, 63, 160, 0.5);
    background-color: rgba(94, 84, 181, 0.5);
    box-shadow: 0 0 0 2px rgb(54, 26, 109);

    border-radius: 10px;

    padding: 5vw;
}

#login-container > .header {
    color: white;
    font-family: var(--primary-font);
}

#login-container > .login-form {
    display: flex;
    justify-content: space-evenly;
    flex-direction: column;
    font-family: var(--primary-font);
}

.form-group {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: flex-start;
}

.login-form p {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    font-family: var(--primary-font);
    text-shadow: 0 0 1px black;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    background: none;
    border-radius: 10px;
    padding: 1vw;
    background-color: rgb(197, 199, 226);
    border: 2px solid rgba(72, 63, 160, 0.5);
    border-bottom: 4px solid rgba(72, 63, 160, 0.5);
    box-shadow: 0 0 0 2px rgb(54, 26, 109);
}

.login-form input[type="submit"] {
    padding: 10px;
    cursor: pointer;
    position: relative;
    top: 2vh;
}

.sign-up {
    cursor: pointer;
    text-decoration: underline;
    text-align: right;
    color: rgb(227, 231, 255)    ;
    font-family: var(--primary-font);
    font-size: 0.75rem;
}

/* ===== Welcome ===== */
#main-container {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;

    aspect-ratio: 2;
    height: 20vw;
    width: 40vw;
    
    background-color: rgb(197, 199, 226);
    border: 2px solid rgba(72, 63, 160, 0.5);
    border-bottom: 4px solid rgba(72, 63, 160, 0.5);
    box-shadow: 0 0 0 2px rgb(54, 26, 109);
    border-radius: 10px;
    padding: 5vw;
    z-index: 1;
    align-items: center;
}

#main-container > .main {
    display: flex;
    width: 100%;
    height: 20%;
    flex-direction: column;
    justify-content: space-around;
    text-align: center;
    align-items: center;
}

.main > a {
    font-size: 1.5rem;
}

.main > h1 {
    margin: 1vh 0 0 0;
    font-size: 5rem;
    font-weight: bold;
    font-family: "Birthstone", cursive;
}

#cat-head-main img {
    z-index: 2;
    position: fixed;
    width: 25vw;
    left: 50%;
    transform: translate(-50%, -50%);
    top: calc(50% - 16vw);
    animation: cat-head-animation 8s ease infinite;
}

@keyframes cat-head-animation {
    0% {
        transform: translate(-50%, -50%) rotateZ(-10deg);
    }
    50% {
        transform: translate(-50%, -50%) rotateZ(10deg);
    }
    100% {
        transform: translate(-50%, -50%) rotateZ(-10deg);
    }
}

#cat-paws-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    z-index: 2;
    user-select: none;
    pointer-events: none;
}

#cat-paws-container > .cat-paw {
    position: fixed;
    width: 15vw;
    transform: translate(-50%, -50%);
    top: calc(50% - 15vw);
}

#cat-paws-container > .cat-paw:first-child {
    left: 50%;
    transform: translate(20%, -50%) rotateY(180deg);
}

#cat-paws-container > .cat-paw:last-child {
    left: 50%;
    transform: translate(-120%, -50%);
}

.cat-paw > img {
    width: 6vw;
}

#cat-tail-main > img {
    z-index: 0;
    position: fixed;
    right: 50%;
    transform: translate(50%, -50%);
    top: calc(50% + 13vw);
    width: 15vw;
    transform-origin: top center;
    animation: tail-animation 7.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes tail-animation {
    0% {
        transform: translateX(50%) rotateZ(45deg) rotateY(180deg);
    }
    45% {
        transform: translateX(50%) rotateZ(-43deg) rotateY(180deg);
    }
    50% {
        transform: translateX(50%) rotateZ(-45deg) rotateY(0deg);
    }
    95% {
        transform: translateX(50%) rotateZ(43deg) rotateY(0deg);
    }
    100% {
        transform: translateX(50%) rotateZ(45deg) rotateY(180deg);
    }
}

/* ===== Main ===== */
#prompt-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vh;
    
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.15);
    border-radius: 10px;

    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

#prompt-container > #friend-container {
    width: 32vw;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: start;
}

#prompt-list-container {
    width: 100%;
    height: 100%;
}

#prompt-list-container > #back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1;
    font-size: 2rem;
    cursor: pointer;
    background-color: rgb(197, 199, 226);
    border: 2px solid rgba(72, 63, 160, 0.5);
    border-bottom: 4px solid rgba(72, 63, 160, 0.5);
    box-shadow: 0 0 0 2px rgb(54, 26, 109);
    border-radius: 50%;
}

#prompt-list-container > #prompt-list {
    position: absolute;
    top: 10%;
    width: 70vw;
    height: 75%;
    margin: 2vh 0 0 3.5vw;
    padding: 2vh;
    overflow: scroll;

    border: 4px solid rgba(72, 63, 160, 0.5);
    background-color: rgba(94, 84, 181, 0.5);
    border-radius: 10px;
}

#prompt-list > .prompt-item {
    background-color: rgb(197, 199, 226);
    border: 2px solid rgba(72, 63, 160, 0.5);
    border-bottom: 4px solid rgba(72, 63, 160, 0.5);
    box-shadow: 0 0 0 2px rgb(54, 26, 109);
    border-radius: 10px;
    padding: 1vh;
    margin: 1vh;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

#friend-list {
    width: 100%;
    height: 40vh;
    border: 4px solid rgba(72, 63, 160, 0.5);
    background-color: rgba(94, 84, 181, 0.5);
    border-radius: 10px;
    margin: 2vh 0 0 2vw;
    padding: 2vh;
    overflow: scroll;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

#friend-list > .friend-item:first-child {
    margin: 0;
    padding: 2vh;
}

#friend-list > .friend-item {
    background-color: rgb(197, 199, 226);
    margin: 1vh;
    padding: 1vh;
    border-radius: 10px;
    border: 2px solid rgba(72, 63, 160, 0.5);
    border-bottom: 4px solid rgba(72, 63, 160, 0.5);
    box-shadow: 0 0 0 2px rgb(54, 26, 109);
    transition: transform 0.1s ease-in-out;
}

.friend-item:hover {
    transform: scale(1.05);
}

#account-settings {
    height: 20vh;
    width: 100%;
    border-radius: 10px;
    border: 4px solid rgba(72, 63, 160, 0.5);
    background-color: rgba(94, 84, 181, 0.5);
    margin: 2vw 0 0 2vw;
    padding: 2vh;
    overflow: scroll;
}

#account-settings > p {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 0 0 1px black;
    font-family: var(--primary-font);
}

#account-settings input[type="text"] {
    width: 60%;
    border: 2px solid rgba(72, 63, 160, 0.5);
    border-bottom: 4px solid rgba(72, 63, 160, 0.5);
    box-shadow: 0 0 0 2px rgb(54, 26, 109);
    margin-right: 1vh;
}

#canvas-cat-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    z-index: 2;
    user-select: none;
    pointer-events: none;
}

#canvas-cat-body {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10vw;
    z-index: 2;
}

#canvas-cat-head {
    position: absolute;
    top: 17%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 9vw;
    z-index: 2;
    animation: canvas-cat-head-blink-animation 10s ease infinite; 
    animation: canvas-cat-head-animation 15.43s ease infinite; 
    content: url("./assets/cat/EyesOpenNoSpace.png");
}

#canvas-cat-tail {
    position: absolute;
    top: 25%;
    left: 48%;
    transform: translate(-50%, -50%);
    width: 6vw;
    z-index: 1;
    transform-origin: bottom right;
    animation: canvas-cat-tail-animation 5s ease infinite; 
}

@keyframes canvas-cat-head-animation {
    0% {
        transform: translate(-50%, -50%) rotateZ(-10deg);
    }
    50% {
        transform: translate(-50%, -50%) rotateZ(10deg);
    }
    100% {
        transform: translate(-50%, -50%) rotateZ(-10deg);
    }
}

@keyframes canvas-cat-head-blink-animation {
    0% {
        content: url("./assets/cat/EyesOpenNoSpace.png");
    }
    47% {
        content: url("./assets/cat/EyesOpenNoSpace.png");
    }
    50% {
        content: url("./assets/cat/EyesClosedNoSpace.png");
    }
    52% {
        content: url("./assets/cat/EyesOpenNoSpace.png");
    }
    100% {
        content: url("./assets/cat/EyesOpenNoSpace.png");
    }
}

@keyframes canvas-cat-tail-animation {
    0% {
        transform: translate(-50%, -50%) rotateZ(0deg);
    }
    50% {
        transform: translate(-50%, -50%) rotateZ(-10deg);
    }
    100% {
        transform: translate(-50%, -50%) rotateZ(0deg);
    }
}

#cat-container {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.15);
    width: 100%;
    height: 100%;
    z-index: 2;
    user-select: none;
    pointer-events: none;
}

#cat-body {
    position: absolute;
    top: 20%;
    left: 70%;
    transform: translate(-50%, -50%);
    width: 15vw;
    z-index: 2;
}

#cat-head {
    position: absolute;
    top: 12%;
    left: 63%;
    transform: translate(-50%, -50%);
    width: 7vw;
    z-index: 2;
    animation: cat-head-animation 12s ease infinite;
}

#cat-tail {
    position: absolute;
    top: 19%;
    left: 70%;
    transform: translate(-50%, -50%);
    width: 25vw;
    z-index: 1;
    animation: cat-tail-animation 12s ease infinite;
}

@keyframes cat-tail-animation {
    0% {
        transform: translate(-50%, -50%) rotateZ(0deg);
    }
    50% {
        transform: translate(-50%, -50%) rotateZ(-10deg);
    }
    100% {
        transform: translate(-50%, -50%) rotateZ(0deg);
    }
}

@keyframes cat-head-animation {
    0% {
        transform: translate(-50%, -50%) rotateZ(0deg);
    }
    50% {
        transform: translate(-50%, -50%) rotateZ(-10deg);
    }
    100% {
        transform: translate(-50%, -50%) rotateZ(0deg);
    }
}

#prompt-container > #prompt-grid {
    border: 4px solid rgba(72, 63, 160, 0.5);
    background-color: rgba(94, 84, 181, 0.5);
    border-radius: 10px;
    margin: 2vh 2vw 2vw 0;
    width: 36vw;
    height: 50vh;
    padding: 2vh;
    display: flex;
    flex-direction: row;
    align-self: end;
    flex-wrap: wrap;
    align-content: space-evenly;
    justify-content: space-evenly;
    overflow: hidden;
}

#prompt-grid > .prompt-item {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;

    text-align: center;

    background-color: rgb(197, 199, 226);
    border: 2px solid rgba(72, 63, 160, 0.5);
    border-bottom: 4px solid rgba(72, 63, 160, 0.5);
    box-shadow: 0 0 0 2px rgb(54, 26, 109);
    border-radius: 10px;

    width: 10vw;
    height: 10vw;
    cursor: pointer;
    transition: transform 0.1s ease-in-out;
    overflow: hidden;
}

.prompt-item > h1 {
    text-wrap: wrap;
    font-size: 1.5rem;
    font-weight: bold;
    font-family: var(--primary-font);
}

.prompt-item:hover {
    transform: scale(1.05);
}

/* ===== Canvas ===== */
#canvas-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30vw;
    height: 20vh;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    border: 2px solid rgba(72, 63, 160, 0.5);
    border-bottom: 4px solid rgba(72, 63, 160, 0.5);
    box-shadow: 0 0 0 2px rgb(54, 26, 109);
    background-color: rgb(197, 199, 226);
    padding: 2vh;
}

#answer-container {
    width: 100%;
    height: 100%;
}

#answer-container > .answer-item {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 0.5vh;
    max-width: 22vw;
    border-radius: 10px;
    padding: 2vh;
    margin: 1vh;
    background-color: rgb(197, 199, 226);
    border: 2px solid rgba(72, 63, 160, 0.5);
    border-bottom: 4px solid rgba(72, 63, 160, 0.5);
    box-shadow: 0 0 0 2px rgb(54, 26, 109);
    animation: bob-animation 4s ease-in-out infinite;
    animation: small-rotate-animation 8s ease-in-out infinite;
    cursor: pointer;
    transition: all 0.4s ease-in-out;
}

.answer-author {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(54, 26, 109, 0.85);
    text-transform: lowercase;
}

.answer-text {
    font-size: 1rem;
    line-height: 1.3;
}

.reply-count {
    font-size: 0.7rem;
    opacity: 0.75;
    font-style: italic;
}

#answer-container > .answer-reply {
    padding: 1.2vh 1.5vh;
    max-width: 16vw;
    font-size: 0.9rem;
    z-index: 5;
    animation: bob-animation 3s ease-in-out infinite;
}

#answer-container > .answer-reply .answer-author {
    font-size: 0.65rem;
}

.answer-item:hover {
    padding: 3vh;
    font-size: 1.1rem;
}

#answer-container > .answer-top-level,
#answer-container > .answer-reply {
    transform: translateX(-50%);
}


.answer-item.selected {
    animation: none !important;
    transition: none;
    background-color: var(--primary-color);
    border: 2px solid var(--secondary-color);
    border-bottom: 4px solid var(--secondary-color);
    box-shadow: 0 0 0 2px var(--shadow-color);
    padding: 3vh;
    left: 50% !important;
    top: 45% !important;
    transform: translate(-50%, -50%) scale(2.2) !important;
    z-index: 100;
    max-width: 40vw;
}

.answer-item.selected .answer-text {
    font-size: 1.1rem;
}

#answer-container > .answer-reply.selected {
    transform: translate(-50%, -50%) scale(1.8) !important;
    top: 62% !important;
    z-index: 99;
}

.reply-indicator {
    position: fixed;
    bottom: 22vh;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1vh;
    padding: 1vh 2vh;
    border-radius: 10px;

    background-color: rgb(255, 172, 92);
    border: 2px solid rgba(147, 97, 15, 0.5);
    border-bottom: 4px solid rgba(147, 97, 15, 0.5);
    box-shadow: 0 0 0 2px rgb(83, 38, 2);
    font-size: 0.9rem;
    z-index: 50;
}

#cancel-reply {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 3vh;
    height: 3vh;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
}

@keyframes bob-animation {
    0% {
        transform: translate(-50%, 0%);
    }
    50% {
        transform: translate(-50%, 10%);
    }
    100% {
        transform: translate(-50%, 0%);
    }
}

@keyframes small-rotate-animation {
    0% {
        rotate: -5deg;
    }
    50% {
        rotate: 5deg;
    }
    100% {
        rotate: -5deg;
    }
}

#text-field {
    position: fixed;
    bottom: 10vh;
    left: 50%;
    transform: translateX(-50%);
    width: 30vw;
    height: 10vh;
    border-radius: 10px;
    background-color: rgb(197, 199, 226);
    border: 2px solid rgba(72, 63, 160, 0.5);
    border-bottom: 4px solid rgba(72, 63, 160, 0.5);
    box-shadow: 0 0 0 2px rgb(54, 26, 109);
    transition: all .5s ease-in-out;
}

#text-input {
    width: calc(100% - 6vh);
    height: 100%;
    padding: 2vh;
    outline: none;
    border: none;
    border-radius: 10px;
    background: none;
    resize: none;
}

#submit-button {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    bottom: 1vh;
    right: 1vh;
    width: 1vh;
    height: 1vh;
    border-radius: 50%;
    
    background-color: rgb(255, 172, 92);
    border: 2px solid rgba(147, 97, 15, 0.5);
    border-bottom: 4px solid rgba(147, 97, 15, 0.5);
    box-shadow: 0 0 0 2px rgb(83, 38, 2);
    padding: 2vh;
    cursor: pointer;
    font-size: 2rem;
    color: black;
}