body {
    margin: 0;
    min-height: 100vh;

    background: black;

    overflow: hidden;
}
#world
{
    position: fixed;
    inset: 0;

    transform-origin: center center;
}

/* ====================
   Himmel
==================== */

#skyCanvas {

    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    pointer-events: none;

    z-index: 0;
}
/* ====================
   Sterne
==================== */
#starsCanvas {

    position: fixed;

    inset: 0;

    width: 100%;
    height: 100%;

    pointer-events: none;

    z-index: 3;
}

/* ====================
   Sonne / Mond
==================== */

#sunMoonCanvas {

    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    pointer-events: none;

    z-index: 4;
}


/* ====================
   Wolken
==================== */

#cloudCanvas {

    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    pointer-events: none;

    z-index: 5;
}


/* ====================
   Hintergrund
==================== */

#bg1,
#bg2 {

    position: fixed;
    inset: 0;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    pointer-events: none;

    transition: opacity 2s ease;

    z-index: 10;
}

#bg2 {

    opacity: 0;
}


/* ====================
   Nebel
==================== */

#fogCanvas {

    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    pointer-events: none;

    z-index: 15;
}


/* ====================
   Wetter
==================== */

#weatherCanvas {

    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    pointer-events: none;

    z-index: 20;
}

#stormCanvas {

    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    pointer-events: none;

    z-index: 21;
}



#lightning {

    position: fixed;
    inset: 0;

    background: white;

    opacity: 0;

    pointer-events: none;

    transition: opacity 0.1s;

    z-index: 21;
}


/* ====================
   Veranda
==================== */

#V1,
#V2 {

    position: fixed;
    inset: 0;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    pointer-events: none;

    transition: opacity 2s ease;

    z-index: 25;
}

#V2 {

    opacity: 0;
}


/* ====================
   Farb-Overlay
==================== */

#overlay {

    position: fixed;
    inset: 0;

    pointer-events: none;

    transition: background-color 3s ease;

    z-index: 30;
}

#intro {
    position: fixed;
    inset: 0;

    z-index: 1000;

    pointer-events: none;
}

#welcomeTitle
{
    position: fixed;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -400px);

    opacity: 0;

    z-index: 100;
}
#welcomeTitle.exit
{
    animation: titleExit .8s ease-in forwards;
}

#welcomeTitle.show
{
    animation: titleDrop 0.7s ease-out forwards;
}

#setup
{
    position: fixed;
    inset: 0;

    display: flex;

    justify-content: center;
    align-items: flex-start;
    padding-top: 250px;
    padding-left: 120px;
    z-index: 3000;
      opacity: 0;

    pointer-events: none;

    transition:
        opacity 4s ease;
}
.setupHeadline
{
    color: white;

    font-size: 30px;
    font-weight: 300;

    letter-spacing: 2px;

    text-align: center;

    margin-bottom: 25px;
}
.selector
{
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 35px;
}
.selector .arrow
{
    font-size: 38px;

    font-weight: 700;      /* dicker */

    color: rgba(255,255,255,.75);

    cursor: pointer;       /* Hand */

    user-select: none;     /* nicht markierbar */

    transition: .25s;
}


.arrow.left:hover
{
    transform: translateX(-7px) scale(1.2);
}

.arrow.right:hover
{
    transform: translateX(7px) scale(1.2);
}
.selector .value
{
    
    user-select: none;     /* nicht markierbar */
    width: 260px;

    text-align: center;

    color: white;

    font-size: 26px;

    font-weight: 300;

    letter-spacing: 4px;
}

/* ====================
   Setup-Schritte (Name, Auswahl, Standort, Städte-Liste)
   Alle vier funktionieren gleich: per JS wird erst
   display:flex gesetzt, dann (einen Frame später) die
   .show-Klasse für die Fade-Transition ergänzt. Kein
   Margin-Trick mehr - robust, egal wie viele Schritte
   es sind.
==================== */

.setupStepPanel
{
    display: none;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 25px;

    opacity: 0;

    transition: opacity .3s ease;
}

.setupStepPanel.show
{
    opacity: 1;

    animation: stepDrop 0.6s ease-out forwards;
}

/* Fällt von oben rein und wippt kurz nach, bevor sie sich
   setzt - wie beim ursprünglichen Margin-Trick, nur diesmal
   über transform (kostet keinen Platz im Flex-Layout, kann
   also nichts mehr verschieben) */
@keyframes stepDrop
{
    0%
    {
        opacity: 0;
        transform: translateY(-260px);
    }

    15%
    {
        opacity: 1;
    }

    45%
    {
        transform: translateY(18px);
    }

    65%
    {
        transform: translateY(-8px);
    }

    85%
    {
        transform: translateY(4px);
    }

    100%
    {
        transform: translateY(0);
    }
}

/* Veranda/Hintergrund-Auswahl: nur geradlinig von oben
   reinfallen, ohne das Nachwippen der anderen Schritte */
#setupSelection.show
{
    animation: stepDropSimple 0.6s ease-out forwards;
}

@keyframes stepDropSimple
{
    0%
    {
        opacity: 0;
        transform: translateY(-260px);
    }

    100%
    {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====================
   Standort-Eingabe (Stadt/PLZ)
==================== */

#setupLocation .setupHeadline
{
    line-height: 1.5;
}

.setupInputBox
{
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 15px;
}

#locationInput
{
    width: 340px;

    background: transparent;

    border: none;
    outline: none;

    text-align: center;

    color: white;

    font-size: 24px;

    letter-spacing: 2px;

    caret-color: rgb(255, 255, 255);
}

#locationError
{
    display: none;

    color: rgb(255, 110, 110);

    font-size: 15px;

    letter-spacing: .5px;

    text-align: center;
}

/* ====================
   Standort-Fallback (Stadt-Liste)
==================== */

#cityTabs
{
    display: flex;
    flex-wrap: wrap;

    justify-content: center;
    align-items: center;

    gap: 12px;

    max-width: 420px;
}

.cityTab
{
    padding: 10px 18px;

    border-radius: 20px;

    border: 1px solid rgba(255,255,255,.3);

    background: rgba(255,255,255,.06);

    color: white;

    font-size: 15px;
    font-weight: 300;
    letter-spacing: 1px;

    cursor: pointer;
    user-select: none;

    transition: .25s;
}

.cityTab:hover
{
    background: rgba(255,255,255,.14);
    transform: translateY(-2px);
}

.cityTab.active
{
    background: rgba(120, 220, 150, .28);

    border-color: rgba(140, 255, 170, .9);

    box-shadow: 0 0 12px rgba(140, 255, 170, .5);
}

#cityTabs.shake,
#inputBox.shake
{
    animation: cityShake .5s ease-in-out;
}

@keyframes cityShake
{
    0%   { transform: translateX(0); }
    12%  { transform: translateX(-9px); }
    24%  { transform: translateX(8px); }
    36%  { transform: translateX(-7px); }
    48%  { transform: translateX(6px); }
    60%  { transform: translateX(-4px); }
    72%  { transform: translateX(3px); }
    84%  { transform: translateX(-1.5px); }
    100% { transform: translateX(0); }
}

#nameError
{
    display: none;

    margin-top: 10px;

    color: rgb(255, 110, 110);

    font-size: 15px;

    letter-spacing: .5px;

    text-align: center;
}
#setupTitle
{
    color: white;
    text-align: center;
    margin: 0;
}
#inputBox
{
    margin-top: 50px;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 15px;
}
#setupPanel
{
    width: 520px;
    height: 480px;

    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    transition: height .6s ease;


    background: rgba(39, 39, 39, 0.72);

    border-radius: 38px;

    border: 2px solid rgba(255, 250, 237, 0.9);

    box-shadow:
        0 0 30px rgba(255,220,120,.9),
        0 0 45px rgba(255,220,120,.55),
        0 0 70px rgba(255,220,120,.22);

    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(10px);
}

#profileInput
{
    width: 340px;
    
    background: transparent;

    border: none;
    outline: none;

    text-align: center;

    color: white;

    font-size: 28px;

    letter-spacing: 2px;

    caret-color: rgb(255, 255, 255);
}



#inputBox .line
{
    width: 340px;
    height: 2px;
    
    background: linear-gradient(
        to right,
        transparent,
        rgba(255,255,255,.2),
        rgba(255,255,255,.9),
        rgba(255,255,255,.2),
        transparent
    );
}
/*
////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////BUTTONN /////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
*/
.menuButton
{
    position: relative;

    width: 420px;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 18px;

    cursor: pointer;

    user-select: none;

    border: none;
    outline: none;
    background: transparent;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

#continueButton
{
    width: 300px;
}

#continueButton .text
{
    font-size: 30px;
}

#continueButton
{
    gap: 22px;
}

#continueButton::before
{
    transform: translate(-50%, -50%) scale(0.7);

    filter: blur(12px);
}

.menuButton .text
{
    color: white;

    font-size: 28px;
    font-weight: 300;

    letter-spacing: 10px;

    opacity: .88;

    transition: .35s;
}

.menuButton::before
{
    content: "";

    position: absolute;

    left: 50%;
    top: 50%;

    transform: translate(-50%,-50%);

    width: 650px;
    height: 90px;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    background: linear-gradient(
        to right,
        transparent,
        rgba(255,255,255,.05),
        rgba(255,255,255,.15),
        rgba(255,255,255,.3),
        rgba(255,255,255,.15),
        rgba(255,255,255,.05),
        transparent
    );

    filter: blur(2px);

    pointer-events: none;

    z-index: -1;

    transition: .35s;
}

.menuButton:hover
{
    background: rgba(255,255,255,.03);
}

.menuButton:hover::before
{
    width: 800px;

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.menuButton:hover .line
{
    opacity: 1;
}

.menuButton:hover .text
{
    opacity: 1;

    letter-spacing: 14px;

    text-shadow: 0 0 12px rgba(255,255,255,.4);
}

/*
////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////BUTTONN /////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
*/
#startButton
{
    position: fixed;

    left: 50%;
    top: 72%;

    transform: translate(-50%,-50%);

    z-index: 2000;

    opacity: 0;

    pointer-events: auto;
}
#profileNameDisplay
{
    display: none;

    position: absolute;

    top: 22px;
    left: 50%;

    transform: translateX(-50%);

    color: rgba(255,255,255,.5);

    font-size: 14px;
    font-weight: 300;
    letter-spacing: 3px;

    text-transform: uppercase;
}

#continueButton
{
    position: absolute;

    left: 50%;
    bottom: 30px;

    transform: translateX(-50%) scale(0.5);
}

#continueButton.disabled
{
    opacity: 0.4;
    pointer-events: none;
}

#startButton.show
{
    animation: buttonAppear .8s forwards;
}
@keyframes buttonAppear
{
    0%
    {
        opacity: 0;

        transform:
            translate(-50%, -50%)
            scale(0.2);
    }

    40%
    {
        opacity: 1;
    }

    70%
    {
        transform:
            translate(-50%, -50%)
            scale(1.08);
    }

    100%
    {
        opacity: 1;

        transform:
            translate(-50%, -50%)
            scale(1);
    }
}
@keyframes titleExit
{
   
    0%
    {
         opacity: 1;
        transform: translate(-50%, -50%);
    }

    15%
    {
        transform: translate(-50%, -58%);
    }

    30% 
    {
       
        transform: translate(-50%, -50%);
    }
    80%
    {
         opacity: 1;
    }
    100%
    {
        opacity: 0;
        transform: translate(-50%, -220%);
    }
}
#startButton.exit
{
    animation: buttonFade .5s ease-in forwards;
}
#world.enter
{
    animation: enterWorld 0.3s ease-in forwards;
}
#world.back
{
    animation:
        worldBack
        0.5s
        ease-out
        forwards;
}
@keyframes worldBack
{
    0%
    {
        transform: translateY(-130vh)
            scale(6);;

        filter: blur(2px);
        opacity: 0;
    }

    100%
    {
        opacity:1;
        transform:
            translate(0,0)
            scale(1);
        filter: blur(0px);
    }
}
@keyframes enterWorld
{
    
    0%
    {
        transform:
            translate(0,0)
            scale(1);
        filter: blur(0px);
    }

 
    100%
    {
        transform: translateY(-130vh)
            scale(6);;

        filter: blur(2px);
        opacity: 0;
    }
}


@keyframes buttonFade
{
    to
    {
        opacity: 0;
    }
}
@keyframes titleDrop
{
    0%
    {
        opacity: 0;
        transform: translate(-50%, -400px);
    }

    15%
    {
        opacity: 1;
    }

    40%
    {
        transform: translate(-50%, -50%);
    }

    55%
    {
        transform: translate(-50%, -75%);
    }

    70%
    {
        transform: translate(-50%, -50%);
    }

    82%
    {
        transform: translate(-50%, -57%);
    }

    100%
    {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}