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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0a0e27;
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Контейнер для видео */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.video-container::-webkit-scrollbar {
    display: none;
}

/* Секция с одним видео */
.video-section {
    position: relative;
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f1535;
}

/* Видео элемент */
.video-section video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Оверлей с информацией */
.video-overlay {
    position: absolute;
    bottom: 90px; /* Увеличено с 80px чтобы не перекрывалось панелью */
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(10, 14, 39, 0.8) 0%, transparent 100%);
    z-index: 10;
}

/* Информация об авторе */
.author-info {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #1e3a8a;
    margin-right: 12px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}

.author-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.author-name {
    font-weight: 600;
    font-size: 16px;
    color: #ffffff;
}

/* Описание видео */
.video-description {
    font-size: 13px;
    line-height: 1.3;
    color: rgba(224, 231, 255, 0.85);
    max-width: 85%;
}

/* Статистика видео */
.video-stats {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #c7d2fe;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Правая панель с действиями */
.action-buttons {
    position: absolute;
    right: 12px;
    bottom: 110px; /* Увеличено с 100px */
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 15;
}

.action-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(30, 58, 138, 0.5);
    border: 2px solid rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.action-btn:active {
    transform: scale(0.9);
    background: rgba(59, 130, 246, 0.6);
}

.action-btn svg {
    width: 24px;
    height: 24px;
}

.action-count {
    text-align: center;
    font-size: 12px;
    margin-top: 4px;
    color: #e0e7ff;
}

/* Нижняя навигация */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 90px; /* Увеличено на 30% (70px → 90px) для перекрытия зазора снизу */
    background: rgba(10, 14, 39, 0.95);
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 8px 16px;
    transition: all 0.3s ease;
    flex: 1;
}

.nav-btn svg {
    width: 24px;
    height: 24px;
}

.nav-btn span {
    font-size: 11px;
    font-weight: 500;
}

.nav-btn.active {
    color: #3b82f6;
}

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

/* Загрузчик */
.loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Заглушка для видео */
.video-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #0a0e27 0%, #1e3a8a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.splash-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.splash-content {
    text-align: center;
    animation: fadeIn 0.8s ease;
}

.splash-title {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    animation: glow 2s ease-in-out infinite;
}

.splash-version {
    font-size: 18px;
    color: #93c5fd;
    margin-bottom: 40px;
    opacity: 0.8;
}

.loader-ring {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    border-radius: 50%;
    margin: 0 auto;
    animation: spinLoader 1s linear infinite;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.8));
    }
}

/* Дизлайк кнопка с эффектом */
.action-btn.dislike-btn.disliked {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.6);
    animation: pulse 0.3s ease;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
}

.action-btn.dislike-btn.disliked svg {
    color: #ef4444;
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.8));
}

/* Рейтинг дисплей */
.rating-display {
    background: rgba(251, 191, 36, 0.2);
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid rgba(251, 191, 36, 0.3);
    font-weight: 600;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Иконки воспроизведения */
.playback-icons {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    pointer-events: none;
}

.play-icon, .pause-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    animation: fadeInOut 0.5s ease;
}

.play-icon svg, .pause-icon svg {
    width: 40px;
    height: 40px;
}

.speed-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(59, 130, 246, 0.3);
    border: 2px solid rgba(59, 130, 246, 0.6);
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.speed-icon span {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    20% {
        opacity: 1;
        transform: scale(1);
    }
    80% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* Модальное окно комментариев */
.comments-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.comments-modal.show {
    opacity: 1;
}

.comments-content {
    background: linear-gradient(180deg, #0f1535 0%, #0a0e27 100%);
    width: 100%;
    max-height: 80vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.comments-modal.show .comments-content {
    transform: translateY(0);
}

.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.comments-header h3 {
    font-size: 18px;
    color: #ffffff;
}

.comments-back-btn {
    background: rgba(59, 130, 246, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comments-back-btn:active {
    transform: scale(0.9);
    background: rgba(59, 130, 246, 0.3);
}

.comments-back-btn svg {
    width: 24px;
    height: 24px;
}

.comments-list {
    overflow-y: auto;
    padding: 20px;
    flex: 1;
}

.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-size: 14px;
    font-weight: 600;
    color: #93c5fd;
    margin-bottom: 4px;
}

.comment-text {
    font-size: 14px;
    color: #e0e7ff;
    line-height: 1.4;
}

.comment-input-section {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    background: rgba(15, 21, 53, 0.8);
}

.comment-input {
    flex: 1;
    background: rgba(30, 58, 138, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    padding: 10px 15px;
    color: #ffffff;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.comment-input::placeholder {
    color: rgba(147, 197, 253, 0.5);
}

.comment-input:focus {
    border-color: #3b82f6;
    background: rgba(30, 58, 138, 0.4);
}

.comment-send-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.comment-send-btn:active {
    transform: scale(0.9);
}

.comment-send-btn svg {
    width: 20px;
    height: 20px;
}

.loading-comments,
.no-comments,
.error-comments {
    text-align: center;
    padding: 40px 20px;
    color: rgba(147, 197, 253, 0.7);
    font-size: 14px;
}

/* Stats Page */
.stats-page {
    padding: 80px 20px 90px;
    overflow-y: auto;
    height: 100vh;
}

.stats-page h1 {
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.3), rgba(59, 130, 246, 0.2));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #60a5fa;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 13px;
    color: #93c5fd;
    opacity: 0.8;
}

.top-videos-title {
    font-size: 22px;
    margin-bottom: 20px;
    color: #e0e7ff;
}

.top-videos-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-video-item {
    background: rgba(30, 58, 138, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-video-info {
    flex: 1;
}

.top-video-author {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
}

.top-video-stats {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #93c5fd;
}

.top-video-rating {
    font-size: 20px;
    font-weight: 700;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
}

/* Profile Page */
.profile-page {
    padding: 80px 20px 90px;
    overflow-y: auto;
    height: 100vh;
}

.profile-page h1 {
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-stats {
    margin-bottom: 40px;
}

.profile-stat-card {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.3), rgba(59, 130, 246, 0.2));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
}

.profile-stat-value {
    font-size: 48px;
    font-weight: 700;
    color: #60a5fa;
    margin-bottom: 10px;
}

.profile-stat-label {
    font-size: 16px;
    color: #93c5fd;
}

.profile-page h2 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #e0e7ff;
}

.profile-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.profile-video-card {
    background: rgba(30, 58, 138, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

.profile-video-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.profile-video-info {
    padding: 12px;
}

.profile-video-author {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
}

.profile-video-stats {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #93c5fd;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.empty-state p {
    font-size: 16px;
}

/* Error Page */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 20px;
    text-align: center;
}

.error-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.error-page h2 {
    font-size: 28px;
    color: #ef4444;
    margin-bottom: 15px;
}

.error-page p {
    font-size: 16px;
    color: #9ca3af;
}
