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

:root {
    --bg-primary: #0b1329;
    --bg-secondary: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.78);
    --bg-card-hover: rgba(30, 41, 59, 0.88);
    --border-color: rgba(59, 130, 246, 0.2);
    --border-glow: rgba(0, 229, 255, 0.4);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --cefet-blue: #2563eb;
    --cefet-cyan: #00E5FF;
    --cefet-teal: #00adb5;
    --cefet-gold: #ffb800;
    --cefet-green: #10b981;
    --cefet-red: #ff4d4d;
    --cefet-purple: #8b5cf6;
    
    --gradient-cefet: linear-gradient(135deg, #2563eb 0%, #00adb5 100%);
    --gradient-cefet-gold: linear-gradient(135deg, #ffb800 0%, #f59e0b 100%);
    --gradient-cyan-glow: linear-gradient(135deg, #00E5FF 0%, #2563eb 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    user-select: none;
}

/* Custom Scrollbar for Slides */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb { background: rgba(0, 229, 255, 0.25); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 229, 255, 0.5); }

/* Progress Bar */
.progress-bar {
    position: fixed; top: 0; left: 0; height: 4px;
    background: var(--gradient-cyan-glow);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.6);
    width: 0%; transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 100;
}

/* Background Glow */
.bg-glow { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.glow-orb { position: absolute; width: 650px; height: 650px; border-radius: 50%; filter: blur(150px); opacity: 0.15; transition: all 1s ease; }
.glow-orb-1 { top: -200px; left: -150px; background: var(--cefet-blue); }
.glow-orb-2 { bottom: -220px; right: -150px; background: var(--cefet-cyan); }
.glow-orb-3 { top: 40%; left: 50%; transform: translate(-50%, -50%); width: 400px; height: 400px; background: var(--cefet-purple); opacity: 0.08; }

/* Top Navigation Bar */
.top-bar {
    position: fixed; top: 10px; left: 24px; right: 24px;
    display: flex; align-items: center; justify-content: space-between; z-index: 50;
}

.brand-badge {
    display: inline-flex; align-items: center; gap: 10px;
    background: rgba(15, 23, 42, 0.85); border: 1px solid var(--border-color);
    padding: 5px 14px; border-radius: 100px;
    font-size: 0.76rem; font-weight: 700; color: var(--text-primary);
    backdrop-filter: blur(12px); box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.brand-badge .cefet-tag {
    background: var(--gradient-cefet);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800; letter-spacing: 0.05em;
}

.top-controls { display: flex; align-items: center; gap: 10px; }

.control-btn {
    background: rgba(15, 23, 42, 0.85); border: 1px solid var(--border-color);
    color: var(--text-secondary); padding: 6px 14px; border-radius: 10px;
    font-size: 0.76rem; font-family: inherit; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
    transition: all 0.25 ease; backdrop-filter: blur(10px); text-decoration: none;
}
.control-btn:hover { color: #fff; background: rgba(30, 41, 59, 0.9); border-color: var(--cefet-cyan); transform: translateY(-1px); }
.control-btn.active { background: var(--cefet-blue); color: #fff; border-color: transparent; box-shadow: 0 0 15px rgba(37, 99, 235, 0.4); }

/* Slide Container Stage */
.presentation-stage {
    position: relative; z-index: 10; width: 100vw; height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 50px 24px 52px;
}

.slide {
    display: none; width: 100%; max-width: 1340px; height: 100%; max-height: calc(100vh - 102px);
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 22px; backdrop-filter: blur(24px);
    padding: 24px 38px; flex-direction: column; justify-content: space-between;
    position: relative; animation: slideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow-y: auto;
}
.slide.active { display: flex; }

@keyframes slideIn {
    from { opacity: 0; transform: scale(0.97) translateY(14px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Header & Typography */
.slide-header { margin-bottom: 12px; flex-shrink: 0; }
.slide-step {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--cefet-cyan); margin-bottom: 6px;
    background: rgba(0, 229, 255, 0.08); padding: 4px 12px; border-radius: 100px;
    border: 1px solid rgba(0, 229, 255, 0.25);
}
.slide-title {
    font-size: clamp(1.62rem, 2.65vw, 2.15rem); font-weight: 800;
    line-height: 1.16; letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.slide-subtitle { font-size: 1.02rem; color: var(--text-secondary); margin-top: 5px; line-height: 1.42; }

.slide-body { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 14px; }

/* Layout Grids */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-2-1 { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 18px; }

/* Content Cards & Boxes */
.content-box {
    background: rgba(15, 23, 42, 0.62); border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 15px; padding: 16px 20px; transition: all 0.3s ease;
    display: flex; flex-direction: column; justify-content: space-between;
}
.content-box:hover { border-color: var(--border-glow); background: rgba(30, 41, 59, 0.72); transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0,0,0,0.3); }
.content-box h4 { font-size: 1.08rem; font-weight: 700; margin-bottom: 7px; display: flex; align-items: center; gap: 8px; color: #fff; }
.content-box p, .content-box ul, .content-box ol { font-size: 0.96rem; color: #cbd5e1; line-height: 1.56; }
.content-box ul { list-style: none; padding-left: 0; }
.content-box ul li { position: relative; padding-left: 20px; margin-bottom: 6px; }
.content-box ul li::before { content: '⚡'; position: absolute; left: 0; color: var(--cefet-cyan); font-size: 0.82rem; }

/* Specialized Accent Boxes */
.accent-box { background: rgba(37, 99, 235, 0.08); border-color: rgba(37, 99, 235, 0.28); }
.accent-box h4 { color: var(--cefet-cyan); }
.tip-box { background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.28); }
.tip-box h4 { color: var(--cefet-green); }
.warn-box { background: rgba(255, 184, 0, 0.08); border-color: rgba(255, 184, 0, 0.28); }
.warn-box h4 { color: var(--cefet-gold); }
.bad-box { background: rgba(255, 77, 77, 0.08); border-color: rgba(255, 77, 77, 0.28); }
.bad-box h4 { color: var(--cefet-red); }
.good-box { background: rgba(0, 229, 255, 0.08); border-color: rgba(0, 229, 255, 0.28); }
.good-box h4 { color: var(--cefet-cyan); }

.big-icon { font-size: 2.1rem; margin-bottom: 6px; text-align: center; }

/* Code Boxes with Expandable Action Header */
.code-preview-card {
    background: #050a17; border: 1px solid rgba(0, 229, 255, 0.22);
    border-radius: 14px; overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4); margin-top: 4px;
}

.code-card-header {
    background: rgba(15, 23, 42, 0.9); padding: 8px 14px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.code-card-title {
    font-family: 'JetBrains Mono', monospace; font-size: 0.84rem;
    font-weight: 600; color: var(--cefet-cyan); display: flex; align-items: center; gap: 6px;
}
.expand-demo-btn {
    background: rgba(0, 229, 255, 0.12); border: 1px solid rgba(0, 229, 255, 0.3);
    color: var(--cefet-cyan); font-size: 0.76rem; font-weight: 700;
    padding: 4px 11px; border-radius: 6px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px; transition: all 0.2s ease;
    font-family: inherit;
}
.expand-demo-btn:hover { background: var(--cefet-cyan); color: #050a17; box-shadow: 0 0 12px rgba(0, 229, 255, 0.5); }

.prompt-code {
    background: #050a17; padding: 12px 16px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.9rem;
    color: #e2e8f0; line-height: 1.56; white-space: pre-wrap; word-break: break-word;
    user-select: text;
}
.prompt-code .kw { color: #c678dd; font-weight: 600; }
.prompt-code .str { color: #98c379; }
.prompt-code .fn { color: #61afef; }
.prompt-code .cm { color: #5c6370; font-style: italic; }
.prompt-code .num { color: #d19a66; }
.prompt-code .op { color: #56b6c2; }
.prompt-code .var { color: #e06c75; }

/* Modal for Expanded Code View */
.code-modal-overlay {
    position: fixed; inset: 0; background: rgba(5, 10, 23, 0.88);
    backdrop-filter: blur(16px); z-index: 200; display: none;
    align-items: center; justify-content: center; padding: 24px;
    animation: fadeIn 0.25s ease;
}
.code-modal-overlay.active { display: flex; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.code-modal-content {
    background: #0b1329; border: 1px solid var(--border-glow);
    border-radius: 20px; width: 100%; max-width: 900px; max-height: 88vh;
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 229, 255, 0.25);
    animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.code-modal-header {
    background: rgba(15, 23, 42, 0.95); padding: 16px 24px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.code-modal-title { font-size: 1.1rem; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 10px; }
.code-modal-close {
    background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary); width: 32px; height: 32px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; transition: all 0.2s ease;
}
.code-modal-close:hover { background: var(--cefet-red); color: #fff; border-color: transparent; }

.code-modal-body {
    padding: 24px; overflow-y: auto; flex: 1;
    display: flex; flex-direction: column; gap: 20px;
}

.modal-section-title {
    font-size: 0.85rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--cefet-cyan); margin-bottom: 8px;
    display: flex; align-items: center; gap: 6px;
}

.terminal-sim {
    background: #020617; border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 12px; padding: 16px; font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem; color: #38bdf8; line-height: 1.6;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.8);
}
.terminal-sim .term-prompt { color: var(--cefet-green); font-weight: 700; }
.terminal-sim .term-output { color: #f1f5f9; margin-top: 6px; }

.code-modal-actions {
    padding: 14px 24px; background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex; align-items: center; justify-content: space-between;
}
.copy-code-btn {
    background: var(--gradient-cefet); border: none; color: #fff;
    padding: 8px 18px; border-radius: 8px; font-size: 0.82rem; font-weight: 700;
    cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
    transition: all 0.2s ease; box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}
.copy-code-btn:hover { box-shadow: 0 6px 20px rgba(0, 229, 255, 0.5); transform: translateY(-1px); }

/* Speaker Notes Panel */
.speaker-notes-panel {
    position: fixed; bottom: 85px; left: 50%; transform: translateX(-50%);
    width: min(900px, 92vw); background: rgba(11, 19, 41, 0.96);
    border: 1px solid var(--border-glow); border-radius: 18px;
    padding: 20px 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
    z-index: 80; display: none; backdrop-filter: blur(18px); animation: popUp 0.3s ease;
}
.speaker-notes-panel.visible { display: block; }
@keyframes popUp { from { opacity: 0; transform: translate(-50%, 15px); } to { opacity: 1; transform: translate(-50%, 0); } }
.notes-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--cefet-cyan); }
.notes-content { font-size: 0.92rem; line-height: 1.65; color: #e2e8f0; }
.notes-content strong { color: var(--cefet-gold); }

/* Bottom Nav Controls */
.bottom-nav { position: fixed; bottom: 10px; left: 24px; right: 24px; display: flex; align-items: center; justify-content: space-between; z-index: 50; }
.slide-counter { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: var(--text-secondary); font-weight: 700; background: rgba(15, 23, 42, 0.8); padding: 5px 12px; border-radius: 100px; border: 1px solid var(--border-color); }
.nav-buttons { display: flex; gap: 10px; }
.nav-btn {
    background: rgba(15, 23, 42, 0.85); border: 1px solid var(--border-color);
    color: var(--text-primary); padding: 7px 16px; border-radius: 10px;
    font-size: 0.82rem; font-weight: 700; cursor: pointer;
    transition: all 0.2s ease; display: inline-flex; align-items: center; gap: 8px;
    backdrop-filter: blur(10px);
}
.nav-btn:hover:not(:disabled) { background: rgba(30, 41, 59, 0.95); border-color: var(--cefet-cyan); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.nav-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.nav-btn.primary { background: var(--gradient-cefet); border-color: transparent; color: #fff; box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4); }
.nav-btn.primary:hover:not(:disabled) { box-shadow: 0 6px 25px rgba(0, 229, 255, 0.5); }

.key-hint { font-size: 0.68rem; padding: 2px 6px; border-radius: 4px; background: rgba(255,255,255,0.1); color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; margin-left: 4px; }

/* Responsive Adjustments */
@media (max-width: 820px) {
    .grid-2, .grid-3, .grid-4, .grid-2-1 { grid-template-columns: 1fr; }
    .slide { padding: 28px 20px; max-height: 85vh; }
    .presentation-stage { padding: 60px 12px 75px; }
    .slide-title { font-size: 1.5rem; }
    .top-bar, .bottom-nav { left: 12px; right: 12px; }
}

/* Media Carousel Styles */
.media-carousel-container {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.media-carousel-stage {
    position: relative;
    width: 100%;
    min-height: 0;
    background: rgba(5, 10, 23, 0.65);
    border: 1px solid rgba(0, 229, 255, 0.25);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.media-carousel-slide {
    display: none;
    width: 100%;
    padding: 10px 48px;
    animation: carouselFade 0.35s ease;
}
.media-carousel-slide.active {
    display: block;
}
@keyframes carouselFade {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid var(--border-glow);
    color: var(--cefet-cyan);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    z-index: 20;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
}
.carousel-nav-btn:hover {
    background: var(--cefet-cyan);
    color: #0b1329;
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.7);
    transform: translateY(-50%) scale(1.08);
}
.carousel-nav-btn.prev-btn { left: 10px; }
.carousel-nav-btn.next-btn { right: 10px; }

.carousel-indicators {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}
.carousel-indicator-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--text-secondary);
    padding: 7px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.carousel-indicator-btn:hover, .carousel-indicator-btn.active {
    background: var(--gradient-cefet);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 0 14px rgba(0, 229, 255, 0.45);
}

/* Complete Prompt Box Styles for Carousel */
.prompt-box-text {
    font-size: 0.72rem;
    line-height: 1.35;
    padding: 6px 8px;
    border-radius: 8px;
    margin-top: 4px;
    margin-bottom: 6px;
    text-align: left;
    font-family: 'Inter', sans-serif;
    word-break: break-word;
}
.prompt-box-text.bad {
    background: rgba(255, 77, 77, 0.12);
    border: 1px solid rgba(255, 77, 77, 0.3);
    color: #fca5a5;
}
.prompt-box-text.good {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

/* Media Expansion Modal Styles */
.media-card video, .media-card img {
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.media-card video:hover, .media-card img:hover {
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
}

.media-expand-btn {
    background: rgba(0, 229, 255, 0.12);
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: var(--cefet-cyan);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
    transition: all 0.2s ease;
    font-family: inherit;
}
.media-expand-btn:hover {
    background: var(--cefet-cyan);
    color: #0b1329;
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.5);
}

.media-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 10, 23, 0.94);
    backdrop-filter: blur(20px);
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.25s ease;
}
.media-modal-overlay.active {
    display: flex;
}

.media-modal-content {
    background: #0b1329;
    border: 1px solid var(--border-glow);
    border-radius: 20px;
    width: 100%;
    max-width: 1020px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 229, 255, 0.3);
    animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.media-modal-view-stage {
    flex: 1;
    background: #020617;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    max-height: 64vh;
    overflow: hidden;
}
.media-modal-view-stage img, .media-modal-view-stage video {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

/* Institutional Logos in Top Bar */
.top-bar-logos {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.top-bar-logo-img {
    height: 26px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid rgba(0, 229, 255, 0.3);
}
.top-bar-logo-img.fapemig-circle {
    border-radius: 50%;
    width: 28px;
    height: 28px;
}

/* Institutional Banner on Slide 1 Capa */
.capa-institution-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(0, 229, 255, 0.25);
    border-radius: 16px;
    padding: 12px 24px;
    margin-top: 14px;
}
.capa-inst-img {
    height: 52px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
.capa-inst-img.fapemig-circle {
    border-radius: 50%;
    width: 58px;
    height: 58px;
}

/* QR Code Interactive & Expandable Styles */
.qrcode-container {
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}
.qrcode-container:hover {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 10px 30px rgba(0, 229, 255, 0.6) !important;
}
.qrcode-container img {
    transition: transform 0.3s ease;
    cursor: pointer;
}
.qrcode-container:hover img {
    transform: scale(1.03);
}

/* Styled Link Buttons for Forms (T0, Cadastro, etc.) */
.form-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    margin-top: 10px;
    background: rgba(0, 229, 255, 0.1);
    border: 1.5px solid var(--cefet-cyan);
    border-radius: 12px;
    color: var(--cefet-cyan);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.15);
    word-break: break-word;
}
.form-link-btn:hover {
    background: var(--cefet-cyan);
    color: #0b1329;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
    transform: translateY(-2px);
}
.form-link-btn.gold-btn {
    background: rgba(255, 184, 0, 0.1);
    border-color: var(--cefet-gold);
    color: var(--cefet-gold);
    box-shadow: 0 4px 15px rgba(255, 184, 0, 0.15);
}
.form-link-btn.gold-btn:hover {
    background: var(--cefet-gold);
    color: #0b1329;
    box-shadow: 0 0 20px rgba(255, 184, 0, 0.5);
}

/* ──────────────────────────────────────────────
   Mobile & Tablet Responsiveness (@media max-width: 768px)
────────────────────────────────────────────── */
@media (max-width: 768px) {
    /* Stage & Canvas Fit */
    body {
        position: fixed;
        width: 100vw;
        height: 100vh;
        overflow: hidden;
    }

    .presentation-stage {
        padding: 54px 8px 66px !important;
        height: 100vh !important;
        width: 100vw !important;
    }
    
    .slide {
        border-radius: 16px !important;
        padding: 16px 14px !important;
        max-height: calc(100vh - 116px) !important;
        height: 100% !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        justify-content: flex-start !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .slide-header {
        margin-bottom: 10px !important;
        flex-shrink: 0 !important;
    }

    /* Top Navigation Bar */
    .top-bar {
        top: 6px !important;
        left: 8px !important;
        right: 8px !important;
        gap: 6px !important;
    }
    
    .brand-badge {
        padding: 4px 10px !important;
        font-size: 0.65rem !important;
        gap: 5px !important;
        max-width: 52vw;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .top-bar-logo-img {
        height: 20px !important;
        width: auto !important;
        object-fit: contain !important;
        flex-shrink: 0 !important;
    }
    .top-bar-logo-img.fapemig-circle {
        width: 22px !important;
        height: 22px !important;
    }

    .top-controls {
        gap: 4px !important;
        flex-shrink: 0 !important;
    }

    .control-btn {
        padding: 5px 8px !important;
        font-size: 0.66rem !important;
        border-radius: 8px !important;
        white-space: nowrap !important;
    }

    /* Typography & Badges */
    .slide-step, .step-badge, .live-label, .engage-label, .challenge-label {
        font-size: 0.72rem !important;
        padding: 4px 11px !important;
        margin-bottom: 6px !important;
    }

    .slide-title {
        font-size: clamp(1.3rem, 5.4vw, 1.62rem) !important;
        line-height: 1.24 !important;
        word-break: break-word !important;
    }

    .slide-subtitle {
        font-size: 0.9rem !important;
        margin-top: 4px !important;
        line-height: 1.42 !important;
    }

    .slide-body {
        gap: 12px !important;
        margin-top: 8px !important;
        justify-content: flex-start !important;
        flex: 0 0 auto !important;
        width: 100% !important;
    }

    /* Stack Grid Layouts Vertically on Mobile Screens */
    .grid-2, .grid-3, .grid-4, .grid-2-1,
    .pillar-grid, .mission-grid, .qr-dual-grid, .shortcut-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* Cards & Boxes */
    .content-box {
        padding: 14px 15px !important;
        border-radius: 13px !important;
    }

    .content-box h4 {
        font-size: 1.02rem !important;
    }

    .content-box p, .content-box ul, .content-box ol {
        font-size: 0.91rem !important;
        line-height: 1.52 !important;
    }

    .pillar-card {
        padding: 13px 14px !important;
        border-radius: 13px !important;
    }
    
    .pillar-icon {
        font-size: 1.85rem !important;
        margin-bottom: 6px !important;
    }

    .pillar-name {
        font-size: 0.98rem !important;
    }

    .prompt-code {
        font-size: 0.83rem !important;
        padding: 11px 13px !important;
        line-height: 1.5 !important;
    }

    /* QR Code Cards on Mobile */
    .qr-card {
        padding: 12px !important;
        border-radius: 14px !important;
    }

    .qr-img-wrap img, .qrcode-img {
        max-width: 115px !important;
        max-height: 115px !important;
    }

    /* Bottom Navigation Bar on Mobile */
    .bottom-nav {
        bottom: 6px !important;
        left: 8px !important;
        right: 8px !important;
        padding: 5px 12px !important;
        height: 48px !important;
        border-radius: 14px !important;
    }

    .slide-counter {
        font-size: 0.76rem !important;
    }

    .nav-btn {
        padding: 7px 12px !important;
        font-size: 0.76rem !important;
        border-radius: 8px !important;
    }
    .key-hint {
        display: none !important;
    }

    /* Modals Fit Mobile Screen */
    .code-modal-content, #missionModalCard {
        padding: 16px 16px !important;
        border-radius: 16px !important;
        max-width: 95vw !important;
        max-height: 90vh !important;
    }
    
    .media-modal-content {
        width: 95vw !important;
        padding: 12px !important;
    }

    .media-modal-view-stage img, .media-modal-view-stage video {
        max-height: 52vh !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   NOTEBOOK LM STYLE INTERACTIVE QUIZ & CLASSROOM HOMEWORK STYLES
═══════════════════════════════════════════════════════════════════════════ */

.nb-quiz-shell {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    background: rgba(8, 15, 32, 0.75);
    border: 1px solid rgba(0, 229, 255, 0.25);
    border-radius: 16px;
    padding: 12px 16px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
}

.nb-quiz-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.nb-quiz-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nb-quiz-pill {
    background: rgba(0, 229, 255, 0.12);
    border: 1px solid rgba(0, 229, 255, 0.35);
    color: var(--cefet-cyan);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 100px;
    letter-spacing: 0.06em;
}

.nb-quiz-topic {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.nb-quiz-stats {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nb-stat-badge {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
    font-size: 0.76rem;
    padding: 4px 12px;
    border-radius: 100px;
}

.nb-reset-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    font-size: 0.73rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}
.nb-reset-btn:hover {
    background: rgba(0, 229, 255, 0.15);
    color: #fff;
    border-color: var(--cefet-cyan);
}

.nb-quiz-dots-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.nb-quiz-dot {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(15, 23, 42, 0.8);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'JetBrains Mono', monospace;
}
.nb-quiz-dot:hover {
    border-color: var(--cefet-cyan);
    color: #fff;
}
.nb-quiz-dot.nb-dot-active {
    border-color: var(--cefet-cyan);
    background: rgba(0, 229, 255, 0.2);
    color: #fff;
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}
.nb-quiz-dot.nb-dot-correct {
    background: rgba(16, 185, 129, 0.22);
    border-color: #10b981;
    color: #6ee7b7;
}
.nb-quiz-dot.nb-dot-wrong {
    background: rgba(239, 68, 68, 0.22);
    border-color: #ef4444;
    color: #fca5a5;
}

.nb-quiz-question-card {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(59, 130, 246, 0.28);
    border-radius: 12px;
    padding: 12px 16px;
}

.nb-q-counter {
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cefet-cyan);
    margin-bottom: 3px;
}

.nb-q-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.42;
}

.nb-q-code {
    margin-top: 8px;
    background: #040814;
    border: 1px solid rgba(0, 229, 255, 0.22);
    border-radius: 8px;
    padding: 9px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.86rem;
    color: #a7f3d0;
    line-height: 1.48;
    overflow-x: auto;
    white-space: pre-wrap;
    user-select: text;
}

.nb-quiz-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.nb-quiz-option, .tr-hw-opt-btn {
    background: rgba(15, 23, 42, 0.78);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 11px 14px;
    text-align: left;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: inherit;
    width: 100%;
}

.nb-quiz-option:not(:disabled):hover, .tr-hw-opt-btn:not(:disabled):hover {
    background: rgba(30, 41, 59, 0.92);
    border-color: var(--cefet-cyan);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 229, 255, 0.14);
}

.nb-opt-main {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.nb-opt-letter {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(0, 229, 255, 0.12);
    border: 1px solid rgba(0, 229, 255, 0.35);
    color: var(--cefet-cyan);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.86rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nb-opt-text {
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.48;
    color: #f1f5f9;
}

/* NotebookLM Option States (Right / Wrong / Dimmed) */
.nb-quiz-option.nb-opt-correct, .tr-hw-opt-btn.tr-hw-opt-correct {
    background: rgba(16, 185, 129, 0.14) !important;
    border-color: #10b981 !important;
    box-shadow: 0 0 22px rgba(16, 185, 129, 0.22);
}
.nb-quiz-option.nb-opt-correct .nb-opt-letter, .tr-hw-opt-btn.tr-hw-opt-correct .nb-opt-letter {
    background: #10b981;
    border-color: #10b981;
    color: #051b11;
}

.nb-quiz-option.nb-opt-wrong, .tr-hw-opt-btn.tr-hw-opt-wrong {
    background: rgba(239, 68, 68, 0.14) !important;
    border-color: #ef4444 !important;
    box-shadow: 0 0 22px rgba(239, 68, 68, 0.2);
}
.nb-quiz-option.nb-opt-wrong .nb-opt-letter, .tr-hw-opt-btn.tr-hw-opt-wrong .nb-opt-letter {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.nb-quiz-option.nb-opt-dimmed {
    opacity: 0.55;
}

.tr-hw-opt-btn.tr-hw-opt-selected {
    background: rgba(37, 99, 235, 0.22);
    border-color: var(--cefet-cyan);
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.25);
}
.tr-hw-opt-btn.tr-hw-opt-selected .nb-opt-letter {
    background: var(--cefet-cyan);
    color: #0b1329;
}

.nb-feedback-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 100px;
    width: fit-content;
}
.nb-pill-correct {
    background: rgba(16, 185, 129, 0.22);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.45);
}
.nb-pill-wrong {
    background: rgba(239, 68, 68, 0.22);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.45);
}

.nb-opt-explanation {
    font-size: 0.74rem;
    line-height: 1.38;
    padding: 6px 9px;
    border-radius: 8px;
    margin-top: 2px;
}
.nb-exp-correct {
    background: rgba(6, 78, 59, 0.55);
    border-left: 3px solid #10b981;
    color: #d1fae5;
}
.nb-exp-wrong {
    background: rgba(127, 29, 29, 0.55);
    border-left: 3px solid #ef4444;
    color: #fee2e2;
}

.nb-quiz-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nb-footer-hint {
    font-size: 0.76rem;
    color: var(--text-secondary);
    text-align: center;
}

.nb-nav-btn {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: #fff;
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}
.nb-nav-btn:hover:not(:disabled) {
    border-color: var(--cefet-cyan);
    background: rgba(0, 229, 255, 0.15);
}
.nb-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.nb-nav-btn.nb-nav-primary {
    background: var(--gradient-cefet);
    border-color: transparent;
}

/* ─────────────────────────────────────────────────────────────
   ANTI-SPOILER HOMEWORK GATE SLIDE & HOMEWORK MODAL
───────────────────────────────────────────────────────────── */
.hw-gate-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(11, 19, 41, 0.95));
    border: 2px solid rgba(0, 229, 255, 0.4);
    border-radius: 24px;
    padding: 32px 28px;
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 229, 255, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.hw-gate-icon {
    font-size: 3.4rem;
    line-height: 1;
    filter: drop-shadow(0 0 16px rgba(0, 229, 255, 0.4));
}

.hw-gate-btn {
    background: var(--gradient-cefet);
    border: 1.5px solid var(--cefet-cyan);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    padding: 14px 28px;
    border-radius: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s ease;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
    font-family: inherit;
    text-decoration: none;
}
.hw-gate-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 229, 255, 0.55);
}

.tr-hw-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 9, 22, 0.92);
    backdrop-filter: blur(16px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    user-select: text;
}
.tr-hw-modal-overlay.active {
    display: flex;
}

.tr-hw-modal-card {
    background: #0b1329;
    border: 1.5px solid rgba(0, 229, 255, 0.4);
    border-radius: 22px;
    width: 100%;
    max-width: 920px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.85), 0 0 40px rgba(0, 229, 255, 0.2);
}

.tr-hw-modal-top {
    padding: 18px 24px;
    background: rgba(15, 23, 42, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.tr-hw-modal-top h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin-top: 4px;
}
.tr-hw-modal-top p {
    font-size: 0.84rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.tr-modal-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.tr-modal-close-btn:hover {
    background: #ef4444;
    border-color: transparent;
}

.tr-hw-modal-body {
    padding: 22px 24px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.tr-hw-modal-footer {
    padding: 14px 24px;
    background: rgba(15, 23, 42, 0.96);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.tr-badge-cyan {
    display: inline-block;
    background: rgba(0, 229, 255, 0.12);
    border: 1px solid rgba(0, 229, 255, 0.35);
    color: var(--cefet-cyan);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 100px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tr-hw-auth-card {
    background: rgba(37, 99, 235, 0.1);
    border: 1.5px solid rgba(0, 229, 255, 0.35);
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.tr-hw-auth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.tr-hw-auth-header h4 {
    font-size: 1rem;
    color: #fff;
    margin-top: 4px;
}
.tr-hw-auth-header p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.tr-auth-tabs {
    display: flex;
    gap: 8px;
}
.tr-auth-tab {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}
.tr-auth-tab.active {
    background: var(--cefet-cyan);
    color: #0b1329;
    border-color: transparent;
}

.tr-auth-form-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr auto;
    gap: 10px;
}

.tr-input {
    background: rgba(5, 10, 23, 0.85);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 10px;
    padding: 10px 14px;
    color: #fff;
    font-size: 0.88rem;
    font-family: inherit;
    width: 100%;
}
.tr-input:focus, .tr-code-textarea:focus {
    outline: none;
    border-color: var(--cefet-cyan);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
}

.tr-btn-primary {
    background: var(--gradient-cefet);
    border: 1px solid rgba(0, 229, 255, 0.4);
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.tr-btn-primary:hover {
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.5);
    transform: translateY(-1px);
}

.tr-btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #cbd5e1;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}
.tr-btn-ghost:hover {
    border-color: var(--cefet-cyan);
    color: #fff;
}

.tr-auth-alert {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.83rem;
    font-weight: 600;
}

.tr-hw-user-bar {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 14px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.88rem;
}
.tr-user-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10b981;
    margin-right: 6px;
}
.tr-role-pill {
    background: rgba(0, 229, 255, 0.15);
    color: var(--cefet-cyan);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
    margin-left: 8px;
}
.tr-submitted-badge {
    background: rgba(16, 185, 129, 0.22);
    border: 1px solid #10b981;
    color: #6ee7b7;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 100px;
}
.tr-pending-badge {
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #fcd34d;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 100px;
}

.tr-hw-section-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-bottom: 1px solid rgba(0, 229, 255, 0.2);
    padding-bottom: 8px;
}
.tr-hw-section-title span {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--cefet-cyan);
    letter-spacing: 0.03em;
}
.tr-hw-section-title small {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.tr-hw-questions-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tr-hw-q-block {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tr-hw-q-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.tr-hw-q-num {
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--cefet-cyan);
    text-transform: uppercase;
}
.tr-hw-q-title {
    font-size: 0.96rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.45;
}
.tr-hw-opts-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tr-hw-practical-box {
    background: rgba(15, 23, 42, 0.8);
    border: 1.5px solid rgba(139, 92, 246, 0.4);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
}
.tr-hw-practical-box h4 {
    font-size: 1.02rem;
    color: #c4b5fd;
    margin-bottom: 6px;
}
.tr-prac-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}
.tr-prac-option-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 14px;
}
.tr-prac-badge {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--cefet-cyan);
    margin-bottom: 6px;
}
.tr-prac-option-card p {
    font-size: 0.8rem;
    color: #cbd5e1;
    line-height: 1.5;
}

.tr-hint-details {
    background: rgba(0, 229, 255, 0.06);
    border: 1px solid rgba(0, 229, 255, 0.25);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 0.82rem;
    color: var(--cefet-cyan);
    cursor: pointer;
}

.tr-field-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 6px;
    display: block;
}

.tr-code-textarea {
    background: #040814;
    border: 1.5px solid rgba(0, 229, 255, 0.35);
    border-radius: 12px;
    padding: 12px 14px;
    color: #a7f3d0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.84rem;
    line-height: 1.55;
    width: 100%;
    resize: vertical;
}

.tr-submit-success-box {
    background: rgba(16, 185, 129, 0.16);
    border: 1.5px solid #10b981;
    border-radius: 14px;
    padding: 16px 18px;
    color: #ecfdf5;
}
.tr-submit-success-box h4 {
    color: #6ee7b7;
    margin-bottom: 4px;
}

.tr-tutor-feedback-banner {
    background: rgba(245, 158, 11, 0.14);
    border: 1.5px solid #f59e0b;
    border-radius: 14px;
    padding: 12px 16px;
    color: #fef3c7;
    font-size: 0.86rem;
}

@media (max-width: 768px) {
    .nb-quiz-options-grid,
    .tr-hw-opts-list,
    .tr-prac-grid,
    .tr-auth-form-row {
        grid-template-columns: 1fr !important;
    }

    .nb-quiz-shell {
        padding: 12px 12px !important;
        gap: 10px !important;
        border-radius: 14px !important;
    }

    .nb-quiz-topbar {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }

    .nb-quiz-stats {
        width: 100% !important;
        justify-content: space-between !important;
    }

    .nb-quiz-dot {
        width: 25px !important;
        height: 25px !important;
        font-size: 0.7rem !important;
    }

    .nb-quiz-question-card {
        padding: 11px 12px !important;
    }

    .nb-q-title {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
    }

    .nb-q-code {
        font-size: 0.72rem !important;
        padding: 8px 10px !important;
    }

    .nb-quiz-option, .tr-hw-opt-btn {
        padding: 10px 12px !important;
        border-radius: 12px !important;
    }

    .nb-opt-text {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
        word-break: break-word !important;
    }

    .nb-quiz-footer {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .nb-footer-hint {
        order: -1 !important;
        width: 100% !important;
        font-size: 0.72rem !important;
    }

    .nb-nav-btn {
        flex: 1 !important;
        text-align: center !important;
        padding: 8px 10px !important;
        font-size: 0.74rem !important;
    }

    .hw-gate-card {
        padding: 18px 14px !important;
        border-radius: 16px !important;
        gap: 10px !important;
    }

    .hw-gate-icon {
        font-size: 2.4rem !important;
    }

    .hw-gate-btn {
        width: 100% !important;
        justify-content: center !important;
        font-size: 0.88rem !important;
        padding: 12px 16px !important;
    }

    .tr-hw-modal-overlay {
        padding: 8px !important;
    }

    .tr-hw-modal-card {
        max-height: 94vh !important;
        border-radius: 16px !important;
    }

    .tr-hw-modal-top {
        padding: 14px 16px !important;
    }

    .tr-hw-modal-top h2 {
        font-size: 1.05rem !important;
    }

    .tr-hw-modal-body {
        padding: 14px 14px !important;
        gap: 14px !important;
    }

    .tr-hw-modal-footer {
        padding: 12px 14px !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .tr-hw-modal-footer > div {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .tr-hw-modal-footer button {
        width: 100% !important;
        justify-content: center !important;
    }

    .stress-table {
        font-size: 0.72rem !important;
        display: block !important;
        overflow-x: auto !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAINEL LATERAL DO CHAT GEMINI IA INTEGRADO NOS SLIDES (SPLIT-VIEW AUTOMÁTICO)
   Permite usar a IA durante a aula com formatação automática do slide ao lado
═══════════════════════════════════════════════════════════════════════════ */

:root {
    --ai-sidebar-width: clamp(350px, 31vw, 430px);
}

/* Transições suaves para o palco de slides e barras quando a aba lateral abre/fecha */
.presentation-stage,
.top-bar,
.bottom-nav,
.speaker-notes-panel,
.slide {
    transition:
        width 0.32s cubic-bezier(0.16, 1, 0.3, 1),
        height 0.32s cubic-bezier(0.16, 1, 0.3, 1),
        max-height 0.32s cubic-bezier(0.16, 1, 0.3, 1),
        right 0.32s cubic-bezier(0.16, 1, 0.3, 1),
        bottom 0.32s cubic-bezier(0.16, 1, 0.3, 1),
        padding 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Botão do Chat IA na barra superior dos slides */
.control-btn.slide-ai-toggle-btn {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.28) 0%, rgba(0, 229, 255, 0.22) 100%);
    border: 1.5px solid rgba(0, 229, 255, 0.55);
    color: #f8fafc;
    font-weight: 800;
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.22);
    position: relative;
}
.control-btn.slide-ai-toggle-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #00adb5 100%);
    color: #ffffff;
    border-color: var(--cefet-cyan);
    box-shadow: 0 0 22px rgba(0, 229, 255, 0.5);
    transform: translateY(-1px);
}
.control-btn.slide-ai-toggle-btn.active {
    background: linear-gradient(135deg, #2563eb 0%, #00adb5 100%);
    color: #ffffff;
    border-color: var(--cefet-cyan);
    box-shadow: 0 0 22px rgba(0, 229, 255, 0.55);
}
.slide-ai-online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    display: inline-block;
    flex-shrink: 0;
}

/* Aba flutuante discreta na borda direita para puxar o Chat IA rapidamente */
.slide-ai-edge-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 90;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(11, 19, 41, 0.98) 100%);
    border: 1.5px solid rgba(0, 229, 255, 0.45);
    border-right: none;
    border-radius: 14px 0 0 14px;
    padding: 12px 9px;
    color: var(--cefet-cyan);
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    box-shadow: -6px 0 24px rgba(0, 0, 0, 0.65), 0 0 15px rgba(0, 229, 255, 0.15);
    backdrop-filter: blur(14px);
    transition: all 0.25s ease;
    font-family: inherit;
    user-select: none;
}
.slide-ai-edge-tab:hover {
    padding-right: 14px;
    background: linear-gradient(180deg, #1e3a8a 0%, #0f172a 100%);
    color: #ffffff;
    border-color: var(--cefet-cyan);
    box-shadow: -8px 0 28px rgba(0, 229, 255, 0.38);
}
.slide-ai-edge-tab span.edge-vertical-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 0.08em;
    font-size: 0.68rem;
    text-transform: uppercase;
}
body.ai-chat-open .slide-ai-edge-tab {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(100%);
}

/* Container da Aba Lateral do Chat IA */
.slide-ai-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--ai-sidebar-width);
    height: 100vh;
    background: #0B0E14;
    border-left: 1.5px solid rgba(56, 189, 248, 0.35);
    box-shadow: -18px 0 50px rgba(0, 0, 0, 0.78), 0 0 30px rgba(0, 229, 255, 0.12);
    z-index: 120;
    display: flex;
    flex-direction: column;
    transform: translateX(102%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), width 0.32s cubic-bezier(0.16, 1, 0.3, 1), height 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: text;
    color-scheme: dark;
}
body.ai-chat-open .slide-ai-sidebar {
    transform: translateX(0);
}

/* Modo Expandido opcional do painel lateral */
body.ai-chat-open.ai-chat-wide {
    --ai-sidebar-width: clamp(440px, 42vw, 600px);
}

/* Cabeçalho da Aba Lateral do Chat */
.slide-ai-header {
    padding: 12px 14px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(11, 14, 20, 0.98) 100%);
    border-bottom: 1px solid rgba(56, 189, 248, 0.22);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-shrink: 0;
}
.slide-ai-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}
.slide-ai-brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.slide-ai-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.slide-ai-brand-text h4 {
    font-size: 0.88rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.slide-ai-brand-text span {
    font-size: 0.69rem;
    color: #10b981;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.slide-ai-header-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.slide-ai-icon-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    height: 29px;
    padding: 0 9px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.18s ease;
    font-family: inherit;
}
.slide-ai-icon-btn:hover {
    background: rgba(56, 189, 248, 0.18);
    border-color: #38bdf8;
    color: #ffffff;
}
.slide-ai-icon-btn.danger:hover {
    background: rgba(239, 68, 68, 0.22);
    border-color: #ef4444;
    color: #fca5a5;
}
.slide-ai-icon-btn.close-btn {
    width: 29px;
    padding: 0;
    font-size: 0.88rem;
}
.slide-ai-icon-btn.close-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
}

/* Barra de Atalhos Rápidos + Explicar Slide Atual */
.slide-ai-quickbar {
    padding: 9px 12px;
    background: rgba(15, 23, 42, 0.65);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    flex-shrink: 0;
}
.slide-ai-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    padding: 5px 9px;
    border-radius: 8px;
    font-size: 0.71rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.slide-ai-chip:hover {
    border-color: var(--cefet-cyan);
    color: #ffffff;
    background: rgba(0, 229, 255, 0.12);
}
.slide-ai-chip.explain-slide-chip {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.28) 0%, rgba(139, 92, 246, 0.28) 100%);
    border-color: rgba(56, 189, 248, 0.55);
    color: #38bdf8;
    width: 100%;
    justify-content: center;
    padding: 6px 10px;
    font-size: 0.75rem;
    margin-bottom: 2px;
}
.slide-ai-chip.explain-slide-chip:hover {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: #ffffff;
    border-color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

/* Área de Mensagens do Chat dentro do Slide */
.slide-ai-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #0B0E14;
}

.slide-ai-sidebar .st-chat-msg-user {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 9px 12px;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: #F8FAFC !important;
    font-size: 0.84rem;
    line-height: 1.5;
    word-break: break-word;
}

.slide-ai-sidebar .st-chat-msg-assistant {
    background-color: #111827 !important;
    border: 1.5px solid #312E81 !important;
    border-radius: 12px !important;
    padding: 11px 13px !important;
    color: #F3F4F6 !important;
    font-size: 0.84rem;
    line-height: 1.55;
    word-break: break-word;
}

.slide-ai-sidebar .st-replica-codeblock {
    background-color: #0D1117 !important;
    border: 1px solid #30363D !important;
    border-radius: 8px !important;
    margin: 8px 0;
    overflow: hidden;
}
.slide-ai-sidebar .st-replica-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid #30363D;
    font-size: 0.72rem;
    color: #94a3b8;
    font-family: 'JetBrains Mono', monospace;
}
.slide-ai-sidebar .st-copy-code-btn {
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.69rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}
.slide-ai-sidebar .st-copy-code-btn:hover {
    background: #38bdf8;
    color: #0b1329;
}
.slide-ai-sidebar .st-replica-codeblock pre {
    padding: 10px 12px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: #e2e8f0;
    line-height: 1.48;
    margin: 0;
}

/* Rodapé de Digitação do Chat na Aba Lateral */
.slide-ai-footer {
    padding: 10px 12px 12px;
    background: #0E131D;
    border-top: 1px solid rgba(56, 189, 248, 0.18);
    flex-shrink: 0;
}
.slide-ai-input-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #161B26 !important;
    border: 1.5px solid #2D3748 !important;
    border-radius: 22px !important;
    padding: 5px 8px 5px 14px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.slide-ai-input-pill:focus-within {
    border-color: #38BDF8 !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25) !important;
}
.slide-ai-input-pill textarea {
    flex: 1;
    background-color: transparent !important;
    color: #F8FAFC !important;
    -webkit-text-fill-color: #F8FAFC !important;
    caret-color: #38BDF8 !important;
    border: none !important;
    outline: none !important;
    resize: none !important;
    font-size: 0.85rem !important;
    font-family: inherit;
    line-height: 1.38;
    max-height: 95px;
    padding: 4px 0;
}
.slide-ai-input-pill textarea::placeholder {
    color: #94A3B8 !important;
    -webkit-text-fill-color: #94A3B8 !important;
    opacity: 1 !important;
}
.slide-ai-send-btn {
    width: 34px;
    height: 34px;
    border-radius: 50% !important;
    background-color: #2563EB !important;
    color: #FFFFFF !important;
    border: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 0.92rem;
    transition: all 0.2s ease;
}
.slide-ai-send-btn:hover:not(:disabled) {
    background-color: #1D4ED8 !important;
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.65) !important;
}
.slide-ai-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ─────────────────────────────────────────────────────────────────────────
   FORMATAÇÃO AUTOMÁTICA DO SLIDE QUANDO O CHAT IA ESTÁ ABERTO (DESKTOP)
───────────────────────────────────────────────────────────────────────── */
@media (min-width: 861px) {
    body.ai-chat-open .presentation-stage {
        width: calc(100vw - var(--ai-sidebar-width)) !important;
        padding: 48px 16px 50px !important;
    }

    body.ai-chat-open .top-bar {
        left: 16px !important;
        right: calc(var(--ai-sidebar-width) + 16px) !important;
    }

    body.ai-chat-open .bottom-nav {
        left: 16px !important;
        right: calc(var(--ai-sidebar-width) + 16px) !important;
    }

    body.ai-chat-open .speaker-notes-panel {
        left: calc((100vw - var(--ai-sidebar-width)) / 2) !important;
        width: min(760px, calc(100vw - var(--ai-sidebar-width) - 36px)) !important;
    }

    body.ai-chat-open .slide {
        padding: 20px 24px !important;
    }

    body.ai-chat-open .slide-title {
        font-size: clamp(1.35rem, 2.1vw, 1.85rem) !important;
    }

    body.ai-chat-open .slide-subtitle {
        font-size: 0.92rem !important;
    }

    body.ai-chat-open .content-box {
        padding: 13px 16px !important;
    }

    body.ai-chat-open .content-box h4 {
        font-size: 0.98rem !important;
    }

    body.ai-chat-open .content-box p,
    body.ai-chat-open .content-box ul,
    body.ai-chat-open .content-box ol {
        font-size: 0.88rem !important;
    }

    body.ai-chat-open .prompt-code {
        font-size: 0.82rem !important;
        padding: 10px 13px !important;
    }
}

/* Em telas intermediárias (notebooks menores) com o Chat aberto, grades de 3 ou 4 colunas viram 2 colunas automaticamente para tudo caber sem espremer */
@media (min-width: 861px) and (max-width: 1340px) {
    body.ai-chat-open .grid-4,
    body.ai-chat-open .pillar-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    body.ai-chat-open .brand-badge {
        max-width: 44vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (min-width: 861px) and (max-width: 1120px) {
    body.ai-chat-open .grid-3,
    body.ai-chat-open .mission-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   FORMATAÇÃO AUTOMÁTICA DIVIDIDA (TOP/BOTTOM SPLIT) EM TELAS MENORES / MOBILE
   Mantém o slide visível na metade superior e o Chat IA na metade inferior!
───────────────────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
    .slide-ai-sidebar {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100vw !important;
        height: 46vh;
        border-left: none;
        border-top: 2px solid rgba(56, 189, 248, 0.5);
        border-radius: 18px 18px 0 0;
        transform: translateY(104%);
    }

    body.ai-chat-open .slide-ai-sidebar {
        transform: translateY(0);
    }

    body.ai-chat-open.ai-chat-wide .slide-ai-sidebar {
        height: 68vh;
    }

    body.ai-chat-open .presentation-stage {
        height: 54vh !important;
        padding: 46px 8px 46px !important;
    }

    body.ai-chat-open.ai-chat-wide .presentation-stage {
        height: 32vh !important;
    }

    body.ai-chat-open .slide {
        max-height: calc(54vh - 92px) !important;
        padding: 12px 12px !important;
    }

    body.ai-chat-open.ai-chat-wide .slide {
        max-height: calc(32vh - 86px) !important;
    }

    body.ai-chat-open .bottom-nav {
        bottom: calc(46vh + 6px) !important;
    }

    body.ai-chat-open.ai-chat-wide .bottom-nav {
        bottom: calc(68vh + 6px) !important;
    }
}








