* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    background-color: #f0f0f0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.square {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #0066ff 0%, #0033cc 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    transform-origin: center center;
    /* Убираем transition, так как анимация будет управляться через JavaScript */
    will-change: transform;
    /* Добавляем свойства для плавной анимации */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Адаптация для маленьких экранов */
@media (max-width: 480px) {
    .square {
        width: 150px;
        height: 150px;
    }
}

/* Адаптация для очень маленьких экранов */
@media (max-width: 320px) {
    .square {
        width: 120px;
        height: 120px;
    }
}
