/* AD ACADEMY — LESSON PLAYER CSS */

/* === LAYOUT BASE === */
.lesson-body { display: block; background: var(--bg-primary); }

.lesson-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 60px;
    background: rgba(2, 2, 5, 0.96);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 1000;
    gap: 1rem;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
}

.back-btn:hover { color: var(--accent-blue); border-color: var(--accent-blue); }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.bc-sep { opacity: 0.4; }
.bc-course { color: var(--text-secondary); }
.bc-module { color: var(--text-secondary); }
.active-bc { color: var(--accent-blue); font-weight: 600; }

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.mission-xp-badge {
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: var(--accent-blue);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    animation: pulseGlow 3s ease-in-out infinite alternate;
}

.topbar-user-avatar {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.8rem; cursor: pointer;
    flex-shrink: 0;
}

/* === SPLIT LAYOUT === */
.lesson-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 0;
    margin-top: 60px;
    min-height: calc(100vh - 60px - 80px);
}

/* === COLUNA ESQUERDA: PLAYER === */
.lesson-left {
    padding: 2rem 2rem 2rem 2.5rem;
    border-right: 1px solid var(--glass-border);
    overflow-y: auto;
}

/* VIDEO PLAYER */
.video-wrapper { margin-bottom: 1.5rem; }

.video-player {
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    border: 1px solid var(--glass-border);
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: opacity 0.4s ease;
}

.video-play-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    transition: var(--transition);
}

.video-play-btn:hover .play-icon { transform: scale(1.1); box-shadow: 0 0 40px var(--accent-glow); }
.video-player.playing .video-play-btn { display: none; }
.video-player.playing .video-thumbnail { opacity: 0.15; }

.play-icon {
    width: 72px; height: 72px;
    background: var(--accent-blue);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 0 30px var(--accent-glow);
    transition: var(--transition);
}

.video-play-btn p {
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* PLAYER CONTROLS */
.player-controls {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 1rem 1.5rem 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.progress-track {
    position: relative;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    margin-bottom: 0.8rem;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-blue);
    border-radius: 10px;
    transition: width 0.3s linear;
    box-shadow: 0 0 8px var(--accent-glow);
}

.progress-thumb {
    position: absolute;
    top: 50%; 
    left: 0%;
    transform: translate(-50%, -50%);
    width: 12px; height: 12px;
    background: var(--accent-blue);
    border-radius: 50%;
    transition: left 0.3s linear;
}

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

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

.ctrl-btn {
    background: none; border: none; color: white;
    font-size: 1rem; cursor: pointer;
    padding: 0.3rem;
    border-radius: 6px;
    transition: var(--transition);
    opacity: 0.7;
}
.ctrl-btn:hover { opacity: 1; color: var(--accent-blue); }
.time-display { font-size: 0.8rem; color: rgba(255,255,255,0.7); font-family: 'JetBrains Mono', monospace; }

/* BOOKMARKS */
.bookmarks-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    flex-wrap: wrap;
}

.bm-label { font-size: 0.75rem; color: var(--text-secondary); font-weight: 600; }

.bookmark-item {
    background: rgba(255, 200, 0, 0.08);
    border: 1px solid rgba(255, 200, 0, 0.25);
    color: #ffc800;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: var(--transition);
}

.bookmark-item:hover {
    background: rgba(255, 200, 0, 0.15);
    transform: translateY(-2px);
}

/* === ABAS DE MATERIAL === */
.lesson-tabs { margin-top: 1rem; }

.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--glass-border);
    gap: 0;
    margin-bottom: 1.5rem;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.8rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    font-family: 'Inter', sans-serif;
}

.tab-btn:hover { color: var(--accent-blue); }
.tab-btn.tab-active {
    color: var(--accent-blue);
    border-bottom: 2px solid var(--accent-blue);
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.4s ease; }

.tab-content h3 { margin-bottom: 1rem; font-size: 1.1rem; }

.lesson-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* OBJECTIVES LIST */
.objectives-list { margin-top: 1rem; }
.objectives-list h4 { margin-bottom: 1rem; font-size: 0.9rem; color: var(--text-secondary); }

.obj-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    transition: var(--transition);
}

.obj-item.completed {
    background: rgba(39, 201, 63, 0.08);
    border-color: rgba(39, 201, 63, 0.3);
}

.obj-check { color: var(--text-secondary); font-size: 1rem; }
.obj-item.completed .obj-check { color: #27c93f; }

/* DOWNLOADS */
.downloads-grid { display: grid; gap: 0.8rem; }

.download-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.download-card:hover {
    border-color: var(--accent-blue);
    transform: translateX(4px);
}

.dl-icon { font-size: 1.5rem; }
.dl-info { flex-grow: 1; }
.dl-info strong { display: block; margin-bottom: 0.2rem; font-size: 0.9rem; }
.dl-info span { font-size: 0.75rem; color: var(--text-secondary); }
.dl-arrow { color: var(--accent-blue); font-size: 1.2rem; }

/* NOTES EDITOR */
.notes-editor {
    width: 100%;
    min-height: 200px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
    resize: vertical;
    transition: var(--transition);
    outline: none;
}

.notes-editor:focus { border-color: var(--accent-blue); }
.notes-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 0.8rem; }
.notes-status { font-size: 0.75rem; color: var(--text-secondary); }
.btn-sm { padding: 0.5rem 1.2rem; font-size: 0.8rem; }

/* QUIZ */
.quiz-header { margin-bottom: 1.5rem; }
.quiz-header p { color: var(--text-secondary); margin-top: 0.5rem; }

.question-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.question-number { font-size: 0.75rem; color: var(--accent-blue); font-weight: 700; margin-bottom: 0.5rem; }
.question-text { font-size: 1rem; font-weight: 600; margin-bottom: 1.5rem; line-height: 1.6; }

.options { display: flex; flex-direction: column; gap: 0.6rem; }

.option-btn {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    text-align: left;
    font-size: 0.88rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
}

.option-btn:hover { border-color: var(--accent-blue); background: rgba(0,242,254,0.05); }
.option-btn.correct { background: rgba(39,201,63,0.15); border-color: #27c93f; color: #27c93f; }
.option-btn.wrong { background: rgba(255,95,86,0.15); border-color: #ff5f56; color: #ff5f56; }

.quiz-submit-btn { margin-top: 1rem; }

/* === COLUNA DIREITA: TERMINAL LAB === */
.lesson-right {
    background: #060610;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px - 80px);
    overflow: hidden;
}

.terminal-lab {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.terminal-lab-header {
    background: #10101e;
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.lab-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.lab-status-dot {
    width: 8px; height: 8px;
    background: #27c93f;
    border-radius: 50%;
    animation: pulseGlowMini 2s infinite;
}

.lab-actions { display: flex; gap: 0.5rem; }

.lab-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    transition: var(--transition);
}

.lab-btn:hover { color: white; border-color: var(--text-secondary); }
.lab-btn-success { border-color: rgba(39,201,63,0.4); color: #27c93f; }
.lab-btn-success:hover { background: rgba(39,201,63,0.1); border-color: #27c93f; }

/* TERMINAL OUTPUT */
.terminal-output {
    flex: 1;
    padding: 1rem 1.2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    line-height: 1.8;
    overflow-y: auto;
    color: #c9d1d9;
    min-height: 0;
}

.t-line-block { display: block; margin-bottom: 0.1rem; }
.t-separator { height: 1px; background: var(--glass-border); margin: 0.5rem 0 0.8rem; }

/* Terminal input */
.terminal-input-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(0,0,0,0.4);
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.input-prompt {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent-blue);
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
}

.terminal-input {
    flex: 1;
    background: none;
    border: none;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    outline: none;
    caret-color: var(--accent-blue);
}

/* CMD HINTS */
.cmd-hints {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-top: 1px solid var(--glass-border);
    flex-wrap: wrap;
    background: rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.hint-label { font-size: 0.7rem; color: var(--text-secondary); flex-shrink: 0; }

.cmd-chip {
    background: rgba(0,242,254,0.06);
    border: 1px solid rgba(0,242,254,0.2);
    color: var(--accent-blue);
    padding: 0.2rem 0.6rem;
    border-radius: 5px;
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: var(--transition);
}

.cmd-chip:hover { background: rgba(0,242,254,0.15); }

/* LAB CHECKLIST */
.lab-mission-progress {
    padding: 1.2rem;
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.lab-mission-progress h4 {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lab-checklist { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }

.lab-check-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.lab-check-item.done { color: #27c93f; }
.lab-check-item .check-icon { font-size: 0.9rem; flex-shrink: 0; }
.lab-check-item code {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(255,255,255,0.05);
    padding: 0 0.3rem;
    border-radius: 3px;
}

/* === MISSION NAVIGATION BAR === */
.mission-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: 0 2rem;
    height: 80px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
    position: sticky;
    bottom: 0;
    z-index: 100;
}

.mission-nav-btn {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-decoration: none;
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.mission-nav-btn.prev-mission { align-items: flex-start; }
.mission-nav-btn.next-mission { align-items: flex-end; }
.mission-nav-btn:hover:not(.locked) { border-color: var(--accent-blue); background: rgba(0,242,254,0.05); }
.mission-nav-btn.locked { opacity: 0.4; cursor: not-allowed; }

.nav-dir { font-size: 0.7rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }
.nav-title { font-size: 0.85rem; font-weight: 600; }

.mission-progress-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.mini-progress-bar {
    width: 120px; height: 4px;
    background: var(--glass-border);
    border-radius: 10px;
}

.mini-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    border-radius: 10px;
}

/* === ACHIEVEMENT MODAL === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
    z-index: 2000;
}

.achievement-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2001;
    width: 420px;
}

.achievement-card {
    background: var(--bg-secondary);
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    text-align: center;
    box-shadow: 0 0 60px rgba(0, 242, 254, 0.15);
    animation: fadeIn 0.3s ease;
}

.achievement-icon { font-size: 4rem; margin-bottom: 1rem; }
.achievement-card h2 { font-size: 2rem; margin-bottom: 0.5rem; }
.achievement-card p { color: var(--text-secondary); margin-bottom: 1.5rem; }

.xp-earned {
    background: rgba(0,242,254,0.1);
    border: 1px solid rgba(0,242,254,0.3);
    color: var(--accent-blue);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 800;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.achievement-badges {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.badge-earned {
    background: rgba(112, 0, 255, 0.1);
    border: 1px solid rgba(112, 0, 255, 0.3);
    color: #a855f7;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* === SCROLLBARS DO TERMINAL === */
.terminal-output::-webkit-scrollbar { width: 4px; }
.terminal-output::-webkit-scrollbar-track { background: transparent; }
.terminal-output::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 10px; }
