@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');

body {
    margin: 0;
    padding: 0;
    background-color: #050510;
    background-image: url('background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Orbitron', sans-serif;
    color: #00ffff;
    overflow: hidden;
    /* Prevent scrollbars if possible */
    height: 100vh;
    width: 100vw;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#ui-overlay {
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    z-index: 10;
    text-align: center;
    pointer-events: none;
    /* Let clicks pass through to game if needed, though header is usually safe */
}

h1.glitch-title {
    font-size: 4rem;
    text-transform: uppercase;
    text-shadow:
        0 0 5px #00ffff,
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 40px #0000ff,
        0 0 80px #0000ff;
    animation: pulsar 2s infinite alternate;
    margin: 0;
    pointer-events: auto;
}

@keyframes pulsar {
    0% {
        opacity: 0.8;
        text-shadow: 0 0 5px #00ffff;
    }

    100% {
        opacity: 1;
        text-shadow: 0 0 20px #00ffff, 0 0 40px #0000ff;
    }
}

#unity-container {
    position: relative;
    width: 960px;
    height: 600px;
    max-width: 90vw;
    max-height: 80vh;
    border: 2px solid #00ffff;
    box-shadow: 0 0 20px #00ffff, inset 0 0 20px #00ffff;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
}

#unity-loading-bar {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: none;
    text-align: center;
    width: 80%;
    max-width: 400px;
}

#loading-text {
    color: #00ffff;
    font-size: 24px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #00ffff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#loading-tips {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-style: italic;
    min-height: 40px;
    transition: opacity 0.5s ease-in-out;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    background: rgba(0, 0, 50, 0.6);
    padding: 10px;
    border-radius: 5px;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

#unity-logo {
    width: 154px;
    height: 130px;
    background: url('TemplateData/unity-logo-dark.png') no-repeat center;
    /* Verify this exists or replace */
    background-size: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px #00ffff);
}

#unity-progress-bar-empty {
    width: 200px;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #00ffff;
    border-radius: 5px;
    overflow: hidden;
    margin: auto;
}

#unity-progress-bar-full {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #0080ff, #00ffff);
    background-size: 200% 100%;
    box-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

#unity-footer {
    position: absolute;
    bottom: 10px;
    width: 100%;
    text-align: center;
    color: rgba(0, 255, 255, 0.7);
    font-size: 0.8rem;
    pointer-events: none;
}

#unity-fullscreen-button {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 38px;
    height: 38px;
    background: url('TemplateData/fullscreen-button.png') no-repeat center;
    background-size: contain;
    cursor: pointer;
    filter: drop-shadow(0 0 5px #00ffff);
    pointer-events: auto;
    transition: transform 0.2s;
}

#unity-fullscreen-button:hover {
    transform: scale(1.1);
}

#unity-warning {
    position: absolute;
    left: 50%;
    top: 5%;
    transform: translate(-50%);
    background: rgba(0, 0, 50, 0.95);
    border: 2px solid #00ffff;
    border-radius: 8px;
    padding: 15px 20px;
    display: none;
    color: #00ffff;
    font-size: 14px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    max-width: 80%;
    text-align: center;
    z-index: 1000;
}

.unity-mobile #unity-container {
    width: 100%;
    height: 100%;
    border: none;
}

.unity-mobile h1.glitch-title {
    font-size: 2.5rem;
}

.unity-mobile #loading-text {
    font-size: 18px;
}

.unity-mobile #loading-tips {
    font-size: 12px;
}