/* ========================================
   SEBENTA MODERNA - DESIGN PREMIUM
   ======================================== */

#sebenta-viewer {
    display: flex;
    flex-direction: column;
    height: 100%;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 1.5rem;
}

/* ========== HEADER ========== */
.sebenta-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: linear-gradient(145deg, rgba(26, 26, 26, 0.98), rgba(15, 15, 15, 0.95));
    border: 1px solid rgba(230, 126, 34, 0.2);
    border-radius: 12px;
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.sebenta-viewer-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--cor-primaria), var(--cor-secundaria));
    opacity: 0.8;
}

.sebenta-viewer-header h2 {
    font-family: var(--font-destaque);
    font-size: 2rem;
    font-weight: 700;
    color: var(--cor-primaria);
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--cor-primaria), var(--cor-secundaria));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 8px rgba(230, 126, 34, 0.3);
}

/* ========== NAVEGAÇÃO CAPÍTULOS ========== */
#sebenta-viewer-nav {
    display: flex;
    gap: 0.75rem;
    padding: 0 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(230, 126, 34, 0.5) transparent;
}

#sebenta-viewer-nav::-webkit-scrollbar {
    height: 6px;
}

#sebenta-viewer-nav::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

#sebenta-viewer-nav::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--cor-primaria), var(--cor-secundaria));
    border-radius: 3px;
}

#sebenta-viewer-nav::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, var(--cor-secundaria), var(--cor-primaria));
}

.sebenta-nav-item {
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.8), rgba(20, 20, 20, 0.8));
    border: 1px solid rgba(100, 100, 100, 0.2);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    white-space: nowrap;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.sebenta-nav-item:hover {
    background: linear-gradient(135deg, rgba(40, 40, 40, 0.9), rgba(30, 30, 30, 0.9));
    color: var(--cor-primaria);
    border-color: rgba(230, 126, 34, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sebenta-nav-item:active {
    transform: translateY(0) scale(0.98);
}

.sebenta-nav-item.active {
    background: linear-gradient(135deg, var(--cor-primaria), var(--cor-secundaria));
    color: #ffffff;
    border-color: var(--cor-secundaria);
    box-shadow: 
        0 4px 16px rgba(230, 126, 34, 0.5),
        0 0 30px rgba(230, 126, 34, 0.3);
    font-weight: 700;
    position: relative;
}

.sebenta-nav-item.active::before {
    content: '📖';
    margin-right: 0.5rem;
}

/* ========== CONTEÚDO ========== */
#sebenta-viewer-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2.25rem 2.5rem;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(18, 18, 18, 0.95));
    border: 1px solid rgba(100, 100, 100, 0.2);
    border-radius: 12px;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.9);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    scrollbar-width: thin;
    scrollbar-color: rgba(230, 126, 34, 0.5) transparent;

    /* 🔒 Proteção básica: impede seleção de texto e callout em mobile */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
}

#sebenta-viewer-content::-webkit-scrollbar {
    width: 8px;
}

#sebenta-viewer-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

#sebenta-viewer-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--cor-primaria), var(--cor-secundaria));
    border-radius: 4px;
}

#sebenta-viewer-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--cor-secundaria), var(--cor-primaria));
}

/* Títulos dentro do conteúdo */
#sebenta-viewer-content .subtitulo-seccao,
#sebenta-viewer-content h3 {
    font-family: var(--font-destaque);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--cor-primaria);
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(230, 126, 34, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#sebenta-viewer-content h4 {
    font-family: var(--font-destaque);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--cor-secundaria);
    margin: 2rem 0 1rem;
    padding-left: 1rem;
    border-left: 4px solid var(--cor-primaria);
    letter-spacing: 0.5px;
}

#sebenta-viewer-content h5 {
    font-size: 1.15rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 1.5rem 0 0.75rem;
}

/* Parágrafos */
#sebenta-viewer-content p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.9);
}

/* Listas */
#sebenta-viewer-content ul,
#sebenta-viewer-content ol {
    padding-left: 2rem;
    margin: 1.25rem 0;
}

#sebenta-viewer-content li {
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 0.5rem;
}

#sebenta-viewer-content ul li::before {
    content: '▸';
    position: absolute;
    left: -1rem;
    color: var(--cor-primaria);
    font-weight: bold;
}

#sebenta-viewer-content ol {
    counter-reset: list-counter;
}

#sebenta-viewer-content ol li {
    counter-increment: list-counter;
}

#sebenta-viewer-content ol li::before {
    content: counter(list-counter) ".";
    position: absolute;
    left: -1.5rem;
    color: var(--cor-primaria);
    font-weight: bold;
    font-family: var(--font-destaque);
}

/* Citações e destaque */
#sebenta-viewer-content blockquote {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.1), rgba(255, 87, 34, 0.1));
    border-left: 4px solid var(--cor-primaria);
    border-radius: 8px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
}

#sebenta-viewer-content strong,
#sebenta-viewer-content b {
    color: var(--cor-primaria);
    font-weight: 700;
}

#sebenta-viewer-content em,
#sebenta-viewer-content i {
    color: var(--cor-secundaria);
}

#sebenta-viewer-content code {
    background: rgba(0, 0, 0, 0.4);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: var(--font-principal);
    color: #ffd54f;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

#sebenta-viewer-content pre {
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid rgba(100, 100, 100, 0.3);
    margin: 1.5rem 0;
}

#sebenta-viewer-content pre code {
    background: none;
    border: none;
    padding: 0;
}

/* Imagens */
#sebenta-viewer-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);

    /* 🔒 Evita arrastar/guardar facilmente as imagens da sebenta */
    -webkit-user-drag: none;
    user-drag: none;
}

/* Tabelas */
#sebenta-viewer-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#sebenta-viewer-content th {
    background: linear-gradient(135deg, var(--cor-primaria), var(--cor-secundaria));
    color: #ffffff;
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#sebenta-viewer-content td {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-bottom: 1px solid rgba(100, 100, 100, 0.2);
}

#sebenta-viewer-content tr:last-child td {
    border-bottom: none;
}

/* ========== FOOTER NAVEGAÇÃO ========== */
.sebenta-viewer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(145deg, rgba(26, 26, 26, 0.98), rgba(15, 15, 15, 0.95));
    border: 1px solid rgba(100, 100, 100, 0.2);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sebenta-viewer-footer .action-button {
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    min-width: 140px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sebenta-viewer-footer .action-button:not(.secondary) {
    background: linear-gradient(135deg, var(--cor-primaria), var(--cor-secundaria));
    box-shadow: 0 4px 16px rgba(230, 126, 34, 0.4);
}

.sebenta-viewer-footer .action-button:not(.secondary):hover {
    box-shadow: 0 6px 24px rgba(230, 126, 34, 0.6);
    transform: translateY(-2px) scale(1.02);
}

.sebenta-viewer-footer .action-button.secondary {
    background: linear-gradient(135deg, rgba(80, 80, 80, 0.5), rgba(60, 60, 60, 0.5));
    border: 1px solid rgba(100, 100, 100, 0.3);
}

.sebenta-viewer-footer .action-button.secondary:hover {
    background: linear-gradient(135deg, rgba(100, 100, 100, 0.6), rgba(80, 80, 80, 0.6));
    border-color: rgba(230, 126, 34, 0.5);
}

.sebenta-viewer-footer .action-button:active {
    transform: translateY(0) scale(0.98);
}

.sebenta-viewer-footer .action-button.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.sebenta-progress-text {
    font-family: var(--font-destaque);
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50px;
    border: 1px solid rgba(100, 100, 100, 0.2);
}

/* ========== RESPONSIVIDADE MOBILE ========== */
@media (max-width: 768px) {
    .sebenta-viewer-header {
        padding: 1rem;
    }
    
    .sebenta-viewer-header h2 {
        font-size: 1.5rem;
    }
    
    #sebenta-viewer-nav {
        gap: 0.5rem;
        padding: 0 0.25rem;
    }
    
    .sebenta-nav-item {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    #sebenta-viewer-content {
        padding: 1.5rem;
        font-size: 1rem;
    }

    #sebenta-viewer-content .subtitulo-seccao,
    #sebenta-viewer-content h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    #sebenta-viewer-content h4 {
        font-size: 1.2rem;
        margin: 1.5rem 0 0.75rem;
    }
    
    .sebenta-viewer-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .sebenta-viewer-footer .action-button {
        width: 100%;
        min-width: unset;
    }
    
    .sebenta-progress-text {
        order: -1;
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .sebenta-viewer-header h2 {
        font-size: 1.25rem;
    }
    
    #sebenta-viewer-content {
        padding: 1.1rem;
        font-size: 0.95rem;
    }

    #sebenta-viewer-content h4 {
        font-size: 1.1rem;
        padding-left: 0.75rem;
        border-left-width: 3px;
    }
}

/* ========== SEQUÊNCIAS PRÁTICAS DESTACADAS ========== */
#sebenta-viewer-content p[style*="background: rgba(46, 204, 113"] {
    position: relative;
    padding-left: 3.5rem;
    border-left-width: 4px !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;

    /* Remove o fundo verde original e aplica um cartão mais neutro/laranja */
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.15), rgba(255, 255, 255, 0.02)) !important;
    border-left-color: var(--cor-primaria);
}

#sebenta-viewer-content p[style*="background: rgba(46, 204, 113"]:hover {
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.24), rgba(255, 255, 255, 0.05)) !important;
    transform: translateX(4px);
    box-shadow: 0 3px 12px rgba(230, 126, 34, 0.35);
}

/* ========== ÍCONES DE CAPÍTULOS ========== */
.sebenta-nav-item[data-chapter="1"]::before {content: '📖';}
.sebenta-nav-item[data-chapter="2"]::before {content: '💪';}
.sebenta-nav-item[data-chapter="3"]::before {content: '🥋';}
.sebenta-nav-item[data-chapter="4"]::before {content: '🗣️';}
.sebenta-nav-item[data-chapter="5"]::before {content: '❓';}
.sebenta-nav-item[data-chapter="6"]::before {content: '📝';}
.sebenta-nav-item[data-chapter="7"]::before {content: '🎓';}
.sebenta-nav-item[data-chapter="8"]::before {content: '⚔️';}
.sebenta-nav-item[data-chapter="9"]::before {content: '🤝';}
.sebenta-nav-item[data-chapter="10"]::before {content: '🛡️';}

.sebenta-nav-item[data-chapter]::before {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

/* ========== CARDS INFORMATIVOS ========== */
#sebenta-viewer-content .info-card {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(41, 128, 185, 0.05));
    border-left: 4px solid #3498db;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.2);
}

#sebenta-viewer-content .warning-card {
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.1), rgba(255, 87, 34, 0.05));
    border-left: 4px solid var(--cor-primaria);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 3px 10px rgba(230, 126, 34, 0.2);
}

#sebenta-viewer-content .success-card {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(39, 174, 96, 0.05));
    border-left: 4px solid #2ecc71;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 3px 10px rgba(46, 204, 113, 0.2);
}

/* ========== TABELA TERMINOLOGIA MELHORADA ========== */
#sebenta-viewer-content table {
    font-size: 0.95rem;
}

#sebenta-viewer-content table tr:hover td {
    background: rgba(230, 126, 34, 0.1);
}

#sebenta-viewer-content thead tr {
    background: linear-gradient(135deg, var(--cor-primaria), var(--cor-secundaria));
}

/* ========== BADGES E HIGHLIGHTS ========== */
.badge {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    margin: 0 0.25rem;
}

.badge.primary {
    background: linear-gradient(135deg, var(--cor-primaria), var(--cor-secundaria));
    color: #fff;
}

.badge.success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
}

.badge.warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #fff;
}

.badge.info {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
}

/* ========== ANIMAÇÕES ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* ========================================================================
   SEQUÊNCIAS PRÁTICAS - Destaque Visual com Vídeo (SEM ÍCONES)
   ======================================================================== */

.sequencia-pratica {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.15), rgba(39, 174, 96, 0.15));
    border: 1px solid rgba(46, 204, 113, 0.4);
    border-left: 4px solid var(--cor-energia);
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sequencia-pratica:hover {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.25), rgba(39, 174, 96, 0.25));
    border-color: rgba(46, 204, 113, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

/* Modal de vídeo da sebenta */
#sebenta-video-modal .modal-content {
    max-width: 900px;
    width: 95%;
}

#sebenta-video-modal iframe {
    width: 100%;
    height: 500px;
    border: none;
    border-radius: 8px;
    /* 🔒 PROTEÇÃO YOUTUBE: Bloqueia interações com elementos do player */
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

@media (max-width: 768px) {
    #sebenta-video-modal iframe {
        height: 300px;
    }
}
