html, body {
    margin: 0;
    padding: 0;
    background: #000;
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

#page-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100dvh;
}

/* Основной контейнер игры */
#unity-container {
    width: 100%;
    height: 100dvh;
    max-width: 200dvh;
    aspect-ratio: 2/1;
    background: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Для десктопов — учитываем место под баннер и футер */
@media screen and (min-width: 1024px) {
    #unity-container {
        height: calc(100dvh - 200px);
        max-height: calc(100dvh - 200px);
    }
}

canvas#unity-canvas {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
}

#unity-loading-bar {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

#unity-progress-bar-empty {
    width: 200px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 12px;
}

#unity-progress-bar-full {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00f0ff, #00d3ff);
    transition: width 0.3s ease-out;
}

#unity-warning {
    position: absolute;
    left: 50%;
    top: 5%;
    transform: translateX(-50%);
    background: #ffcccc;
    padding: 10px;
    border-radius: 4px;
    color: #000;
    font-family: sans-serif;
    font-size: 14px;
    display: none;
    z-index: 100;
}

#rotate-notice {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    font-size: 24px;
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    z-index: 999;
}

#desktop-banner {
    display: none;
    width: 100%;
    padding: 20px 0;
    background: #000;
    text-align: center;
    flex-shrink: 0;
}

#footer-links {
    display: none;
    text-align: center;
    padding: 10px 0 20px;
    font-size: 14px;
    color: #aaa;
    font-family: sans-serif;
    background: #000;
}

#footer-links a {
    color: #aaa;
    text-decoration: none;
    margin: 0 8px;
}

#footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

@media screen and (min-width: 1024px) {
    #desktop-banner,
    #footer-links {
        display: block;
    }
}
