/* General Styles */
body {
    background-color: #f8f9fa;
}

/* Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Course Card Styles */
.card {
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Fixed Header Styles */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #1976d2;
    color: white;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 500;
}

.brand:hover {
    color: white;
    text-decoration: none;
}

.main-nav {
    display: flex;
    gap: 20px;
}

.nav-item {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-item:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
}

.nav-item i {
    font-size: 1.2rem;
}

/* Install Button Styles */
#installContainer {
    position: fixed;
    bottom: 1em;
    right: 1em;
    z-index: 999;
}

#butInstall {
    padding: 10px 20px;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: background-color 0.2s;
}

#butInstall:hover {
    background: #1565c0;
}

.hidden {
    display: none !important;
}

/* Learning Layout Styles */
.learning-layout {
    display: flex;
    gap: 20px;
    width: 100%;
}

.learning-layout .main-content {
    flex: 1;
    max-width: 75%;
}

.learning-layout .sidebar {
    width: 25%;
    min-width: 300px;
    position: sticky;
    top: 20px;
    height: calc(100vh - 100px);
    overflow-y: auto;
    background: white;
    padding: 15px;
}

/* Course Container Styles */
.course-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.main-container {
    margin-top: 76px;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .nav-text {
        display: none;
    }

    .header-container {
        padding: 0 10px;
    }

    .brand {
        font-size: 1.2rem;
    }

    .nav-item {
        padding: 8px;
    }

    .main-container > div[ng-view] {
        margin-top: -120px;
    }

    .learning-layout {
        flex-direction: column;
    }

    .learning-layout .main-content {
        max-width: 100%;
        width: 100%;
    }

    .learning-layout .sidebar {
        position: fixed;
        top: 56px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 56px);
        transition: left 0.3s ease;
        z-index: 999;
        background: white;
        padding: 15px;
    }

    .learning-layout .sidebar.active {
        left: 0;
    }

    .course-container {
        padding: 10px;
        margin-top: 100px;
    }

    .container {
        padding: 10px;
    }
    
    .card {
        margin-bottom: 20px;
    }
    
    .video-container {
        margin: -10px;
        padding-bottom: 75%;
    }

    .nav-links {
        display: flex;
        justify-content: flex-end;
        gap: 25px;
        flex-direction: row;
    }
}

/* Course Detail Page Styles */
.course-title {
    font-size: 2.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.course-description {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.course-content-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.content-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
}

.content-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.chapters-list {
    padding: 0.5rem;
}

.chapter-section {
    margin-bottom: 0.5rem;
}

.chapter-header {
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.chapter-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #2c3e50;
}

.chapter-lessons {
    padding: 0.5rem 0;
}

.lessons-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lesson-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.lesson-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lesson-icon {
    color: #1976d2;
    font-size: 1.2rem;
}

.lesson-title {
    font-weight: 500;
}

.lesson-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.duration-badge {
    color: #666;
    font-size: 0.9rem;
}

.preview-btn {
    padding: 4px 12px;
    background: #e3f2fd;
    color: #1976d2;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.preview-btn:hover {
    background: #bbdefb;
}

/* Course Sidebar Styles */
.course-sidebar {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 76px;
}

.price-section {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.course-price {
    font-size: 2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.enroll-btn {
    width: 100%;
    padding: 0.875rem;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.enroll-btn:hover {
    background: #1565c0;
}

.course-stats {
    padding: 1rem 1.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
    color: #666;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-item i {
    color: #1976d2;
    width: 20px;
}

/* Learning Page Additional Styles */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 0 8px;
    align-items: center;
    gap: 8px;
}

.search-container {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f1f3f4;
    border-radius: 24px;
    margin: 0 8px;
    max-width: 720px;
    height: 40px;
    transition: background 100ms ease-in, width 100ms ease-out;
}

.search-container:focus-within {
    background: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1), 0 2px 6px rgba(0,0,0,0.1);
}

#searchInput {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0 16px;
    font-size: 16px;
    color: #3c4043;
    height: 100%;
}

#searchInput:focus {
    outline: none;
}

#clearSearch {
    display: none;
    background: transparent;
    border: none;
    color: #5f6368;
    padding: 0 16px;
    font-size: 18px;
    cursor: pointer;
}

#clearSearch:hover {
    color: #202124;
}

/* Learning Page Styles */
.course-info {
    margin-top: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.course-list {
    list-style: none;
}

.course-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.course-item:hover {
    background-color: #f0f0f0;
}

.course-item.active {
    background-color: #e3f2fd;
    border-left: 4px solid #1976d2;
}

.play-icon {
    color: #1976d2;
    font-size: 1.2em;
}

.resources {
    margin-top: 20px;
}

.resource-link {
    display: inline-block;
    margin: 5px 10px;
    color: #1976d2;
    text-decoration: none;
}

.resource-link:hover {
    text-decoration: underline;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
}

#menuToggle {
    background: transparent;
    color: #5f6368;
    border: none;
    padding: 12px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#menuToggle:hover {
    background-color: rgba(0,0,0,0.04);
    border-radius: 50%;
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

/* Mobile Responsive Adjustments for Learning Page */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .mobile-overlay.active {
        display: block;
    }

    .mobile-only-nav {
        display: block;
        border-radius: 8px;
    }

    .nav-links {
        display: flex;
        justify-content: flex-end;
        gap: 25px;
        flex-direction: row;
    }

    .nav-link {
        color: #666;
        font-size: 1.2rem;
    }

    .nav-link:hover {
        color: #1976d2;
        text-decoration: none;
    }

    .mobile-header {
        display: flex;
    }

    .learning-page .mobile-header {
        position: relative;
        margin-top: 50px;
        margin-bottom: 15px;
    }

    .course-info {
        margin-top: 15px;
    }

    #myVideo {
        border-radius: 0;
    }
}

/* Learning Page Main Content Styles */
.learning-layout .main-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
}

#myVideo {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    background: #000;
}

.learning-layout h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 1rem 0;
}

.learning-layout h3 {
    font-size: 1.4rem;
    font-weight: 500;
    color: #2c3e50;
    margin: 1.5rem 0 1rem;
}

.learning-layout p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.learning-layout .resources {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 30px;
}

.learning-layout .resources h3 {
    margin-top: 0;
    color: #1976d2;
}

.learning-layout .resource-link {
    background: white;
    padding: 8px 15px;
    border-radius: 6px;
    margin: 5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.learning-layout .resource-link:hover {
    background: #e3f2fd;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Mobile Adjustments for Learning Page Main Content */
@media (max-width: 768px) {
    .learning-layout .main-content {
        padding: 15px;
        border-radius: 0;
        box-shadow: none;
    }

    .learning-layout h2 {
        font-size: 1.5rem;
    }

    .learning-layout h3 {
        font-size: 1.2rem;
    }

    .learning-layout .resources {
        margin: 20px -15px;
        border-radius: 0;
    }

    #myVideo {
        border-radius: 0;
        margin: -15px -15px 15px -15px;
        width: calc(100% + 30px);
    }
}