:root {
    --primary-color: #1a1a2e;
    --secondary-color: #0f4c75;
    --accent-color: #3282b8;
    --highlight-color: #00d4ff;
    --bg-dark: #0a0a0f;
    --bg-card: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #b8c1ec;
    --border-color: #3282b833;
    --success-color: #00ff88;
    --warning-color: #ffaa00;
    --danger-color: #ff3366;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary-color) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* Верхняя навигация */
.top-nav {
    background: rgba(22, 33, 62, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.top-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-img {
    height: 48px;
    width: 48px;
    object-fit: contain;
    border-radius: 50%;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, var(--accent-color), var(--highlight-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Для мобильных устройств - скрываем текст, оставляем только логотип */
@media (max-width: 768px) {
    .logo-text {
        display: none;
    }
    
    .logo-img {
        height: 40px;
        width: 40px;
    }
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(50, 130, 184, 0.4);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.video-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.video-buttons .nav-btn {
    min-width: 220px;
    justify-content: center;
    text-align: center;
}

.video-btn {
    background: linear-gradient(135deg, var(--highlight-color), var(--accent-color));
}

.video-btn.secondary {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
}

/* Основной контейнер */
.main-container {
    display: flex;
    max-width: 1400px;
    margin: 2rem auto;
    gap: 2rem;
    padding: 0 2rem;
}

/* Боковое меню */
.sidebar {
    width: 280px;
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-card {
    background: rgba(22, 33, 62, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.sidebar h3 {
    color: var(--highlight-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover {
    background: rgba(50, 130, 184, 0.1);
    color: var(--text-primary);
    border-left-color: var(--highlight-color);
    padding-left: 1.3rem;
}

.sidebar-menu a.active {
    background: rgba(50, 130, 184, 0.2);
    color: var(--highlight-color);
    border-left-color: var(--highlight-color);
}

/* Основной контент */
.content {
    flex: 1;
    min-width: 0;
}

.content-card {
    background: rgba(22, 33, 62, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.6s ease;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, var(--text-primary), var(--highlight-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

h2 {
    color: var(--highlight-color);
    margin: 2rem 0 1rem;
    font-size: 1.8rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

h3 {
    color: var(--highlight-color);
    margin: 1.5rem 0 1rem;
    font-size: 1.3rem;
}

/* Предупреждения */
.warning-box {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.1), rgba(255, 170, 0, 0.05));
    border: 2px solid var(--warning-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.warning-box::before {
    content: "⚠️ ";
    font-size: 1.5rem;
    vertical-align: middle;
}

.success-box {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 255, 136, 0.05));
    border: 2px solid var(--success-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

/* Скриншоты */
.screenshot-placeholder {
    background: linear-gradient(135deg, var(--bg-card), var(--primary-color));
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    position: relative;
    overflow: hidden;
}

.screenshot-placeholder:not(:has(img))::before {
    content: "📸";
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.screenshot-placeholder img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.screenshot-placeholder p {
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

/* Галерея скриншотов */
.screenshot-gallery {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    justify-content: center;
    flex-wrap: wrap;
}

.screenshot-thumbnail {
    position: relative;
    width: 200px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
}

.screenshot-thumbnail:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(50, 130, 184, 0.3);
    border-color: var(--accent-color);
}

.thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.3s ease;
    display: block;
}

.screenshot-thumbnail:hover .thumbnail-img {
    transform: scale(1.05);
}

.thumbnail-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 0.5rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screenshot-thumbnail:hover .thumbnail-overlay {
    opacity: 1;
}

/* Модальное окно для скриншотов */
.screenshot-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.screenshot-modal.active {
    opacity: 1;
    visibility: visible;
}

.screenshot-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: var(--bg-card);
    border-radius: 15px;
    padding: 1rem;
    border: 2px solid var(--border-color);
}

.screenshot-modal-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    display: block;
}

.screenshot-modal-title {
    color: var(--text-primary);
    text-align: center;
    margin: 1rem 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.screenshot-modal-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background: var(--danger-color);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.screenshot-modal-close:hover {
    background: #ff1a4d;
    transform: scale(1.1);
}

/* Модальное окно для видео */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 960px;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.video-modal-title {
    color: var(--text-primary);
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.video-modal-inner {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.video-modal-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 12px;
}

.video-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.screenshot-container {
    margin: 1.5rem 0;
    text-align: center;
}

.lesson-screenshot {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.lesson-screenshot:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* Видео контейнер */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    margin: 2rem 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--text-secondary);
}

.video-placeholder::before {
    content: "▶️";
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Таблицы */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    overflow: hidden;
    border-radius: 10px;
}

thead {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

tbody tr {
    background: rgba(22, 33, 62, 0.3);
    transition: all 0.3s ease;
}

tbody tr:hover {
    background: rgba(50, 130, 184, 0.1);
}

/* Списки */
ul, ol {
    margin: 1rem 0 1rem 2rem;
    color: var(--text-secondary);
}

li {
    margin-bottom: 0.5rem;
}

/* Код */
code {
    background: rgba(50, 130, 184, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    color: var(--highlight-color);
}

/* Шаги */
.step {
    background: rgba(50, 130, 184, 0.05);
    border-left: 4px solid var(--accent-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 10px 10px 0;
}

.step-number {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: white;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 30px;
    border-radius: 50%;
    margin-right: 0.5rem;
    font-weight: bold;
}

/* Домашнее задание */
.homework {
    background: linear-gradient(135deg, rgba(50, 130, 184, 0.1), rgba(0, 212, 255, 0.05));
    border: 2px solid var(--accent-color);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 3rem;
}

.homework h2 {
    color: var(--highlight-color);
    border-bottom: none;
    margin-bottom: 1.5rem;
}

.homework-task {
    background: rgba(22, 33, 62, 0.5);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1rem 0;
}

/* Кнопки */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), var(--highlight-color));
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(50, 130, 184, 0.4);
}

/* Адаптивность */
@media (max-width: 1024px) {
    .sidebar {
        display: none;
    }
    
    .main-container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .top-nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .content-card {
        padding: 1.5rem;
    }
    
    .screenshot-gallery {
        gap: 0.5rem;
    }
    
    .screenshot-thumbnail {
        width: 150px;
        height: 90px;
    }
    
    .screenshot-modal-content {
        max-width: 95%;
        padding: 0.5rem;
    }
}

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

/* Прогресс бар */
.progress-bar {
    background: rgba(50, 130, 184, 0.1);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin: 2rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--highlight-color));
    width: 0%;
    transition: width 0.3s ease;
}

/* Сетка кошельков */
.wallet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.wallet-card {
    background: linear-gradient(135deg, rgba(22, 33, 62, 0.8), rgba(26, 26, 46, 0.8));
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.wallet-card.recommended {
    border: 2px solid var(--highlight-color);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(22, 33, 62, 0.9));
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
}

.wallet-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 8px 25px rgba(50, 130, 184, 0.2);
}

.wallet-card.recommended:hover {
    border-color: var(--highlight-color);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.4);
}

.recommended-badge {
    position: absolute;
    top: -12px;
    right: 15px;
    background: linear-gradient(135deg, var(--highlight-color), var(--accent-color));
    color: var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
    z-index: 10;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.wallet-card h3 {
    color: var(--highlight-color);
    margin: 0 0 1rem 0;
    font-size: 1.4rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.wallet-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0.5rem 0;
    flex-grow: 1;
}

.wallet-card p strong {
    color: var(--text-primary);
}

.wallet-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.wallet-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(50, 130, 184, 0.4);
    border-color: var(--highlight-color);
}

.wallet-link:active {
    transform: translateY(0);
}

/* Адаптивность для карточек кошельков */
@media (max-width: 768px) {
    .wallet-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .wallet-card {
        padding: 1.25rem;
    }
    
    .wallet-link {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* Прогресс бар сверху страницы */
#progressBar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-color), var(--highlight-color));
    z-index: 9999;
    transition: width 0.2s ease-out;
}

.info-box {
    background: rgba(0, 123, 255, 0.05);
    border-left: 4px solid #007bff;
    padding: 0.8rem 1rem;
    margin: 1rem 0;
}

.risk-box {
    background: rgba(255, 0, 0, 0.05);
    border-left: 4px solid #dc3545;
    padding: 0.8rem 1rem;
    margin: 1rem 0;
}

.safe-box {
    background: rgba(40, 167, 69, 0.05);
    border-left: 4px solid #28a745;
    padding: 0.8rem 1rem;
    margin: 1rem 0;
}
