* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000;
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Боковое меню в стиле TikTok */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    height: 100vh;
    background: #161823;
    border-right: 1px solid #2f2f2f;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
}

.sidebar-logo {
    padding: 0 1.5rem 2rem;
    border-bottom: 1px solid #2f2f2f;
    margin-bottom: 1rem;
}

.sidebar-logo h1 {
    color: #fe2c55;
    font-size: 1.8rem;
    font-weight: bold;
}

.sidebar-menu {
    flex: 1;
    padding: 0 0.5rem;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: 8px;
    text-decoration: none;
    color: #8a8a8a;
    transition: all 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
}

.sidebar-item:hover {
    background: #2f2f2f;
    color: #fff;
}

.sidebar-item.active {
    background: #fe2c55;
    color: #fff;
}

.sidebar-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.sidebar-text {
    font-weight: 500;
}

.sidebar-divider {
    height: 1px;
    background: #2f2f2f;
    margin: 1rem 0;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #2f2f2f;
}

.search-btn {
    width: 100%;
    padding: 0.75rem;
    background: #2f2f2f;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #fe2c55;
}

/* Основной контент */
.main-content {
    margin-left: 240px;
    height: 100vh;
    overflow: hidden;
}
.video-feed-tiktok {
    height: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.video-card-tiktok {
    height: 100vh;
    position: relative;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.video-player {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-player {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-player video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0;
}

/* Стили для контролов видео */
.video-player video::-webkit-media-controls-panel {
    background: rgba(0, 0, 0, 0.8);
}

.video-player video::-webkit-media-controls-play-button {
    background-color: #fe2c55;
    border-radius: 50%;
}

.video-player video::-webkit-media-controls-volume-slider {
    background: #fe2c55;
}

.video-player video::-webkit-media-controls-seek-back-button,
.video-player video::-webkit-media-controls-seek-forward-button {
    color: #fe2c55;
}

.video-player video::-webkit-media-controls-timeline {
    background: #333;
    border-radius: 2px;
}

.video-player video::-webkit-media-controls-current-time-display,
.video-player video::-webkit-media-controls-time-remaining-display {
    color: #fff;
}

/* Показываем контролы при наведении */
.video-player:hover video::-webkit-media-controls {
    opacity: 1;
}

.video-player video::-webkit-media-controls {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Стили для контролов видео */
.video-player video::-webkit-media-controls-panel {
    background: rgba(0, 0, 0, 0.8);
}

.video-player video::-webkit-media-controls-play-button {
    background-color: #fe2c55;
    border-radius: 50%;
}

.video-player video::-webkit-media-controls-volume-slider {
    background: #fe2c55;
}

.video-player video::-webkit-media-controls-seek-back-button,
.video-player video::-webkit-media-controls-seek-forward-button {
    color: #fe2c55;
}

.video-player video::-webkit-media-controls-timeline {
    background: #333;
    border-radius: 2px;
}

.video-player video::-webkit-media-controls-current-time-display,
.video-player video::-webkit-media-controls-time-remaining-display {
    color: #fff;
}

/* Показываем контролы при наведении */
.video-player:hover video::-webkit-media-controls {
    opacity: 1;
}

.video-player video::-webkit-media-controls {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 2rem 1rem 1rem;
    z-index: 10;
}

.video-info-overlay {
    margin-bottom: 1rem;
}

.video-title-overlay {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
}

.video-author-overlay {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.video-author-overlay img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.video-author-overlay span {
    color: #fff;
    font-weight: 500;
}

.video-meta {
    display: flex;
    gap: 1rem;
    color: #8a8a8a;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.video-actions-side {
    position: absolute;
    right: 1rem;
    bottom: 6rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 10;
}

.action-btn-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 48px;
    min-height: 48px;
}

.action-btn-side:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.action-btn-side.liked {
    color: #fe2c55;
    background: rgba(254, 44, 85, 0.2);
}

.action-btn-side .icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.action-btn-side .count {
    font-size: 0.8rem;
    font-weight: 600;
}

.comments-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 48px;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.comments-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.comments-toggle .icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.comments-toggle .count {
    font-size: 0.8rem;
    font-weight: 600;
}

/* Поисковый оверлей */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.search-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.search-header input {
    flex: 1;
    background: #2f2f2f;
    border: none;
    padding: 1rem;
    border-radius: 25px;
    color: #fff;
    font-size: 1.1rem;
    outline: none;
}

.search-header button {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.search-results {
    flex: 1;
    overflow-y: auto;
}

.search-placeholder {
    text-align: center;
    color: #8a8a8a;
    padding: 2rem;
    font-size: 1.1rem;
}

/* Модальное окно комментариев в стиле TikTok (снизу) */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #161823;
    border-radius: 20px 20px 0 0;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 1.5rem;
    color: #8a8a8a;
    cursor: pointer;
    z-index: 2001;
    background: none;
    border: none;
    padding: 0.5rem;
}

.close-modal:hover {
    color: #fff;
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #2f2f2f;
    text-align: center;
    position: relative;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #2f2f2f;
    border-radius: 2px;
}

.modal-header h3 {
    color: #fff;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.video-info {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Модальное окно комментариев в стиле TikTok */
.video-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: #161823;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #8a8a8a;
    font-size: 28px;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: scale(1.1);
}

.modal-header {
    background: linear-gradient(135deg, #fe2c55, #ff6b6b);
    padding: 20px 25px;
    color: #fff;
    text-align: center;
    position: relative;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.comments-section {
    padding: 0;
    max-height: 60vh;
    display: flex;
    flex-direction: column;
}

.comment-form {
    padding: 20px;
    background: #1e1e2e;
    border-bottom: 1px solid #2a2a3a;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.comment-form .input-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.comment-form input {
    flex: 1;
    background: #2f2f3f;
    border: 2px solid #3a3a4a;
    border-radius: 25px;
    padding: 12px 18px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.comment-form input:focus {
    border-color: #fe2c55;
    background: #353545;
    box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.1);
}

.comment-form input::placeholder {
    color: #8a8a8a;
}

.comment-form button {
    background: linear-gradient(135deg, #fe2c55, #ff6b6b);
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(254, 44, 85, 0.3);
}

.comment-form button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(254, 44, 85, 0.4);
}

.comment-form button:active {
    transform: translateY(0);
}

.comment-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.char-counter {
    font-size: 0.8rem;
    color: #8a8a8a;
    text-align: right;
    margin-top: 4px;
    transition: color 0.3s ease;
}

.char-counter.warning {
    color: #ff9800;
}

.char-counter.danger {
    color: #f44336;
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    max-height: 400px;
}

.comments-list::-webkit-scrollbar {
    width: 6px;
}

.comments-list::-webkit-scrollbar-track {
    background: #1e1e2e;
}

.comments-list::-webkit-scrollbar-thumb {
    background: #fe2c55;
    border-radius: 3px;
}

.comment {
    display: flex;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
    margin-bottom: 0;
    animation: fadeIn 0.3s ease;
}

.comment:hover {
    background: rgba(255, 255, 255, 0.02);
}

.comment img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fe2c55;
}

.comment-content {
    flex: 1;
}

.comment-author {
    color: #fe2c55;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.comment-text {
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 6px;
    word-wrap: break-word;
}

.comment-time {
    color: #8a8a8a;
    font-size: 0.8rem;
}

.search-placeholder {
    text-align: center;
    color: #8a8a8a;
    padding: 40px 20px;
    font-size: 0.95rem;
}
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.comment-text {
    color: #e0e0e0;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.comment-time {
    color: #666;
    font-size: 0.85rem;
}

/* Остальные стили */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.nav-link:hover,
.nav-link.active {
    background: #fe2c55;
    color: #fff;
}

.video-card {
    background: #161823;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    border: 1px solid #2f2f2f;
}

.video-card:hover {
    transform: translateY(-5px);
    border-color: #fe2c55;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-info {
    padding: 1rem;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
    line-height: 1.4;
}

.video-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    color: #8a8a8a;
    font-size: 0.9rem;
}

.video-stats {
    display: flex;
    gap: 1rem;
    color: #8a8a8a;
    font-size: 0.9rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.nav-link:hover,
.nav-link.active {
    background: #fe2c55;
    color: #fff;
}

.video-card {
    background: #161823;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    border: 1px solid #2f2f2f;
}

.video-card:hover {
    transform: translateY(-5px);
    border-color: #fe2c55;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-info {
    padding: 1rem;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
    line-height: 1.4;
}

.video-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    color: #8a8a8a;
    font-size: 0.9rem;
}

.video-stats {
    display: flex;
    gap: 1rem;
    color: #8a8a8a;
    font-size: 0.9rem;
}

.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
}

.modal-content {
    display: flex;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    z-index: 2001;
}

.video-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.video-container video {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
}

.video-info {
    width: 400px;
    background: #161823;
    padding: 2rem;
    overflow-y: auto;
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.author-info {
    display: flex;
    gap: 1rem;
}

.author-info img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.subscribe-btn {
    background: #fe2c55;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.subscribe-btn:hover {
    background: #e91e63;
}

.subscribe-btn.subscribed {
    background: #2f2f2f;
    color: #8a8a8a;
}

.video-actions {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    color: #8a8a8a;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.action-btn:hover {
    background: #2f2f2f;
    color: #fff;
}

.action-btn.liked {
    color: #fe2c55;
}

.action-btn .icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.video-description {
    margin: 1rem 0;
    color: #8a8a8a;
    line-height: 1.5;
}

.comments-section {
    border-top: 1px solid #2f2f2f;
    padding-top: 1rem;
}

.comment-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.comment-form input {
    flex: 1;
    background: #2f2f2f;
    border: none;
    padding: 0.75rem;
    border-radius: 20px;
    color: #fff;
    outline: none;
}

.comment-form button {
    background: #fe2c55;
    color: #fff;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
}

.comment {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.comment img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    color: #fff;
    font-size: 0.9rem;
}

.comment-text {
    color: #8a8a8a;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.comment-time {
    color: #666;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container {
    background: #161823;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
}

.auth-form h1 {
    color: #fe2c55;
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #fff;
    font-weight: 400;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: #2f2f2f;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #fe2c55;
}

.auth-btn,
.upload-btn {
    width: 100%;
    padding: 1rem;
    background: #fe2c55;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.auth-btn:hover,
.upload-btn:hover {
    background: #e91e63;
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
}

.auth-switch a {
    color: #fe2c55;
    text-decoration: none;
}

.error-message,
.message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
}

.error-message {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    border: 1px solid #f44336;
}

.message.success {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
    border: 1px solid #4caf50;
}

.profile-container {
    max-width: 1000px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background: #161823;
    border-radius: 12px;
}

.profile-avatar {
    text-align: center;
}

.profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

.avatar-upload button {
    background: #2f2f2f;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
}

.profile-info h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.profile-info p {
    color: #8a8a8a;
    margin-bottom: 1rem;
}

.profile-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fe2c55;
}

.stat-label {
    color: #8a8a8a;
    font-size: 0.9rem;
}

.profile-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    background: #2f2f2f;
    color: #8a8a8a;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: #fe2c55;
    color: #fff;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.upload-container {
    max-width: 600px;
    margin: 0 auto;
    background: #161823;
    padding: 2rem;
    border-radius: 12px;
}

.upload-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #fff;
}

.upload-area {
    border: 2px dashed #fe2c55;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.upload-area:hover {
    background: rgba(254, 44, 85, 0.1);
}

.upload-area.dragover {
    background: rgba(254, 44, 85, 0.2);
    border-color: #fff;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-area input {
    display: none;
}

.video-preview {
    margin: 1rem 0;
    text-align: center;
}

.video-preview video {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

.upload-progress {
    margin: 1rem 0;
}

.progress-bar {
    background: #2f2f2f;
    border-radius: 10px;
    overflow: hidden;
    height: 20px;
}

.progress-fill {
    background: #fe2c55;
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

.loading {
    text-align: center;
    color: #8a8a8a;
    padding: 2rem;
    font-size: 1.1rem;
}

.auth-required,
.guest-only {
    transition: opacity 0.3s ease;
}

.user-profile-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.user-profile-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: #161823;
    border-radius: 12px;
    align-items: center;
}

.user-profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fe2c55;
}

.user-profile-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.user-profile-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
}

.user-videos-section h3 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

/* Мобильные стили */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        bottom: 0;
        top: auto;
        flex-direction: row;
        padding: 0.5rem;
        border-right: none;
        border-top: 1px solid #2f2f2f;
    }
    
    .sidebar-logo {
        display: none;
    }
    
    .sidebar-menu {
        display: flex;
        flex: 1;
        justify-content: space-around;
        padding: 0;
    }
    
    .sidebar-item {
        flex-direction: column;
        padding: 0.5rem;
        margin: 0;
        gap: 0.25rem;
        min-width: auto;
        text-align: center;
    }
    
    .sidebar-text {
        font-size: 0.7rem;
    }
    
    .sidebar-icon {
        font-size: 1.1rem;
    }
    
    .sidebar-divider {
        display: none;
    }
    
    .sidebar-footer {
        display: flex;
        padding: 0;
    }
    
    .search-btn {
        flex-direction: column;
        padding: 0.5rem;
        margin: 0;
        gap: 0.25rem;
        min-width: auto;
        text-align: center;
        background: none;
        border-radius: 0;
    }
    
    .search-btn:hover {
        background: #2f2f2f;
    }
    
    .main-content {
        margin-left: 0;
        margin-bottom: 80px;
        height: calc(100vh - 80px);
    }
    
    .video-card-tiktok {
        height: calc(100vh - 80px);
    }
    
    .video-overlay {
        padding: 1.5rem 1rem 1rem;
    }
    
    .video-title-overlay {
        font-size: 1rem;
    }
    
    .video-actions-side {
        right: 0.5rem;
        bottom: 4rem;
        gap: 0.8rem;
    }
    
    .action-btn-side {
        min-width: 44px;
        min-height: 44px;
        padding: 0.6rem;
    }
    
    .action-btn-side .icon {
        font-size: 1.3rem;
    }
    
    .search-container {
        padding: 1rem;
    }
    
    .search-header {
        margin-top: 2rem;
    }
    
    .modal-content {
        max-height: 80vh;
        border-radius: 15px 15px 0 0;
    }
    
    .modal-header {
        padding: 0.75rem 1rem;
    }
    
    .modal-header h3 {
        font-size: 0.9rem;
    }
    
    .video-info {
        padding: 1rem;
    }
    
    .comment-form {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .comment-form input {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .comment-form button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .comment {
        margin-bottom: 1rem;
    }
    
    .comment img {
        width: 32px;
        height: 32px;
    }
    
    .comment-author,
    .comment-text {
        font-size: 0.9rem;
    }
    
    .comment-time {
        font-size: 0.8rem;
    }
    
    .user-profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .user-profile-stats {
        justify-content: center;
    }
    
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 0.5rem;
    }
    
    .video-card {
        margin-bottom: 1rem;
    }
    
    .video-thumbnail {
        height: 150px;
    }
    
    .auth-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .auth-page-content {
        margin-left: 0;
        margin-bottom: 80px;
    }
    
    .user-profile-container,
    .upload-container,
    .profile-container {
        margin-left: 0;
        margin-bottom: 80px;
    }
    
    .upload-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .profile-stats {
        justify-content: center;
    }
}

/* Остальные стили для форм и профилей */
.auth-page-content {
    margin-left: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container {
    background: #161823;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
}

.auth-form h1 {
    color: #fe2c55;
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #fff;
    font-weight: 400;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: #2f2f2f;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #fe2c55;
}

.auth-btn,
.upload-btn {
    width: 100%;
    padding: 1rem;
    background: #fe2c55;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.auth-btn:hover,
.upload-btn:hover {
    background: #e91e63;
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
}

.auth-switch a {
    color: #fe2c55;
    text-decoration: none;
}

.error-message,
.message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
}

.error-message {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    border: 1px solid #f44336;
}

.message.success {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
    border: 1px solid #4caf50;
}

.loading {
    text-align: center;
    color: #8a8a8a;
    padding: 2rem;
    font-size: 1.1rem;
}

.auth-required,
.guest-only {
    transition: opacity 0.3s ease;
}

.user-profile-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
    margin-left: 240px;
}

.user-profile-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: #161823;
    border-radius: 12px;
    align-items: center;
}

.user-profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fe2c55;
}

.user-profile-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.user-profile-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fe2c55;
}

.stat-label {
    color: #8a8a8a;
    font-size: 0.9rem;
}

.user-videos-section h3 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.upload-container {
    max-width: 600px;
    margin: 0 auto;
    background: #161823;
    padding: 2rem;
    border-radius: 12px;
    margin-left: 240px;
    margin-top: 2rem;
}

.profile-container {
    max-width: 1000px;
    margin: 0 auto;
    margin-left: 240px;
    padding: 2rem 1rem;
}
/* Дополнительные стили для сообщений */
.message.info {
    background: rgba(33, 150, 243, 0.1);
    color: #2196f3;
    border: 1px solid #2196f3;
}

.upload-hint {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Стили для индикатора обработки видео */
.processing-indicator {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid #ffc107;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.processing-indicator::before {
    content: '⏳ ';
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Кнопки навигации для ПК */
.video-navigation {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1500;
}

.nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(254, 44, 85, 0.8);
    border-color: #fe2c55;
    transform: scale(1.1);
}

.nav-btn:active {
    transform: scale(0.95);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.nav-btn:disabled:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.3);
    transform: none;
}

.desktop-only {
    display: block;
}

/* Скрываем кнопки на мобильных */
@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }
}

/* Индикатор текущего видео */
.video-indicator {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    z-index: 1500;
}

@media (max-width: 768px) {
    .video-indicator {
        display: none;
    }
}

/* Мобильная адаптация для комментариев */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 85vh;
        border-radius: 15px;
    }
    
    .comment-form {
        padding: 15px;
        gap: 10px;
    }
    
    .comment-form input {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .comment-form button {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .comment {
        padding: 12px 15px;
    }
    
    .comment img {
        width: 35px;
        height: 35px;
    }
}

/* Улучшения для touch устройств */
@media (hover: none) and (pointer: coarse) {
    /* Увеличиваем размеры кнопок для touch */
    .video-actions button {
        min-width: 50px;
        min-height: 50px;
        padding: 12px;
    }
    
    .video-actions .count {
        font-size: 0.9rem;
        margin-top: 6px;
    }
    
    /* Улучшаем видимость контролов на мобильных */
    .video-player video::-webkit-media-controls {
        opacity: 1;
    }
    
    /* Добавляем индикатор свайпа */
    .video-card-tiktok::after {
        content: '↕️ Свайп для навигации';
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.7);
        color: #fff;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 0.8rem;
        opacity: 0;
        animation: swipeHint 3s ease-in-out 2s;
        pointer-events: none;
    }
    
    @keyframes swipeHint {
        0%, 90% { opacity: 0; }
        10%, 80% { opacity: 1; }
    }
}

/* Предотвращаем выделение текста при свайпах */
.video-card-tiktok {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Улучшаем производительность анимаций */
.video-card-tiktok,
.video-player,
.video-actions {
    will-change: transform;
    transform: translateZ(0);
}

/* FridiStudio Styles */
.studio-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.studio-header {
    text-align: center;
    margin-bottom: 3rem;
}

.studio-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #fe2c55, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.studio-header p {
    color: #888;
    font-size: 1.1rem;
}

.studio-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: #fe2c55;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #fe2c55;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #888;
    font-size: 0.9rem;
}

.studio-content {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 1.5rem;
    color: #fff;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: #333;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: #444;
}

.filter-btn.active {
    background: #fe2c55;
    color: #fff;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.studio-video-card {
    background: #222;
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.studio-video-card:hover {
    transform: translateY(-2px);
    border-color: #fe2c55;
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
    overflow: hidden;
}

.video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.visibility-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
}

.video-info {
    padding: 1rem;
}

.video-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #888;
}

.video-date {
    font-size: 0.8rem;
    color: #666;
}

.video-actions {
    padding: 0 1rem 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #fe2c55;
    color: #fff;
}

.btn-primary:hover {
    background: #e02847;
}

.btn-secondary {
    background: #333;
    color: #fff;
}

.btn-secondary:hover {
    background: #444;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.empty-state, .error {
    text-align: center;
    padding: 3rem;
    color: #888;
    font-size: 1.1rem;
}

.error {
    color: #dc3545;
}

/* Модальное окно редактирования */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #1a1a1a;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #333;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #333;
}

.modal-header h3 {
    margin: 0;
    color: #fff;
}

.close-modal {
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: #333;
    color: #fff;
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #fff;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    background: #333;
    border: 1px solid #555;
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #fe2c55;
    box-shadow: 0 0 0 2px rgba(254, 44, 85, 0.2);
}

.char-counter {
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.25rem;
    text-align: right;
}

.char-counter.warning {
    color: #ffc107;
}

.char-counter.danger {
    color: #dc3545;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Адаптивность для FridiStudio */
@media (max-width: 768px) {
    .studio-container {
        padding: 1rem;
    }
    
    .studio-header h1 {
        font-size: 2rem;
    }
    
    .studio-stats {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}
.sidebar-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-icon img {
    width: 100%;
    height: 100%;
    filter: brightness(0) invert(1);
}

.sidebar-item.active .sidebar-icon img {
    filter: brightness(0) invert(1);
}

.action-btn-side .icon img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}