/* --- base.html --- */
body { background-color: #f4f7f6; font-family: 'Inter', sans-serif; margin: 0; padding: 0; font-size: 14.5px; line-height: 1.5; font-style: normal; color: #222; }
html { font-size: 14.5px; }
body, button, input, select, textarea { font-style: normal; }
#wrapper { display: flex; width: 100%; align-items: stretch; }

/* SIDEBAR - Inicia com 85px (escondida) */
#sidebar {
    min-width: 85px;
    max-width: 85px;
    background: #1a1d21;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1050;
}

/* Quando estiver ABERTA */
#sidebar.show-menu { min-width: 260px; max-width: 260px; }

.toggle-sidebar-btn {
    position: absolute; right: -12px; top: 30px; width: 24px; height: 24px;
    background: #fff; border: 1px solid #ddd; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,0.1); z-index: 1100;
}

.sidebar-header { height: 70px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid #2d3238; }
.sidebar-header h5 { color: #ffc107; font-size: 0.85rem; letter-spacing: 2px; font-weight: 800; margin: 0; display: none; }
#sidebar.show-menu .sidebar-header h5 { display: block; }

.nav-link-custom {
    padding: 12px 20px; margin: 4px 15px; border-radius: 10px;
    display: flex; align-items: center; color: #adb5bd; text-decoration: none; transition: 0.2s; white-space: nowrap;
    font-style: normal; font-size: 0.95rem;
}
.nav-link-custom:hover { background: rgba(255,255,255,0.05); color: #fff; }
.nav-link-custom.active { background: #ffc107; color: #1a1d21 !important; font-weight: 600; }
.nav-link-custom i { font-size: 1.1rem; min-width: 30px; }

/* Esconder textos por padrão */
.nav-link-custom span, .section-label, .user-info { display: none; }
#sidebar.show-menu .nav-link-custom span, 
#sidebar.show-menu .section-label, 
#sidebar.show-menu .user-info { display: block; }

/* Lógica do botão de sair quando encolhido */
.logout-collapsed { display: block; }
#sidebar.show-menu .logout-collapsed { display: none; }

.section-label { font-size: 0.65rem; text-transform: uppercase; color: #555; padding: 25px 25px 10px; font-weight: 800; }
#content { width: 100%; padding: 30px; transition: all 0.3s; }
.user-footer { position: absolute; bottom: 0; width: 100%; background: #111417; padding: 15px; border-top: 1px solid #2d3238; }

/* --- lista_cursos.html --- */
/* Efeito de elevação ao passar o mouse no card */
.card:hover {
    transform: translateY(-5px);
}

/* --- editar_perfil.html --- */
input, select, textarea {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}
input:focus { border-color: #ffc107; outline: 0; box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25); }


/* --- detalhe_curso.html --- */
.rounded-4 { border-radius: 1rem !important; }

/* REPRODUTOR ESTILO GRAN */
.video-container {
    position: relative;
    background: #000;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}
.video-container:fullscreen {
    overflow: visible !important;
    z-index: 9999 !important;
}
.video-container:fullscreen .custom-controls {
    position: fixed;
    bottom: 0;
}
.video-container video { width: 100%; height: 100%; object-fit: contain; }

.custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    padding: 10px 15px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
}
.video-container:hover .custom-controls { opacity: 1; }

.progress-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    border-radius: 5px;
}
.progress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #ffc107;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.ctrl-btn { background: none; border: none; color: white; cursor: pointer; font-size: 1.2rem; }
.ctrl-btn:hover { color: #ffc107; }

/* ESTILO ABAS */
.nav-tabs-custom { border-bottom: 2px solid #eee; }
.nav-tabs-custom .nav-link { border: none; color: #6c757d; font-weight: 600; padding: 12px; transition: 0.2s; }
.nav-tabs-custom .nav-link.active { color: #212529; border-bottom: 3px solid #ffc107; background: none; }

.lesson-item { border: none; padding: 10px 12px; margin-bottom: 6px; border-left: 4px solid transparent; transition: 0.2s; font-size: 13px; line-height: 1.5; font-style: normal; }
.lesson-item:last-child { margin-bottom: 0; }
.lesson-item.active-lesson { background: #f8f9fa; border-left-color: #ffc107; font-weight: 600; }

.card-body { padding: 0.9rem 1rem; }
.btn { font-size: 0.9rem; font-weight: 400; border-radius: 0.55rem; padding: 0.38rem 0.9rem; }
.btn.btn-lg, .btn-lg { font-size: 1rem; padding: 0.55rem 1rem; }

.plyr, .plyr__controls { font-size: 0.95rem; }
.plyr__controls { width: 100%; box-sizing: border-box; padding: 0.5rem 0.75rem; }
.plyr__control, .plyr__control svg, .plyr__time { font-size: 0.85rem; }
.plyr__controls button { min-width: 36px; min-height: 36px; padding: 0.35rem; }
.plyr__time { opacity: 0.9; font-size: 0.82rem; }
.plyr__progress { width: 100%; padding: 0; height: auto; }
.plyr__progress input[type='range'] { height: 4px; margin: 0; }
.plyr__progress__buffer, .plyr__progress__filled { height: 5px; border-radius: 4px; }
.plyr__progress__buffer { background: rgba(255,255,255,0.15); }
.plyr__progress__filled { background: #ffc107; }

/* --- TELA DE LOGIN (GLASSMORPHISM) --- */
.login-bg {
    background: linear-gradient(135deg, #0b132b 0%, #1c2541 50%, #3a506b 100%) !important;
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    color: #ffffff;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Modificadores pro footer se moldar ao login escuro */
.login-bg footer {
    background: transparent !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}
.login-bg footer .text-muted {
    color: rgba(255, 255, 255, 0.5) !important;
}

.glass-card {
    background: rgba(255, 255, 255, 0.08) !important; /* Leve luz branca */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 24px !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.3) !important;
}

.glass-input {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 2px solid transparent !important;
    border-radius: 12px !important;
    color: #212529 !important;
    font-weight: 500;
    transition: all 0.3s ease;
}
.glass-input:focus {
    background: #ffffff !important;
    border-color: #5bc0be !important;
    box-shadow: 0 0 15px rgba(91, 192, 190, 0.4) !important;
}
.glass-input::placeholder { color: #8a8a8a; font-weight: 400; }

.btn-glass-login {
    background: linear-gradient(135deg, #3a506b 0%, #5bc0be 100%);
    color: white !important;
    border: none;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(58, 80, 107, 0.4);
    transition: all 0.3s ease;
}
.btn-glass-login:hover {
    background: linear-gradient(135deg, #5bc0be 0%, #3a506b 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(91, 192, 190, 0.5);
}

.login-forgot-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.login-forgot-link:hover {
    color: #5bc0be !important;
    text-shadow: 0 0 8px rgba(91, 192, 190, 0.4);
}

#togglePassword:hover {
    color: #5bc0be !important;
    text-shadow: 0 0 8px rgba(91, 192, 190, 0.4);
}
