:root {
    --bg-dark: #111418;
    --bg-navy: #1A1E24;
    --neon-cyan: #00E5FF;
    --neon-cyan-glow: rgba(0, 229, 255, 0.6);
    --text-main: #FFFFFF;
    --text-muted: #8A939F;
    --font-family: 'Rajdhani', 'Segoe UI', Roboto, Helvetica, sans-serif;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #000;
    font-family: var(--font-family);
    box-sizing: border-box;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

#unity-container {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
}

#unity-canvas {
    width: 100%;
    height: 100%;
    display: block;
    outline: none;
}

#loading-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: radial-gradient(circle at center, var(--bg-navy) 0%, var(--bg-dark) 100%);

    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;

    transition: opacity 1.0s ease-in-out, visibility 1.0s;
}

#loading-cover::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

#loading-cover.hidden {
    opacity: 0;
    pointer-events: none;
}

#loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 101;
    width: 80%;
    max-width: 600px;
}

.logo-container img {
    max-width: 400px;
    width: 100%;
    filter: drop-shadow(0 0 15px rgba(0, 229, 255, 0.4));
    animation: pulse 3s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 15px rgba(0, 229, 255, 0.4));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 30px rgba(0, 229, 255, 0.8));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 15px rgba(0, 229, 255, 0.4));
    }
}

.hero-subtitle {
    text-align: center;
    margin: 35px 0 40px 0;
}

.hero-subtitle h1 {
    color: var(--text-main);
    font-size: 22px;
    letter-spacing: 3px;
    margin: 0 0 8px 0;
    font-weight: 600;
    text-transform: uppercase;
}

.hero-subtitle p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
    letter-spacing: 1px;
}

#unity-progress-bar-empty {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    position: relative;
}

#unity-progress-bar-full {
    height: 100%;
    background: var(--neon-cyan);
    width: 0%;
    border-radius: 4px;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px var(--neon-cyan-glow);
    position: relative;
}

#unity-progress-bar-full::after {
    content: "";
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 15px #fff, 0 0 20px var(--neon-cyan);
    filter: blur(1px);
}

#unity-progress-bar-full::before {
    content: "";
    background: #fff;
    height: 100%;
    border-radius: 25px;
    display: block;
    animation: 1s ease 0s infinite normal none running load;
    opacity: 0.8;
}

@keyframes load {
    0% {
        opacity: 0.7;
        width: 5%;
    }

    80% {
        opacity: 0.7;
        width: 100%;
    }

    100% {
        opacity: 0;
    }
}

.footer-text {
    position: absolute;
    bottom: 30px;
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.footer-text a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-text a:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan-glow);
}

#unity-fullscreen-button {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 20px;
    width: 44px;
    height: 44px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFFFFF'%3E%3Cpath d='M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 30px;

    background-color: rgba(26, 30, 36, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

#unity-fullscreen-button.is-fullscreen {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFFFFF'%3E%3Cpath d='M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z'/%3E%3C/svg%3E");
}

#unity-fullscreen-button:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
    background-color: rgba(0, 229, 255, 0.1);
    transform: translateX(-50%) translateY(-2px);
}

#orientation-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 20, 24, 0.95);
    z-index: 999;
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    text-align: center;
}

.orientation-content {
    color: var(--text-main);
}

.rotate-icon {
    width: 60px;
    margin-bottom: 25px;
    animation: tilt 2s infinite ease-in-out;
    filter: drop-shadow(0 0 15px var(--neon-cyan-glow));
}

#orientation-overlay h2 {
    margin: 0 0 10px 0;
    font-size: 20px;
    letter-spacing: 2px;
    color: var(--neon-cyan);
    text-transform: uppercase;
}

#orientation-overlay p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}

@keyframes tilt {
    0% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(-90deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@media screen and (max-width: 1024px) and (orientation: portrait) {
    #orientation-overlay {
        display: flex;
    }

    #unity-container {
        display: none;
    }
}

#spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 229, 255, 0.1);
    border-top: 3px solid var(--neon-cyan);
    border-radius: 50%;
    animation: spinner-spin 1s linear infinite;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
    margin: 10px 0;
}

@keyframes spinner-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
