
/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #17171A;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
.header {
    position: fixed;
    height: 70px;
    padding-top: 5px;
    top: 0;
    width: 100%;
    background-color: rgba(23, 23, 26, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(118, 65, 230, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: #7641E6;
}

.nav-logo i {
    margin-right: 8px;
    font-size: 1.6rem;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(118, 65, 230, 0.1);
    color: #7641E6;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: rgba(118, 65, 230, 0.2);
    color: #8b52eb;
    transform: translateY(-1px);
}

/* Main Platform Container */
.course-platform {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    display: flex;
}

.platform-container {
    display: flex;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    gap: 0;
    padding: 20px;
}

/* Video Section */
.video-section {
    flex: 1;
    background: #17171A;
    display: flex;
    flex-direction: column;
    margin-right: 20px;
}

.video-player-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio padrão do YouTube */
    background: #000;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 20px;
}

#videoPlayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

/* Loading Animation */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(118, 65, 230, 0.2);
    border-top: 4px solid #7641E6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loading-text {
    color: #7641E6;
    font-size: 1rem;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 2rem;
    z-index: 10;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.video-player-container:hover .video-overlay {
    opacity: 1;
    transform: translateY(0);
}

.video-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.video-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #b3b3b3;
}

/* Course Header */
.course-header {
    padding: 0;
    background: #17171A;
}

.course-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff, #b3b3b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.course-info {
    margin-bottom: 1.5rem;
}

.info-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #b3b3b3;
    font-size: 0.9rem;
}

.stat-item i {
    color: #7641E6;
}

/* Lessons Sidebar */
.lessons-sidebar {
    width: 380px;
    background: #1a1a1f;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 110px);
    flex-shrink: 0;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(118, 65, 230, 0.1);
    background: #1a1a1f;
    border-radius: 12px 12px 0 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.total-lessons {
    font-size: 0.85rem;
    color: #b3b3b3;
}

.lessons-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

/* Custom Scrollbar */
.lessons-list::-webkit-scrollbar {
    width: 6px;
}

.lessons-list::-webkit-scrollbar-track {
    background: rgba(118, 65, 230, 0.05);
}

.lessons-list::-webkit-scrollbar-thumb {
    background: rgba(118, 65, 230, 0.3);
    border-radius: 10px;
}

.lessons-list::-webkit-scrollbar-thumb:hover {
    background: rgba(118, 65, 230, 0.5);
}

/* Lesson Items */
.lesson-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(118, 65, 230, 0.05);
}

.lesson-item:hover {
    background: rgba(118, 65, 230, 0.05);
    transform: translateX(2px);
}

.lesson-item.active {
    background: rgba(118, 65, 230, 0.1);
    border-left: 3px solid #7641E6;
}

.lesson-item.active .lesson-title {
    color: #7641E6;
    font-weight: 600;
}

.lesson-item.completed {
    opacity: 0.8;
}

.lesson-item.completed .lesson-status i {
    color: #10b981;
}

.lesson-number {
    width: 32px;
    height: 32px;
    background: rgba(118, 65, 230, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #7641E6;
    margin-right: 1rem;
    flex-shrink: 0;
}

.lesson-item.active .lesson-number {
    background: #7641E6;
    color: #ffffff;
}

.lesson-content {
    flex: 1;
    min-width: 0;
}

.lesson-title {
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 0.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lesson-duration {
    font-size: 0.8rem;
    color: #b3b3b3;
}

.lesson-status {
    margin-left: 1rem;
    flex-shrink: 0;
}

.lesson-status i {
    font-size: 1.2rem;
    color: #7641E6;
    transition: all 0.3s ease;
}

.lesson-item:not(.active) .lesson-status i.fa-lock {
    color: #666;
}

/* Fade animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .platform-container {
        padding: 15px;
    }
    
    .lessons-sidebar {
        width: 350px;
    }
}

@media screen and (max-width: 1024px) {
    .lessons-sidebar {
        width: 320px;
    }
    
    .video-player-container {
        padding-bottom: 56.25%; /* Mantém 16:9 também no tablet */
    }
}

@media screen and (max-width: 768px) {
    .course-platform {
        margin-top: 70px;
        display: block;
    }
    
    .platform-container {
        flex-direction: column;
        padding: 10px;
        gap: 15px;
    }
    
    .video-section {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .video-player-container {
        padding-bottom: 56.25%; /* Volta ao 16:9 padrão no mobile */
        margin-bottom: 15px;
    }
    
    .course-header {
        display: none; /* Oculta no mobile */
    }
    
    .lessons-sidebar {
        width: 100%;
        max-height: 60vh;
        border-radius: 12px;
    }
    
    .info-stats {
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    .sidebar-header {
        padding: 1rem;
    }
    
    .lesson-item {
        padding: 0.8rem 1rem;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-logo {
        font-size: 1.2rem;
    }
    
    .nav-logo i {
        font-size: 1.4rem;
    }
    
    .btn-back {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 480px) {
    .platform-container {
        padding: 8px;
        gap: 10px;
    }
    
    .video-player-container {
        margin-bottom: 10px;
    }
    
    .course-header {
        padding: 0;
    }
    
    .course-title {
        font-size: 1.3rem;
    }
    
    .sidebar-header {
        padding: 0.8rem;
    }
    
    .lesson-item {
        padding: 0.7rem 0.8rem;
    }
    
    .lesson-title {
        font-size: 0.9rem;
    }
    
    .lesson-number {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        margin-right: 0.8rem;
    }
    
    .video-title {
        font-size: 1.1rem;
    }
    
    .video-overlay {
        padding: 1rem;
    }
}

/* Landscape mobile orientation */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .lessons-sidebar {
        max-height: 40vh;
    }
    
    .video-player-container {
        padding-bottom: 45%;
    }
}

/* Focus states for accessibility */
.lesson-item:focus,
.btn-back:focus {
    outline: 2px solid #7641E6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .lesson-item {
        border: 1px solid rgba(118, 65, 230, 0.3);
    }
    
    .lesson-item.active {
        border-color: #7641E6;
        background: rgba(118, 65, 230, 0.2);
    }
}

/* Notification styles */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    transform: translateX(400px);
    transition: all 0.3s ease;
    max-width: 350px;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification.success {
    background: #10b981;
    color: white;
}

.notification.warning {
    background: #f59e0b;
    color: white;
}

.notification.error {
    background: #ef4444;
    color: white;
}

.notification.info {
    background: #3b82f6;
    color: white;
}

@media screen and (max-width: 480px) {
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}
 