:root {
    --black: #0d0d0e;
    --grey-dark: #1a1a1c;
    --white: #d1dbe4;
    --accent: #8899a6;
    --portal-blue: #4fc3f7;
    --glow: rgba(209, 219, 228, 0.15);
}

@font-face {
    font-family: 'aaalex-ui';
    src: url('fonts/aaalex-ui.ttf') format('truetype');
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    height: 100%;
    height: 100dvh; 
    background-color: var(--black);
    color: var(--white);
    font-family: 'aaalex-ui', 'Courier New', monospace;
    overflow: hidden;
    line-height: 1.6;
}

body::before {
    content: " ";
    display: block;
    position: fixed;
    inset: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
    z-index: 50;
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
}

#loader {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    background: var(--black);
    transition: opacity 0.8s ease-out;
    text-align: center;
    padding: 15px;
}

.loaderContent {
    background: var(--grey-dark);
    border: 1px solid #2a2a2c;
    padding: 40px 25px;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    width: 90%;
    max-width: 570px;
    display: flex;
    flex-direction: column;
}

.loaderTitle {
    font-size: clamp(1.4rem, 7.5vw, 2.5rem);
    letter-spacing: 0.15rem;
    text-transform: uppercase;
    margin-bottom: 10px;
    text-shadow: 0 0 10px var(--glow);
    word-wrap: break-word;
    line-height: 1.2;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 25px 0;
    flex-shrink: 0;
}

#statusContainer {
    font-size: 0.9rem;
    letter-spacing: 1px;
    min-height: 1.5rem;
    flex-shrink: 0;
}

#startBtn {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--accent);
    padding: 12px 35px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    letter-spacing: 3px;
    transition: all 0.3s ease;
    margin-top: 20px;
    outline: none;
    text-transform: uppercase;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

#startBtn:hover, #startBtn:active {
    background: var(--white);
    color: var(--black);
    box-shadow: 0 0 15px var(--glow);
}

.loading {
    display: inline-block;
    width: 24px;
    text-align: left;
    font-family: monospace;
}

#homepage {
    height: 100dvh;
    width: 100vw;
    background: linear-gradient(rgba(13, 13, 14, 0.8), rgba(13, 13, 14, 0.8)),
                url('images/background.png');
    background-size: cover;
    background-position: bottom center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 10dvh;
    position: relative;
    transition: opacity 1s ease-in-out;
}

.navbar {
    position: absolute;
    top: 25px;
    display: flex;
    gap: 20px;
    z-index: 10;
}

.navbar a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.7rem;
    letter-spacing: 1px;
    opacity: 0.7;
}

.title {
    font-size: clamp(1.6rem, 9vw, 3rem);
    letter-spacing: 4px;
    text-shadow: 0 0 10px var(--glow);
    z-index: 5;
    text-align: center;
    padding: 0 10px;
}

.dialogueContainer {
    position: absolute;
    bottom: 40px; 
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 700px;
    min-height: 120px; 
    background: var(--grey-dark);
    border: 1px solid var(--accent);
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 10;
}

@media (max-width: 800px) {
    .loaderContent { 
        padding: 30px 15px; 
    }
    
    .loaderTitle {
        font-size: 1.20rem; 
        letter-spacing: 0.08rem; 
    }

    .navbar { gap: 12px; top: 20px; }
    #startBtn { width: 100%; letter-spacing: 2px; }
    
    .dialogueContainer { 
        bottom: 20px; 
        padding: 15px;
    }
}

@keyframes snowLoop {
    0% { transform: translate(0, 0); }
    100% { transform: translate(400px, 400px); }
}