/* css/rotate-device.css - Минималистичный экран поворота устройства */

/* ============================================
   ROTATE DEVICE OVERLAY
   ============================================ */
.rotate-device-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1a1a1a; /* Строгий темно-серый фон */
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Показываем только на мобильных в портретной ориентации */
@media (max-width: 768px) and (orientation: portrait) {
    .rotate-device-overlay {
        display: flex !important;
    }
}

/* Скрываем на десктопах и в ландшафтной ориентации */
@media (min-width: 769px), (orientation: landscape) {
    .rotate-device-overlay {
        display: none !important;
    }
}

.rotate-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    width: 100%;
    max-width: 90vw;
}

/* Эмодзи телефона с анимацией */
.phone-emoji {
    font-size: 120px;
    line-height: 1;
    animation: rotatePhone 3s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

/* Анимация переворота */
@keyframes rotatePhone {
    0%, 20% {
        transform: rotate(0deg);
    }
    30%, 70% {
        transform: rotate(90deg);
    }
    80%, 100% {
        transform: rotate(0deg);
    }
}

/* Заголовок */
.rotate-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

/* Маленькие телефоны */
@media (max-width: 375px) {
    .phone-emoji {
        font-size: 80px;
        width: 80px;
        height: 80px;
    }
    
    .rotate-title {
        font-size: 22px;
    }
    
    .rotate-content {
        gap: 20px;
    }
}

/* Средние телефоны */
@media (min-width: 376px) and (max-width: 414px) {
    .phone-emoji {
        font-size: 100px;
        width: 100px;
        height: 100px;
    }
    
    .rotate-title {
        font-size: 24px;
    }
}

/* Большие телефоны и маленькие планшеты */
@media (min-width: 415px) and (max-width: 768px) {
    .phone-emoji {
        font-size: 140px;
        width: 140px;
        height: 140px;
    }
    
    .rotate-title {
        font-size: 32px;
    }
    
    .rotate-content {
        gap: 40px;
    }
}

/* Планшеты */
@media (min-width: 600px) and (max-width: 1024px) and (orientation: portrait) {
    .phone-emoji {
        font-size: 160px;
        width: 160px;
        height: 160px;
    }
    
    .rotate-title {
        font-size: 36px;
    }
}

/* Учитываем высоту экрана */
@media (max-height: 500px) {
    .phone-emoji {
        font-size: 60px;
        width: 60px;
        height: 60px;
    }
    
    .rotate-title {
        font-size: 20px;
    }
    
    .rotate-content {
        gap: 15px;
    }
}

@media (min-height: 501px) and (max-height: 700px) {
    .phone-emoji {
        font-size: 90px;
        width: 90px;
        height: 90px;
    }
    
    .rotate-title {
        font-size: 24px;
    }
}

/* Специальные стили для iPhone X и выше (с выемкой) */
@supports (padding-top: env(safe-area-inset-top)) {
    .rotate-device-overlay {
        padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    }
}

/* Плавное появление */
.rotate-device-overlay {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Предотвращаем выделение текста */
.rotate-content {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Дополнительные стили для идеального центрирования */
.rotate-device-overlay * {
    margin: 0;
    padding: 0;
}

.rotate-title {
    white-space: nowrap; /* Предотвращаем перенос текста */
}