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

body {
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #ffffff;
    color: #000000;
    line-height: 1.4;
    opacity: 0;
    animation: fadeInSite 0.3s ease-out forwards;
}

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

/* Logo */
.logo {
    position: fixed;
    top: 15px;
    left: 30px;
    width: 120px;
    height: auto;
    z-index: 1001;
}

/* Header - прозрачный с основной навигацией */
.header-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.header-nav.scrolled {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 160px;
}

/* Desktop навигация */
.main-nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.main-nav a {
    text-decoration: none;
    color: #000000;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.main-nav a:hover {
    color: #F14635;
}

.main-nav a::after {
    display: none;
}

.main-nav a:hover::after {
    display: none;
}

/* Улучшенное Burger Menu */
.burger-menu {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1002;
}

.burger-icon {
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #F14635, #e03424);
    border-radius: 15px;
    padding: 12px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 6px 25px rgba(241, 70, 53, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.burger-icon:hover {
    background: linear-gradient(135deg, #d63a2a, #c52d1c);
    transform: scale(1.08) rotate(2deg);
    box-shadow: 0 10px 35px rgba(241, 70, 53, 0.6);
}

.burger-icon span {
    width: 26px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    margin: 3px 0;
    position: relative;
    display: block;
}

.burger-icon span::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.burger-icon:hover span::before {
    transform: scaleX(1);
}

.burger-icon.active {
    background: linear-gradient(135deg, #0089d0, #006ba6);
    transform: scale(1.05) rotate(-2deg);
}

.burger-icon.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    width: 30px;
}

.burger-icon.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.burger-icon.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    width: 30px;
}

/* Desktop Burger Menu (500x700) */
.nav-menu {
    position: absolute;
    top: 60px;
    right: 0;
    width: 500px;
    height: 700px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    padding: 40px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    display: block;
}

.nav-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.nav-menu.closing {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
}

.nav-menu-section {
    margin-bottom: 40px;
}

.nav-menu-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #000000;
    font-weight: 500;
    font-size: 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    background: #f8f8f8;
    color: #F14635;
    transform: translateX(5px);
}

.nav-menu a.active {
    background: #F14635;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(241, 70, 53, 0.3);
}

.nav-menu a.active::before {
    content: '';
    margin-right: 0;
}

.mobile-menu a.chapter-nav-item.active {
    background: rgba(0, 137, 208, 0.4);
    color: #e6f3ff;
    font-weight: 800;
    transform: translateX(5px);
}

/* Улучшенное Mobile Full Screen Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #F14635 0%, #d63a2a 100%);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    padding: 100px 30px 30px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-100%);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.mobile-menu.closing {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-100%);
}

.mobile-menu-header {
    margin-bottom: 40px;
    text-align: center;
}

.mobile-menu-title {
    color: white;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.mobile-menu-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    font-weight: 400;
}

.mobile-menu-section {
    margin-bottom: 30px;
}

.mobile-section-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    padding-left: 5px;
}

.mobile-menu a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    padding: 15px 20px;
    margin-bottom: 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(10px);
    border-color: rgba(255, 255, 255, 0.3);
}

.mobile-menu a.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateX(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.mobile-menu a::before {
    content: '';
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    margin-right: 12px;
    transition: all 0.3s ease;
}

.mobile-menu a:hover::before,
.mobile-menu a.active::before {
    background: white;
    transform: scale(1.3);
}

/* Main Content */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 120px 20px 40px;
    background: #ffffff;
    min-height: 100vh;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
    position: relative;
}

.header .logo {
    display: none; /* Скрываем логотип из header, используем фиксированный */
}

.main-title {
    font-family: 'Noto Sans', sans-serif;
    font-size: 42px;
    font-weight: 900;
    color: #000000;
    margin-bottom: 16px;
    margin-top: 20px;
}

.welcome-text {
    font-size: 18px;
    color: #000000;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Course Description с интерактивной анимацией */
.course-description {
    font-size: 16px;
    color: #666666;
    margin-bottom: 32px;
    text-align: center;
    line-height: 1.6;
    font-weight: 400;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 0 20px; /* Добавляем отступы для красивого отображения линии */
}

.course-description::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #F14635;
    transition: width 0.3s ease;
}

.course-description:hover {
    transform: translateY(-2px);
    color: #F14635;
}

.course-description:hover::after,
.course-description.visited::after {
    width: 80%; /* Красивая линия, не на всю ширину */
}

.course-description.visited::after {
    background: #F14635;
}

.course-description.visited {
    color: #F14635;
}

.learning-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 24px;
    color: #333333;
    text-align: center;
}

.topic-list {
    list-style: none;
}

.topic-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid rgba(240, 240, 240, 0.3);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.topic-item:hover {
    border-color: rgba(241, 70, 53, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(241, 70, 53, 0.15);
}

.topic-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #F14635;
    color: #ffffff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 16px;
    margin-right: 16px;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(241, 70, 53, 0.3);
}

.topic-content {
    flex: 1;
}

.topic-title {
    font-size: 16px;
    font-weight: 500;
    color: #333333;
    margin-bottom: 10px;
}

.subtopic-list {
    list-style: none;
    margin-top: 8px;
    pointer-events: none;
}

.subtopic-item {
    position: relative;
    padding-left: 20px;
    margin-bottom: 6px;
    font-size: 13px;
    color: #888888;
    user-select: none;
    line-height: 1.4;
    font-weight: 400;
}

.subtopic-item::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #0089d0;
    font-weight: bold;
    font-size: 16px;
}

.continue-btn {
    width: 100%;
    padding: 16px;
    background: #0089d0;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 32px;
    box-shadow: 0 6px 20px rgba(0, 137, 208, 0.25);
    text-transform: none;
    letter-spacing: 0.5px;
}

.continue-btn:hover {
    background: #0073b3;
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 137, 208, 0.4);
}

.continue-btn:active {
    transform: translateY(-1px);
}

/* Media Queries */
@media (max-width: 1023px) {
    .main-nav {
        display: none;
    }
    
    .nav-menu {
        display: none !important;
    }
    
    .mobile-menu {
        display: flex !important;
    }
    
    .burger-icon {
        width: 45px;
        height: 45px;
    }
    
    .logo {
        width: 100px;
        left: 25px;
    }
    
    .header-content {
        padding: 0 120px;
    }
}

@media (max-width: 600px) {
    .nav-menu {
        display: none !important;
    }
    
    .burger-menu {
        top: 18px;
        right: 18px;
    }
    
    .burger-icon {
        width: 42px;
        height: 42px;
    }
    
    .logo {
        top: 12px;
        left: 20px;
        width: 90px;
    }
    
    .container {
        padding: 100px 16px 20px;
    }
    
    .main-title {
        font-size: 32px;
    }
    
    .topic-item {
        padding: 16px;
    }
    
    .topic-number {
        width: 28px;
        height: 28px;
        font-size: 14px;
        margin-right: 12px;
    }
    
    .header-content {
        padding: 0 115px;
    }
    
    .mobile-menu {
        padding: 80px 20px 20px;
    }
    
    .mobile-menu-title {
        font-size: 24px;
    }
    
    .mobile-menu-subtitle {
        font-size: 14px;
    }
    
    .mobile-menu a {
        font-size: 16px;
        padding: 12px 16px;
    }
    
    .course-description {
        padding: 0 10px;
    }
}