:root {
    --bg-main: #FAFAFC;
    --bg-panel: rgba(255, 255, 255, 0.85);
    --bg-card: #FFFFFF;
    --bg-hover: rgba(139, 92, 246, 0.05); /* very light purple hover */
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --accent-primary: #8B5CF6;
    --accent-hover: #7C3AED;
    --accent-secondary: #F97316;
    --success: #10B981;
    --border-color: rgba(0, 0, 0, 0.08);
    --font-main: 'Plus Jakarta Sans', sans-serif;
    
    --glass-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.05);
    --glass-blur: blur(12px);
    --border-radius-lg: 16px;
    --border-radius-md: 12px;
    --border-radius-sm: 8px;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    padding: 0;
    height: 100vh;
    /* Soft ambient background */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.08), transparent 30%),
        radial-gradient(circle at 85% 30%, rgba(249, 115, 22, 0.05), transparent 30%);
    background-attachment: fixed;
}

/* App Layout */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    background: var(--bg-main);
}

/* Sidebar */
.sidebar {
    width: 340px;
    background: var(--bg-panel);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.sidebar-header {
    height: 80px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.menu-toggle {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    display: none;
    transition: color 0.2s;
}

.menu-toggle:hover {
    color: var(--accent-primary);
}

.progress-container {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.progress-percent {
    color: var(--accent-primary);
    font-weight: 700;
}

.progress-bar {
    height: 6px;
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    transition: width 1s ease-in-out;
}

.modules-container {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Custom Scrollbar */
.modules-container::-webkit-scrollbar {
    width: 6px;
}

.modules-container::-webkit-scrollbar-track {
    background: transparent;
}

.modules-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.module-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 700;
    margin-bottom: 16px;
    padding-left: 4px;
}

.module-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.module-card.active {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.module-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.module-header:hover {
    background: var(--bg-hover);
}

.module-info h4 {
    font-size: 15px;
    margin-bottom: 4px;
    font-weight: 600;
}

.module-info span {
    font-size: 12px;
    color: var(--text-secondary);
}

.chevron {
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.module-content {
    display: none;
    border-top: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.5);
}

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

.lesson-item {
    padding: 14px 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.lesson-item:hover {
    background: var(--bg-hover);
}

.lesson-item.active {
    background: rgba(139, 92, 246, 0.1);
    border-left-color: var(--accent-primary);
}

.status-icon {
    font-size: 18px;
    margin-top: 2px;
}

.lesson-item.completed .status-icon {
    color: var(--success);
}

.lesson-item.active .status-icon.current {
    color: var(--accent-primary);
}

.lesson-item.locked .status-icon {
    color: #6b7280;
}

.lesson-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lesson-name {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.lesson-item.locked .lesson-name {
    color: var(--text-secondary);
}

.lesson-time {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
}

/* Top Nav */
.top-nav {
    height: 80px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 40;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
}

.badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--accent-secondary);
    color: white;
    font-size: 10px;
    font-weight: bold;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px 6px 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-profile:hover {
    background: var(--bg-hover);
    border-color: rgba(255, 255, 255, 0.2);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
}

.user-role {
    font-size: 11px;
    color: var(--accent-primary);
    font-weight: 600;
}

/* Content Wrapper */
.content-wrapper {
    padding: 32px 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Video Player */
.video-container {
    width: 100%;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--glass-shadow);
    background: #000;
    margin-bottom: 32px;
    position: relative;
    aspect-ratio: 16/9;
}

.video-player {
    width: 100%;
    height: 100%;
    position: relative;
}

.video-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
    transition: background 0.3s;
}

/* Primary Button Standardization */
.btn-primary {
    width: 100%;
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 14px;
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.6);
}

.btn-primary i {
    font-size: 18px;
    transition: transform 0.2s;
}

.btn-primary:hover i {
    transform: translateX(4px);
}

/* Nav Item Standardization */
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-item i {
    font-size: 20px;
}

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

.nav-item.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.nav-item.logout {
    color: #ef4444;
    margin-top: auto;
}

.nav-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.video-overlay:hover {
    background: rgba(0,0,0,0.2);
}

.play-btn-large {
    font-size: 64px;
    color: white;
    background: var(--gradient-primary);
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-overlay:hover .play-btn-large {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.8);
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 20px;
    z-index: 20;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.video-container:hover .video-controls {
    transform: translateY(0);
}

.progress-bar-video {
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    cursor: pointer;
    margin-bottom: 12px;
    position: relative;
}

.progress-fill-video {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 2px;
    position: relative;
}

.progress-fill-video::after {
    content: '';
    position: absolute;
    right: -6px;
    top: -4px;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.controls-left, .controls-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.controls-row button {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

.controls-row button:hover {
    color: var(--accent-primary);
}

.time-display {
    font-size: 14px;
    font-weight: 500;
}

/* Lesson Metadata */
.lesson-metadata {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.meta-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.badge-module {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.title-group h2 {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
}

.mark-done-btn {
    background: var(--bg-hover);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mark-done-btn:hover {
    background: var(--success);
    border-color: var(--success);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 32px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    padding: 0 0 16px 0;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--accent-primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 3px 3px 0 0;
}

.tab-content {
    animation: fadeIn 0.4s ease forwards;
}

.tab-content.hidden {
    display: none;
}

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

/* Tab 1: Overview */
.description-card {
    color: var(--text-secondary);
    line-height: 1.7;
}

.description-card h3 {
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: 18px;
}

.description-card p {
    margin-bottom: 16px;
}

.description-card ul {
    margin-left: 20px;
    margin-bottom: 16px;
}

.description-card li {
    margin-bottom: 8px;
}

/* Tab 2: Materials */
.materials-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.material-item {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.material-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.2);
}

.material-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.bg-pdf { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.bg-zip { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }

.material-details {
    flex: 1;
}

.material-details h4 {
    font-size: 15px;
    margin-bottom: 4px;
}

.material-details span {
    font-size: 12px;
    color: var(--text-secondary);
}

.download-btn {
    background: var(--bg-hover);
    border: none;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
}

.download-btn:hover {
    background: var(--accent-primary);
    color: white;
}

/* Tab 3: Comments */
.comments-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.comment-input-box {
    display: flex;
    gap: 16px;
    background: var(--bg-main);
    padding: 20px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

.avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-wrapper textarea {
    background: transparent;
    border: none;
    resize: none;
    height: 60px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.input-wrapper textarea::placeholder {
    color: var(--text-secondary);
}

.submit-comment {
    align-self: flex-end;
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-comment:hover {
    background: var(--accent-hover);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment {
    display: flex;
    gap: 16px;
}

.comment-body {
    flex: 1;
    background: var(--bg-main);
    padding: 16px;
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(255,255,255,0.05);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    font-size: 14px;
}

.comment-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.comment-text {
    font-size: 14px;
    color: #d1d5db;
    margin-bottom: 12px;
    line-height: 1.5;
}

.comment-actions {
    display: flex;
    gap: 16px;
}

.comment-actions button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.comment-actions button:hover {
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .top-nav {
        padding: 0 20px;
    }
    
    .menu-toggle {
        display: block;
        margin-right: 16px;
    }
    
    .nav-left {
        display: flex;
        align-items: center;
    }

    .content-wrapper {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .meta-header {
        flex-direction: column;
        gap: 16px;
    }

    .tabs {
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .tab-btn {
        white-space: nowrap;
    }
}

/* Custom Volt Footer */
.volt-footer-wrapper {
    background-color: transparent; /* Removido o fundo laranja */
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: auto;
    z-index: 10;
    position: relative;
}

.volt-footer-transparent {
    background-color: transparent !important;
}

.volt-footer-version {
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    font-family: monospace;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.volt-footer-capsule {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 30px;
    padding: 6px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.volt-footer-capsule a {
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
    font-family: var(--font-main);
}

.volt-footer-capsule a:hover {
    opacity: 0.8;
}

.volt-footer-capsule .divider {
    width: 1px;
    height: 14px;
    background-color: rgba(255, 255, 255, 0.3);
}

.volt-footer-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volt-footer-icons a i {
    font-size: 18px;
    font-weight: normal;
}

