/**
* @license
*
* Font Family: Chillax
* Designed by: Manushi Parikh
* URL: https://www.fontshare.com/fonts/chillax
* © 2024 Indian Type Foundry
*
* Chillax Extralight 
* Chillax Light 
* Chillax Regular 
* Chillax Medium 
* Chillax Semibold 
* Chillax Bold 
* Chillax Variable (Variable font)
*
*/
@font-face {
    font-family: 'Chillax-Extralight';
    src: url('./fonts/chillax/Chillax-Extralight.woff2') format('woff2'),
        url('./fonts/chillax/Chillax-Extralight.woff') format('woff'),
        url('./fonts/chillax/Chillax-Extralight.ttf') format('truetype');
    font-weight: 200;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: 'Chillax-Light';
    src: url('./fonts/chillax/Chillax-Light.woff2') format('woff2'),
        url('./fonts/chillax/Chillax-Light.woff') format('woff'),
        url('./fonts/chillax/Chillax-Light.ttf') format('truetype');
    font-weight: 300;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: 'Chillax-Regular';
    src: url('./fonts/chillax/Chillax-Regular.woff2') format('woff2'),
        url('./fonts/chillax/Chillax-Regular.woff') format('woff'),
        url('./fonts/chillax/Chillax-Regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: 'Chillax-Medium';
    src: url('./fonts/chillax/Chillax-Medium.woff2') format('woff2'),
        url('./fonts/chillax/Chillax-Medium.woff') format('woff'),
        url('./fonts/chillax/Chillax-Medium.ttf') format('truetype');
    font-weight: 500;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: 'Chillax-Semibold';
    src: url('./fonts/chillax/Chillax-Semibold.woff2') format('woff2'),
        url('./fonts/chillax/Chillax-Semibold.woff') format('woff'),
        url('./fonts/chillax/Chillax-Semibold.ttf') format('truetype');
    font-weight: 600;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: 'Chillax-Bold';
    src: url('./fonts/chillax/Chillax-Bold.woff2') format('woff2'),
        url('./fonts/chillax/Chillax-Bold.woff') format('woff'),
        url('./fonts/chillax/Chillax-Bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
    font-style: normal;
}

/**
  * This is a variable font
  * You can control variable axes as shown below:
  * font-variation-settings: wght 700.0;
  *
  * available axes:
  'wght' (range from 200.0 to 700.0)
  */
@font-face {
    font-family: 'Chillax-Variable';
    src: url('./fonts/chillax/Chillax-Variable.woff2') format('woff2'),
        url('./fonts/chillax/Chillax-Variable.woff') format('woff'),
        url('./fonts/chillax/Chillax-Variable.ttf') format('truetype');
    font-weight: 200 700;
    font-display: swap;
    font-style: normal;
}

:root {
    --background-color: #ffe6d2;
    --text-color: #002883;
    --input-text-color: #ffe6d2;
    --input-border-color: #ffe6d2;
    --input-focus-border-color: #ffe6d2;
    --button-border-color: #002883;
    --button-hover-bg-color: #002883;
    --button-hover-text-color: #ffe6d2;
    --popup-bg-color: #002883;
    --popup-shadow-color: rgba(0, 0, 0, 0.5);
    --close-popup-color: #ffe6d2;
    --close-popup-border-color: #ffe6d2;
    --close-popup-hover-color: #002883;
    --close-popup-hover-border: #002883;
    --close-popup-hover-bg-color: #ffe6d2;
    --login-submit-btn: #ffe6d2;
    --login-popup: #ffe6d2;
    --button-border-submit: #ffe6d2;
    --submit-hover-color: #002883;
    --submit-hover-border: #002883;
    --submit-hover-bg-color: #ffe6d2;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Raleway', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    user-select: none;
    position: relative;
}

.container {
    text-align: center;
    position: absolute;
    z-index: 10;
}

#three-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.title-container {
    margin-bottom: 0.8rem;
}

.subtitle-container {
    margin-top: 0.8rem;
}

.main-title {
    font-family: 'Chillax Regular', sans-serif;
    font-size: 7rem;
    font-weight: 400;
    text-transform: uppercase;
    overflow: hidden;
    white-space: nowrap;
    animation: typing 1.5s steps(30, end), grow-and-shrink 1.5s 1.5s forwards;
    border-right: none;
    margin-bottom: 1vh;
    margin-top: 1vh;
    height: auto;
    line-height: 1;
    letter-spacing: -8px;
    transform-origin: center center;
    /* Added this line */
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes grow-and-shrink {
    0% {
        transform: scale(1);
        padding: 0;
    }

    50% {
        transform: scale(1.1);
        padding: 0 40px;
        /* Add padding to provide extra space */
    }

    100% {
        transform: scale(1);
        padding: 0 20px;
    }
}


.subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    overflow: hidden;
    white-space: nowrap;
    border-right: none;
    width: 0;
    animation: typing-subtitle 2.5s steps(40, end) forwards;
    animation-delay: 3s;
    margin: 0;
}

@keyframes typing-subtitle {
    0% {
        width: 0;
        border-right: none;
    }

    1% {
        border-right: 2px solid var(--text-color);
    }

    100% {
        width: 100%;
    }
}

.login-button {
    opacity: 0;
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: 1px solid var(--button-border-color);
    padding: 10px 20px;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1rem;
    transition: opacity 1s;
    border-radius: 20px;
    text-transform: uppercase;
    z-index: 10;
}

.login-button.show {
    opacity: 1;
}

.login-button:hover {
    background-color: var(--button-hover-bg-color);
    color: var(--button-hover-text-color);
}

.login-popup {
    display: none;
    position: absolute;
    top: 80px;
    right: 20px;
    background-color: var(--popup-bg-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px var(--popup-shadow-color);
    z-index: 1000;
}

.login-popup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-popup h2 {
    font-weight: 300;
}

.login-popup input {
    margin: 10px 0;
    padding: 10px;
    width: 200px;
    border: 1px solid var(--input-border-color);
    border-radius: 4px;
    text-transform: lowercase;
    color: var(--input-text-color);
    background: none;
}

.login-popup input:focus {
    border-color: var(--input-focus-border-color);
    outline: none;
}

.login-popup #password {
    margin-bottom: 20px;
}

.login-popup button {
    background: none;
    border: 1px solid var(--button-border-color);
    padding: 10px 20px;
    color: var(--text-color);
    cursor: pointer;
    transition: background-color 0.3s;
    border-radius: 20px;
    text-transform: uppercase;
}

.login-popup button:hover {
    background-color: var(--button-hover-bg-color);
    color: var(--button-hover-text-color);
}

.close-popup {
    align-self: flex-end;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--close-popup-color);
    transition: color 0.3s;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    border: 1.5px solid var(--close-popup-border-color);
    line-height: 0;
}

.close-popup:hover {
    color: var(--close-popup-hover-color);
    border: 1.5px solid var(--close-popup-hover-border);
    background-color: var(--close-popup-hover-bg-color);
}

::placeholder {
    color: var(--input-text-color);
    opacity: 1;
}

#loginSubmit {
    color: var(--login-submit-btn);
    border: 1px solid var(--button-border-submit);
}

#loginSubmit:hover {
    color: var(--submit-hover-color);
    border: 1px solid var(--submit-hover-border);
    background-color: var(--submit-hover-bg-color);
    font-weight: 500;
}

#popupLogin {
    color: var(--login-popup);
}


/* Media query for tablets */
@media (max-width: 768px) {
    .main-title {
        font-size: 6rem;
        letter-spacing: -3px;
        animation: fadeIn 1.5s ease-in-out forwards;
        /* Reduce fade-in duration */
    }

    .subtitle {
        font-size: 1.2rem;
        white-space: normal;
        /* Allow text to wrap on tablets */
        width: auto;
        /* Adjust width automatically */
        animation: fadeIn 1.5s ease-in-out forwards;
        /* Reduce fade-in duration */
    }

    .login-button {
        font-size: 1rem;
        /* Increase font size */
        padding: 12px 24px;
        /* Increase padding for a larger button */
        opacity: 0;
        animation: fadeIn 1.5s ease-in-out forwards;
        /* Sync with other elements */
        animation-delay: 1.5s;
        /* Slight delay, appears just after the titles */
    }

    .login-popup {
        top: 80px;
        /* Increase gap from the top */
        right: 20px;
        /* Increase gap from the right */
        padding: 20px;
    }
}

/* Media query for mobile phones */
@media (max-width: 480px) {
    .main-title {
        font-size: 5rem;
        letter-spacing: -2px;
        animation: fadeIn 1.5s ease-in-out forwards;
        /* Reduce fade-in duration */
    }

    .subtitle {
        font-size: 1rem;
        white-space: normal;
        /* Allow text to wrap on mobile */
        width: auto;
        /* Adjust width automatically */
        animation: fadeIn 1.5s ease-in-out forwards;
        /* Reduce fade-in duration */
    }

    .login-button {
        font-size: 0.9rem;
        /* Increase font size */
        padding: 10px 20px;
        /* Increase padding for a larger button */
        opacity: 0;
        animation: fadeIn 1.5s ease-in-out forwards;
        /* Sync with other elements */
        animation-delay: 1.5s;
        /* Slight delay, appears just after the titles */
    }

    .login-popup {
        top: 70px;
        /* Increase gap from the top */
        right: 10px;
        /* Increase gap from the right */
        padding: 15px;
    }
}

/* Simpler fadeIn animation for smaller screens */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}