/* =========================================================
   GLOBAL
   ========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;

    overflow: hidden;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: #000;
}

button,
input {
    font-family: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   SCREEN
   ========================================================= */

.screen {
    position: fixed;

    inset: 0;

    width: 100vw;
    height: 100vh;

    z-index: 100;
}

.hidden {
    display: none !important;
}


/* =========================================================
   LANGUAGE
   ========================================================= */

.screen-dark {
    display: flex;

    align-items: center;
    justify-content: center;

    background: #000;

    color: #fff;
}

.language-content {
    display: flex;

    flex-direction: column;

    align-items: center;

    text-align: center;
}

.logo-title {
    font-size: clamp(36px, 8vw, 72px);

    font-weight: 300;

    letter-spacing: 0.35em;

    margin-left: 0.35em;
}

.language-subtitle {
    margin-top: 20px;

    font-size: 11px;

    letter-spacing: 0.35em;

    opacity: 0.45;
}

.language-buttons {
    display: flex;

    flex-direction: column;

    gap: 14px;

    margin-top: 55px;

    width: min(260px, 70vw);
}

.language-button {
    height: 48px;

    border: 1px solid rgba(255,255,255,0.35);

    background: transparent;

    color: white;

    font-size: 15px;

    letter-spacing: 0.12em;

    cursor: pointer;

    transition:
        background 0.25s,
        color 0.25s,
        border-color 0.25s;
}

.language-button:hover {
    background: white;

    color: black;

    border-color: white;
}

.language-button:active {
    transform: scale(0.98);
}


/* =========================================================
   INTRO
   ========================================================= */

.intro-screen {
    background: #000;

    color: #000;

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;

    opacity: 0;

    transition:
        background 2.8s ease,
        opacity 0.8s ease;
}

.intro-screen.active {
    opacity: 1;
}

.intro-screen.white {
    background: #fff;
}

.intro-logo {
    position: relative;

    z-index: 5;

    font-size: clamp(34px, 8vw, 72px);

    letter-spacing: 0.35em;

    margin-left: 0.35em;

    opacity: 0;

    transition: opacity 1.2s ease;
}

.intro-screen.white .intro-logo {
    opacity: 1;
}


/* =========================================================
   BIRD FIELD
   ========================================================= */

#bird-field {
    position: absolute;

    inset: 0;

    overflow: hidden;

    pointer-events: none;
}

.intro-bird {
    position: absolute;

    left: -80px;

    color: white;

    font-size: 20px;

    opacity: 0.9;

    white-space: nowrap;

    animation-name: bird-fly;

    animation-timing-function: linear;

    animation-fill-mode: forwards;
}

@keyframes bird-fly {

    0% {
        transform:
            translateX(-100px)
            translateY(0)
            scale(0.8);
    }

    25% {
        transform:
            translateX(25vw)
            translateY(-30px)
            scale(1);
    }

    50% {
        transform:
            translateX(50vw)
            translateY(20px)
            scale(1.1);
    }

    75% {
        transform:
            translateX(75vw)
            translateY(-20px)
            scale(1);
    }

    100% {
        transform:
            translateX(110vw)
            translateY(10px)
            scale(0.8);
    }

}


/* =========================================================
   AUTH
   ========================================================= */

.auth-screen {
    display: flex;

    align-items: center;
    justify-content: center;

    background: #fff;

    color: #111;

    opacity: 0;

    transition: opacity 0.7s ease;
}

.auth-screen.visible {
    opacity: 1;
}

.auth-panel {
    width: min(380px, 82vw);

    display: flex;

    flex-direction: column;

    align-items: stretch;
}

.auth-view {
    width: 100%;
}

.auth-title {
    text-align: center;

    font-size: clamp(32px, 8vw, 54px);

    font-weight: 300;

    letter-spacing: 0.3em;

    margin-left: 0.3em;
}

.auth-subtitle {
    margin-top: 12px;

    margin-bottom: 42px;

    text-align: center;

    font-size: 11px;

    letter-spacing: 0.3em;

    color: #888;
}

.input-group {
    margin-bottom: 22px;
}

.input-group label {
    display: block;

    margin-bottom: 8px;

    font-size: 10px;

    letter-spacing: 0.18em;

    color: #777;
}

.input-group input {
    width: 100%;

    height: 46px;

    padding: 0 12px;

    border: none;

    border-bottom: 1px solid #bbb;

    outline: none;

    background: transparent;

    font-size: 16px;

    color: #111;

    transition: border-color 0.2s;
}

.input-group input:focus {
    border-bottom-color: #111;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.primary-button {
    width: 100%;

    height: 48px;

    margin-top: 10px;

    border: 1px solid #111;

    background: #111;

    color: white;

    font-size: 12px;

    letter-spacing: 0.2em;

    cursor: pointer;

    transition:
        background 0.2s,
        color 0.2s;
}

.primary-button:hover {
    background: white;

    color: #111;
}

.primary-button:disabled {
    opacity: 0.35;

    cursor: default;
}

.text-button {
    margin-top: 24px;

    border: none;

    background: transparent;

    color: #777;

    font-size: 11px;

    letter-spacing: 0.1em;

    cursor: pointer;
}

.text-button:hover {
    color: #111;
}


/* =========================================================
   AUTH MESSAGE
   ========================================================= */

.auth-message {
    min-height: 20px;

    margin-top: 2px;

    margin-bottom: 4px;

    text-align: center;

    font-size: 12px;

    line-height: 1.5;
}

.auth-message.error {
    color: #b00020;
}

.auth-message.success {
    color: #333;
}


/* =========================================================
   UNITY
   ========================================================= */

#unity-container {
    position: fixed;

    inset: 0;

    width: 100vw;
    height: 100vh;

    z-index: 1;

    opacity: 0;

    pointer-events: none;

    background: #000;

    transition: opacity 0.8s ease;
}

#unity-container.visible {
    opacity: 1;

    pointer-events: auto;
}

#unity-canvas {
    width: 100%;
    height: 100%;

    display: block;

    background: #000;
}


/* =========================================================
   UNITY LOADING
   ========================================================= */

.unity-loading-screen {
    display: flex;

    align-items: center;
    justify-content: center;

    background: #000;

    color: white;

    overflow: hidden;
}

.loading-image {
    position: absolute;

    inset: 0;

    width: 100vw;
    height: 100vh;

    object-fit: cover;

    background: #000;
}

.loading-overlay {
    position: absolute;

    left: 50%;
    bottom: 12%;

    transform: translateX(-50%);

    width: min(420px, 72vw);

    text-align: center;
}

.loading-title {
    font-size: 11px;

    letter-spacing: 0.35em;

    margin-left: 0.35em;

    margin-bottom: 12px;

    opacity: 0.8;
}

.loading-percent {
    font-size: 13px;

    letter-spacing: 0.12em;

    margin-bottom: 10px;
}

.loading-bar {
    width: 100%;

    height: 2px;

    background: rgba(255,255,255,0.25);
}

.loading-bar-fill {
    width: 0%;

    height: 100%;

    background: white;

    transition: width 0.15s linear;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .logo-title {
        font-size: 38px;
    }

    .auth-panel {
        width: 82vw;
    }

    .auth-title {
        font-size: 38px;
    }

}
