/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

#main-content {
    padding-bottom: 80px;
    min-height: 100vh;
}

.content-section {
    display: none;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.content-section.active {
    display: block;
}

/* Заголовки секций */
.header {
    margin-bottom: 25px;
    text-align: center;
    padding: 20px 0;
    position: relative;
}

/* Стили для нового header с Online Academy */
.header-content {
    margin-bottom: 20px;
    display: block; /* Показываем новый header */
    transition: all 0.3s ease;
}

.header-content:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

.header-title {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.header-title:hover {
    transform: scale(1.05);
}

.header-title i {
    font-size: 24px; /* Reduced from 32px */
    color: #4caf50;
    margin-right: 10px; /* Reduced from 12px */
    text-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.header-title span {
    font-size: 22px; /* Reduced from 28px */
    font-weight: 700;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.header-subtitle {
    font-size: 12px; /* Reduced from 14px */
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    margin-left: 30px; /* Reduced from 36px */
    margin-top: -6px; /* Reduced from -8px */
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    position: relative;
    display: block;
}

.header h1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

/* Поиск */
.search-bar {
    position: relative;
    margin-bottom: 25px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.search-bar input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    border: 2px solid rgba(76, 175, 80, 0.2);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9) 0%, rgba(42, 42, 42, 0.9) 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(76, 175, 80, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: rgba(76, 175, 80, 0.5);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(76, 175, 80, 0.2);
    transform: translateY(-2px);
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.search-bar i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(76, 175, 80, 0.8);
    font-size: 18px;
    transition: all 0.3s ease;
}

.search-bar input:focus + i {
    color: #4caf50;
    transform: translateY(-50%) scale(1.1);
}

/* Рекомендации */
.recommendations-feed {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recommendation-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recommendation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.recommendation-image {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio (9/16 = 0.5625 = 56.25%) */
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
}

/* Thumbnail для YouTube Shorts (3:4) */
.recommendation-image.shorts-thumbnail {
    padding-bottom: 133.33%; /* 3:4 aspect ratio */
}

/* Thumbnail для обычных видео (16:9) */
.recommendation-image.video-thumbnail {
    padding-bottom: 56.25%; /* 16:9 aspect ratio (9/16 = 0.5625 = 56.25%) */
}

.recommendation-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.recommendation-content {
    position: relative;
    margin-bottom: 15px;
}

.video-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.video-indicator i {
    font-size: 14px;
    color: #ff4444;
}

.recommendation-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #ffffff;
}

.recommendation-card p {
    color: #cccccc;
    line-height: 1.5;
    margin-bottom: 15px;
}

.recommendation-card .meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #888888;
}

/* Видеоуроки */
.video-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.video-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumbnail i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: #ffffff;
    opacity: 0.7;
}

/* Play overlay for video thumbnails */
.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay i {
    font-size: 48px;
    color: #ffffff;
    opacity: 0.9;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.video-info {
    padding: 15px;
}

.video-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #ffffff;
}

.video-info p {
    color: #cccccc;
    font-size: 14px;
    line-height: 1.4;
}

/* Кнопка ссылки в видео */
.video-link {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

/* Кнопка ссылки в заданиях */
.assignment-link {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

/* Задания */
/* Прогресс выполнения заданий */
.assignments-progress {
    margin: 0 20px 25px 20px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9) 0%, rgba(42, 42, 42, 0.9) 100%);
    border-radius: 15px;
    border: 1px solid rgba(76, 175, 80, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.progress-text {
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
}

.progress-count {
    color: #4caf50;
    font-weight: 600;
    font-size: 14px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

.assignments-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 20px;
}

.assignment-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.assignment-checkbox {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 24px;
    height: 24px;
    border: 2px solid #4caf50;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    accent-color: #4caf50;
}

.assignment-checkbox:hover {
    border-color: #45a049;
    background: rgba(76, 175, 80, 0.1);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

.assignment-checkbox:checked {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border-color: #4caf50;
    cursor: not-allowed;
    opacity: 1;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
}

.assignment-checkbox:checked::after {
    content: '✓';
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
}

.assignment-checkbox:checked:hover {
    transform: none;
    border-color: #4caf50;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
}

.assignment-checkbox:disabled {
    cursor: not-allowed;
    opacity: 1;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border-color: #4caf50;
}

.assignment-checkbox:disabled:hover {
    transform: none;
    border-color: #4caf50;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
}

.assignment-card.completed {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.assignment-card.completed h3 {
    color: #4caf50;
}

.assignment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.assignment-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #ffffff;
}

.assignment-card p {
    color: #cccccc;
    line-height: 1.5;
    margin-bottom: 15px;
}

.assignment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888888;
}

.assignment-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.assignment-status.pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.assignment-status.completed {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

/* Кнопка ссылки в рекомендациях */
.recommendation-link {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

.link-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: #ffffff;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 18px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.link-button:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.link-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.3);
}

.link-button i {
    font-size: 12px;
}

/* Профил */
.profile-content {
    text-align: center;
    padding: 20px;
    position: relative;
}

.profile-avatar {
    margin-bottom: 20px;
}

.profile-avatar i {
    font-size: 80px;
    color: #888888;
}

.profile-info h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #ffffff;
}

.profile-info p {
    color: #cccccc;
    margin-bottom: 30px;
}

/* Кнопка выхода */
.logout-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    width: fit-content;
    padding: 6px 12px;
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    border: none;
    border-radius: 4px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
    z-index: 10;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(244, 67, 54, 0.4);
    background: linear-gradient(135deg, #d32f2f 0%, #f44336 100%);
}

.logout-btn:active {
    transform: translateY(0);
}

.logout-btn i {
    font-size: 11px;
    margin-right: 4px;
}

/* Profile Action Buttons */
.profile-actions {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 20px;
    justify-content: center;
}

.profile-action-btn {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.profile-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-action-btn:hover::before {
    opacity: 1;
}

.action-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.action-icon i {
    font-size: 20px;
    color: white;
}

.action-text {
    color: white;
    font-weight: 600;
    font-size: 16px;
    flex-grow: 1;
    position: relative;
    z-index: 2;
}

/* Instagram Button */
.instagram-btn {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #ff6b35 100%);
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.instagram-btn .action-icon {
    background: rgba(255, 255, 255, 0.2);
}

/* Telegram Button */
.telegram-btn {
    background: linear-gradient(135deg, #0088cc 0%, #0077b3 100%);
    border: 1px solid rgba(0, 136, 204, 0.3);
}

.telegram-btn .action-icon {
    background: rgba(255, 255, 255, 0.2);
}

/* Group Button */
.group-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.group-btn .action-icon {
    background: #0088cc;
}

.group-btn .action-text {
    color: #333;
}

/* Hover Effects */
.profile-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.instagram-btn:hover {
    background: linear-gradient(135deg, #ff5722 0%, #ff9800 50%, #ff5722 100%);
}

.telegram-btn:hover {
    background: linear-gradient(135deg, #0077b3 0%, #006699 100%);
}

.group-btn:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
}


/* Нижняя навигация */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 60px;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
    color: #888888;
    transition: color 0.3s ease;
}

.nav-item span {
    font-size: 11px;
    color: #888888;
    transition: color 0.3s ease;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active i,
.nav-item.active span {
    color: #ffffff;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-item:hover i,
.nav-item:hover span {
    color: #ffffff;
}

/* Admin Panel iframe */
#admin-panel iframe {
    width: 100%;
    height: calc(100vh - 80px);
    border: none;
    background: transparent;
}

/* Analytics iframe */
#analytics iframe {
    width: 100%;
    height: calc(100vh - 80px);
    border: none;
    background: transparent;
}

/* Video Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.video-modal.active {
    display: flex;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Специальные стили для модала с Shorts */
.video-modal-content.shorts-modal {
    max-width: 450px; /* Увеличили размер для лучшего отображения на мобил */
    width: 95%;
}

.video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.video-modal-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0px;
}

.video-modal-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.video-modal-body {
    padding: 20px;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Специальные стили для YouTube Shorts */
.youtube-shorts-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    max-width: 100%;
    object-fit: cover;
}

/* Контейнер для Shorts с правильным соотношением сторон */
.video-container.shorts-container {
    padding-bottom: 177.78%; /* 9:16 соотношение (16/9 = 1.7778 = 177.78%) */
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.video-description {
    margin-top: 20px;
    color: #cccccc;
    line-height: 1.6;
}

/* Адаптивность */
/* ===== МОБИЛЬНЫЕ СТИЛИ ===== */

/* Планшеты и большие телефоны */
@media (max-width: 768px) {
    /* Основные секции */
    .content-section {
        padding: 15px;
        min-height: calc(100vh - 80px);
    }
    
    /* Заголовки */
    .header h1 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    /* Поиск */
    .search-bar {
        margin-bottom: 20px;
    }
    
    .search-bar input {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    /* Рекомендации */
    .recommendations-feed {
        gap: 12px;
    }
    
    .recommendation-card {
        padding: 15px;
        border-radius: 12px;
    }
    
    .recommendation-image {
        padding-bottom: 56.25%; /* 16:9 aspect ratio */
        max-height: 200px;
        margin-bottom: 12px;
    }
    
    .recommendation-image.shorts-thumbnail {
        padding-bottom: 133.33%; /* 3:4 aspect ratio */
        max-height: 300px;
    }
    
    .recommendation-card h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .recommendation-card p {
        font-size: 14px;
        margin-bottom: 12px;
        line-height: 1.4;
    }
    
    .recommendation-card .meta {
        font-size: 11px;
    }
    
    /* Видеоуроки */
    .video-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .video-card {
        border-radius: 12px;
    }
    
    .video-thumbnail {
        padding-bottom: 56.25%; /* 16:9 aspect ratio */
        max-height: 180px;
    }
    
    .video-info {
        padding: 12px;
    }
    
    .video-info h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .video-info p {
        font-size: 14px;
        line-height: 1.4;
    }
    
    /* Задания */
    .assignments-progress {
        margin-bottom: 20px;
        padding: 15px;
        border-radius: 12px;
    }
    
    .progress-info {
        margin-bottom: 12px;
    }
    
    .progress-text {
        font-size: 14px;
    }
    
    .progress-count {
        font-size: 12px;
    }
    
    .assignments-list {
        gap: 12px;
    }
    
    .assignment-card {
        padding: 15px;
        border-radius: 12px;
    }
    
    .assignment-card h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .assignment-card p {
        font-size: 14px;
        line-height: 1.4;
    }
    
    /* Кнопки ссылок */
    .link-button {
        padding: 8px 12px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    /* Нижняя навигация */
    .bottom-nav {
        padding: 8px 0;
        height: 70px;
    }
    
    .nav-item {
        padding: 8px 6px;
        min-width: 60px;
    }
    
    .nav-item i {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .nav-item span {
        font-size: 10px;
        line-height: 1.2;
    }
    
    /* Профиль */
    .profile-content {
        padding: 20px;
    }
    
    .profile-avatar i {
        font-size: 60px;
    }
    
    .profile-info h2 {
        font-size: 20px;
        margin-bottom: 8px;
    }
    
    .profile-info p {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.7);
        margin-top: 5px;
    }

    /* Mobile Profile Action Buttons */
    .profile-actions {
        margin-top: 25px;
        gap: 12px;
        padding: 0 15px;
    }

    .profile-action-btn {
        padding: 12px 16px;
        border-radius: 10px;
    }

    .action-icon {
        width: 35px;
        height: 35px;
        border-radius: 8px;
        margin-right: 12px;
    }

    .action-icon i {
        font-size: 16px;
    }

    .action-text {
        font-size: 13px;
    }
}

/* Маленькие телефоны */
@media (max-width: 480px) {
    /* Основные секции */
    .content-section {
        padding: 10px;
    }
    
    /* Заголовки */
    .header h1 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    /* Поиск */
    .search-bar input {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    /* Рекомендации */
    .recommendations-feed {
        gap: 10px;
    }
    
    .recommendation-card {
        padding: 12px;
        border-radius: 10px;
    }
    
    .recommendation-image {
        padding-bottom: 56.25%; /* 16:9 aspect ratio */
        max-height: 160px;
        margin-bottom: 10px;
    }
    
    .recommendation-image.shorts-thumbnail {
        padding-bottom: 133.33%; /* 3:4 aspect ratio */
        max-height: 240px;
    }
    
    .recommendation-card h3 {
        font-size: 15px;
        margin-bottom: 6px;
    }
    
    .recommendation-card p {
        font-size: 13px;
        margin-bottom: 10px;
        line-height: 1.3;
    }
    
    .recommendation-card .meta {
        font-size: 10px;
    }
    
    /* Видеоуроки */
    .video-grid {
        gap: 12px;
    }
    
    .video-thumbnail {
        padding-bottom: 56.25%; /* 16:9 aspect ratio */
        max-height: 150px;
    }
    
    .video-info {
        padding: 10px;
    }
    
    .video-info h3 {
        font-size: 15px;
        margin-bottom: 6px;
    }
    
    .video-info p {
        font-size: 13px;
        line-height: 1.3;
    }
    
    /* Задания */
    .assignments-progress {
        margin-bottom: 15px;
        padding: 12px;
        border-radius: 10px;
    }
    
    .progress-text {
        font-size: 13px;
    }
    
    .progress-count {
        font-size: 11px;
    }
    
    .assignments-list {
        gap: 10px;
    }
    
    .assignment-card {
        padding: 12px;
        border-radius: 10px;
    }
    
    .assignment-card h3 {
        font-size: 15px;
        margin-bottom: 6px;
    }
    
    .assignment-card p {
        font-size: 13px;
        line-height: 1.3;
    }
    
    /* Кнопки ссылок */
    .link-button {
        padding: 6px 10px;
        font-size: 12px;
        border-radius: 6px;
    }
    
    /* Нижняя навигация */
    .bottom-nav {
        padding: 6px 0;
        height: 65px;
    }
    
    .nav-item {
        padding: 6px 4px;
        min-width: 50px;
    }
    
    .nav-item i {
        font-size: 18px;
        margin-bottom: 3px;
    }
    
    .nav-item span {
        font-size: 9px;
        line-height: 1.1;
    }
    
    /* Профиль */
    .profile-content {
        padding: 15px;
    }
    
    .profile-avatar i {
        font-size: 50px;
    }
    
    .profile-info h2 {
        font-size: 18px;
        margin-bottom: 6px;
    }
    
    .profile-info p {
        font-size: 13px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
    .content-section {
        padding: 8px;
    }
    
    .header h1 {
        font-size: 16px;
    }
    
    .recommendation-card,
    .video-card,
    .assignment-card {
        padding: 10px;
    }
    
    .recommendation-image {
        max-height: 140px;
    }
    
    .recommendation-image.shorts-thumbnail {
        max-height: 200px;
    }
    
    .video-thumbnail {
        max-height: 130px;
    }
    
    .nav-item span {
        font-size: 8px;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section.active {
    animation: fadeIn 0.3s ease-out;
}

/* Диалог подтверждения */
.confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.confirmation-modal.active {
    opacity: 1;
}

.confirmation-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 20px;
    padding: 25px;
    max-width: 400px;
    width: 90%;
    border: 1px solid rgba(76, 175, 80, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.confirmation-modal.active .confirmation-content {
    transform: scale(1);
}

.confirmation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.confirmation-header h3 {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: #888888;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.confirmation-body {
    margin-bottom: 25px;
}

.confirmation-body p {
    color: #cccccc;
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.5;
}

.assignment-title {
    color: #4caf50 !important;
    font-weight: 600;
    font-size: 18px !important;
    text-align: center;
    padding: 10px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 10px;
    border-left: 3px solid #4caf50;
}

.confirmation-note {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    color: #93c5fd;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 12px 0;
    font-size: 14px;
    line-height: 1.4;
    border: 1px solid #3b82f6;
    text-align: center;
}

.confirmation-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-cancel, .btn-confirm {
    padding: 12px 25px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
    justify-content: center;
}

.btn-cancel {
    background: linear-gradient(135deg, #666666 0%, #555555 100%);
    color: #ffffff;
}

.btn-cancel:hover {
    background: linear-gradient(135deg, #777777 0%, #666666 100%);
    transform: translateY(-2px);
}

.btn-confirm {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: #ffffff;
}

.btn-confirm:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

/* Скроллбар */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #333333, #444444);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #444444, #555555);
} 

/* YouTube-подобный мобильный проигриватель */
.youtube-mobile-player {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #000;
    color: white;
}

.video-player-section {
    width: 100%;
    background: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    overflow: hidden;
}

.video-player-section iframe {
    width: 100%;
    height: 100%;
    border: none;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
    background: #000;
}

.video-info-section {
    padding: 16px;
    background: #0f0f0f;
    border-bottom: 1px solid #2f2f2f;
}

.video-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.video-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: #aaa;
    margin-bottom: 16px;
}

.video-description-text {
    font-size: 14px;
    line-height: 1.5;
    color: #ccc;
    max-height: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.recommendations-section {
    flex: 1;
    background: #0f0f0f;
    overflow-y: auto;
}

.recommendations-title {
    padding: 16px 16px 8px 16px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin: 0;
}

.recommendations-list {
    padding: 0 16px 16px 16px;
}

.recommendation-item {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.recommendation-item:hover {
    background: #1f1f1f;
}

.recommendation-thumbnail {
    position: relative;
    width: 160px;
    height: 90px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #2f2f2f;
}

.recommendation-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2f2f2f;
    color: #666;
}

.placeholder-thumbnail i {
    font-size: 24px;
}

.video-duration-overlay {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 11px;
    padding: 2px 4px;
    border-radius: 2px;
}

.recommendation-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.recommendation-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recommendation-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #aaa;
    margin-top: 4px;
}

.recommendation-description {
    color: #ccc;
    font-size: 13px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-top: 4px;
    display: block;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .video-modal-content {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
        margin: 0;
    }
    
    .video-modal-header {
        position: relative;
        background: rgba(0, 0, 0, 0.9);
        padding: 8px 16px;
        border-bottom: 1px solid #333;
    }
    
    .video-modal-body {
        height: calc(100% - 50px);
        padding: 0;
    }
    
    .video-container {
        height: 100%;
    }
    
    .youtube-mobile-player {
        height: calc(100vh - 50px);
        display: flex;
        flex-direction: column;
    }
    
    .video-player-section {
        width: 100%;
        height: auto;
        min-height: 200px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #000;
    }
    
    .video-player-section iframe {
        width: 100%;
        height: 100%;
        border: none;
        object-fit: cover;
    }
    
    /* Специальные стили для мобильных устройств */
    .video-player-section.youtube-video {
        aspect-ratio: 16/9;
        max-height: 50vh;
        width: 100%;
    }
    
    .video-player-section.youtube-shorts {
        aspect-ratio: 9/16;
        max-height: 90vh;
        width: 100%;
        margin: 0 auto;
    }
    
    .video-player-section.google-drive {
        aspect-ratio: 16/9;
        max-height: 50vh;
        width: 100%;
    }
    
    .video-player-section.other-video {
        aspect-ratio: 4/3;
        max-height: 45vh;
        width: 100%;
    }
    
    .recommendations-section {
        flex: 1;
        overflow-y: auto;
    }
    
    .recommendation-thumbnail {
        width: 140px;
        height: 79px;
    }
    
    .watch-button {
        padding: 6px 12px;
        font-size: 11px;
        margin-top: 6px;
    }
    
    .watch-button i {
        font-size: 9px;
    }
}

/* Стили для YouTube Shorts */
.shorts-modal .youtube-mobile-player {
    height: 100vh;
}

.shorts-modal .video-player-section {
    height: 100vh;
    aspect-ratio: 9/16;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shorts-modal .video-info-section,
.shorts-modal .recommendations-section {
    display: none;
}

/* Адаптивные стили для разных размеров видео */
.video-player-section.youtube-shorts {
    aspect-ratio: 9/16;
    max-height: 90vh;
    width: 100%;
    margin: 0 auto;
}

.video-player-section.youtube-video {
    aspect-ratio: 16/9;
    max-height: 60vh;
    width: 100%;
    margin: 0;
}

.video-player-section.google-drive {
    aspect-ratio: 16/9;
    max-height: 60vh;
    width: 100%;
    margin: 0;
}

.video-player-section.other-video {
    aspect-ratio: 4/3;
    max-height: 50vh;
    width: 100%;
    margin: 0;
}

/* Стили для описания рекомендаций */
.recommendation-description {
    color: #ccc;
    font-size: 13px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-top: 4px;
    display: block;
}

.video-description {
    color: #ccc;
    font-size: 12px;
    line-height: 1.4;
    margin-top: 8px;
}

/* Увеличенные размеры для рекомендаций */
.recommendation-title {
    font-size: 16px !important;
    margin-bottom: 6px !important;
}

.recommendation-description {
    font-size: 13px !important;
    line-height: 1.4 !important;
    margin-top: 4px !important;
}

/* Стили для кнопки просмотра */
.watch-button {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    width: fit-content;
}

.watch-button:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.watch-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
}

.watch-button i {
    font-size: 9px;
}

/* Мобильные стили для кнопки */
@media (max-width: 768px) {
    .watch-button {
        padding: 6px 12px;
        font-size: 11px;
        margin-top: 6px;
    }
    
    .watch-button i {
        font-size: 9px;
    }
}