body {
    margin: 0;
    padding: 0;
    background-color: white;
    font-family: Arial, sans-serif;
    overflow: hidden;
    height: 100vh;
}

#unity-container {
    position: absolute;
    width: 100%;
    height: 100%;
    visibility: hidden;
    opacity: 0;
    transition: opacity 1s ease;
}

#unity-container.visible {
    visibility: visible;
    opacity: 1;
}

#loading-screen {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 1s ease;
    z-index: 10;
}

.tutorial-card {
    width: 100%;
    max-width: 1100px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
    /* Фиксируем высоту карточки */
    min-height: 600px;
    box-sizing: border-box;
}

.tutorial-title {
    color: #4CAF50;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    /* Фиксируем высоту заголовка */
    height: 40px;
}

.tutorial-video-container {
    width: 100%;
    height: 600px;
    background-color: #f5f5f5;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    /* Фиксируем размер контейнера */
    flex-shrink: 0;
}

.tutorial-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.tutorial-video.active {
    opacity: 1;
}

.tutorial-description-container {
    width: 100%;
    min-height: 50px;
    position: relative;
    /* Фиксируем высоту контейнера описания */
    height: 50px;
    overflow: hidden;
}

.tutorial-description {
    position: absolute;
    width: 100%;
    text-align: center;
    color: #333;
    font-size: 18px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    top: 0;
    left: 0;
}

.tutorial-description.active {
    opacity: 1;
    transform: translateY(0);
}

.loading-indicator {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
}

.spinner-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-background {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid #e0e0e0;
    border-radius: 50%;
}

.timer {
    position: relative;
    font-size: 18px;
    font-weight: bold;
    color: #4CAF50;
    z-index: 2;
}

.footer-text h3 {
    color: #777;
    font-size: 16px;
    text-align: center;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Основные стили для сообщения */
.orientation-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #4CAF50;
    color: white;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    font-size: 16px;
    text-align: center;
    visibility: hidden;
    transition: visibility 0.3s ease;
}

/* Адаптация для мобильных устройств */
@media (max-width: 1024px) {
    .tutorial-card {
        max-width: 70%;
        min-height: 250px;
        padding: 5px;
    }

    .tutorial-video-container {
        height: 200px;
        padding-bottom: 15px;
    }

    .tutorial-title {
        font-size: 16px;
        margin-bottom: 5px;
    }

    .tutorial-description {
        font-size: 12px;
    }

    .footer-text h3 {
        font-size: 6px;
    }
}

/* Гарантированное скрытие контента в портретной ориентации */
@media (orientation: portrait) {
    body > *:not(.orientation-message) {
        display: none !important;
    }
    
    .orientation-message {
        display: flex !important;
        visibility: visible !important;
    }
}

/* Для ландшафтной ориентации */
@media (orientation: landscape) {
    .orientation-message {
        display: none !important;
    }
}