* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #000;
    color: white;
    overflow: hidden;
    height: 100vh;
    touch-action: manipulation;
}

.video-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Основной стиль для видео - растягиваем по ширине */
.video-player {
    width: 100vw; /* Всегда на всю ширину экрана */
    height: auto; /* Высота пропорциональна */
    min-height: 100vh; /* Минимум на всю высоту экрана */
    object-fit: cover; /* Обрезаем сверху/снизу если не влезает */
    z-index: 1;
}

/* Если видео шире, чем экран (горизонтальное видео на вертикальном экране) */
@media (orientation: portrait) {
    .video-player.landscape {
        width: auto;
        height: 100vh;
        object-fit: contain; /* Черные полосы по бокам */
    }
}

/* Если видео уже, чем экран (вертикальное видео на горизонтальном экране) */
@media (orientation: landscape) {
    .video-player.portrait {
        width: 100vw;
        height: auto;
        min-height: 100vh;
        object-fit: cover; /* Обрезаем по бокам */
    }
    
    .video-player.landscape {
        width: auto;
        height: 100vh;
        object-fit: contain; /* Черные полосы сверху/снизу */
    }
}

/* Логотип */
.logo {
    position: absolute;
    top: 20px;
    left: 15px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    padding: 5px 10px;
}

.logo img {
    height: 30px;
    width: auto;
    display: block;
}

/* LIVE бейдж */
.live-badge {
    position: absolute;
    top: 20px;
    right: 15px;
    z-index: 10;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Правые контролы */
.controls-right {
    position: absolute;
    right: 15px;
    bottom: 120px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.control-btn:active {
    transform: scale(0.95);
}

.icon-wrapper {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    backdrop-filter: blur(5px);
}

.icon-wrapper i {
    font-size: 22px;
    color: white;
}

.control-btn .counter {
    font-size: 13px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

#likeBtn.active .icon-wrapper i {
    color: #ff0050;
}

/* Кнопка следующего видео */
.next-video-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
    min-width: 220px;
    justify-content: center;
}

.next-video-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(-50%) scale(1.05);
}

.next-video-btn:active {
    transform: translateX(-50%) scale(0.98);
}

.next-video-btn i {
    font-size: 18px;
}

/* Прогресс бар */
.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.progress-fill {
    height: 100%;
    background: #ff0050;
    width: 0%;
    transition: width 0.1s linear;
}

/* Индикатор загрузки */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: #ff0050;
    animation: spin 1s linear infinite;
}

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

/* Мобильная оптимизация */
@media (max-width: 768px) {
    .next-video-btn {
        width: 90%;
        max-width: 300px;
    }
    
    .icon-wrapper {
        width: 45px;
        height: 45px;
    }
    
    .icon-wrapper i {
        font-size: 20px;
    }
}