/* ========================================
   PLAYER.CSS - Estilos Únicos da Página Player
   ======================================== */

@font-face {
    font-family: 'Ethnocentric';
    src: url('../fonts/ethnocentric-rg.woff2') format('woff2'),
         url('../fonts/ethnocentric-rg.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #9ba1ff;
    --white: #fff;
    --black: #0f0f0f;
    --font-heading: 'Ethnocentric', 'Chakra Petch', sans-serif;
    
    /* Cores de texto e bordas */
    --color-text-gray: #888;
    --color-text-light-gray: #aaa;
    --color-text-dark-gray: #666;
    --color-border: #333;
    --bg-aside: #1a1a2e;
    --bg-header: #1a1a2e;
    --color-complete: #ff006e;
    
    /* Dimensões */
    --aside-width: 280px;
    --forum-width: 320px;
    --header-height: 70px;
    --header-height-mobile: 60px;
    --btn-perfil-size: 36px;
    --btn-collapse-width: 25px;
    --btn-collapse-height: 28px;
    
    /* Opacidades */
    --opacity-light: 0.3;
    --opacity-medium: 0.5;
    
    /* Gradientes */
    --gradient-header: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --gradient-main: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 100%);
    --gradient-progress: linear-gradient(90deg, var(--primary), #a78bfa);
    
    /* Opacidades e transparências */
    --primary-opacity-10: rgba(155, 161, 255, 0.1);
    --primary-opacity-30: rgba(155, 161, 255, 0.3);
    --primary-opacity-60: rgba(155, 161, 255, 0.6);
    --overlay-bg: rgba(0, 0, 0, 0.5);
    --complete-opacity-20: rgba(255, 0, 110, 0.2);
    
    /* Border radius */
    --radius-md: 4px;
    
    /* Borders */
    --border-width: 1px;
    --border-primary: var(--border-width) solid var(--primary);
    --border-primary-60: var(--border-width) solid var(--primary-opacity-60);
    --border-default: var(--border-width) solid var(--color-border);
    --border-complete: var(--border-width) solid var(--color-complete);
    
    /* Typography */
    --letter-spacing-normal: 1px;
    
    /* Z-index hierarchy */
    --z-base: 1;
    --z-decorator: 5;
    --z-nav: 10;
    --z-header: 11;
    --z-overlay: 100;
    --z-modal: 1000;
    
    /* Timings e transições */
    --transition-aside: margin-left 0.4s ease;
    --transition-aside-mobile: left 0.3s ease;
    --transition-progress: width 0.5s ease;
    --transition-hover: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    --transition-transform: transform 0.3s ease;
    --transition-opacity: opacity 0.4s ease;
    --transition-button: background-color 0.3s ease, transform 0.2s ease;
    --transition-shadow: box-shadow 0.3s ease;
    
    /* Efeitos */
    --blur-overlay: blur(4px);
}

/* === SCROLLBAR UTILITÁRIO === */

.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--primary-opacity-30);
    border-radius: var(--radius-md);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-opacity-60);
}

.custom-scrollbar-horizontal::-webkit-scrollbar {
    height: 6px;
}

.custom-scrollbar-horizontal::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar-horizontal::-webkit-scrollbar-thumb {
    background: var(--primary-opacity-30);
    border-radius: var(--radius-md);
}

.custom-scrollbar-horizontal::-webkit-scrollbar-thumb:hover {
    background: var(--primary-opacity-60);
}

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

html, body {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    position: fixed;
    width: 100%;
}

body.player-page {
    font-family: 'Chakra Petch', sans-serif;
    background-color: var(--black);
    color: var(--white);
    overflow: hidden;
    min-height: 100vh;
    min-height: 100dvh;
}

/* === SKIP TO CONTENT (Acessibilidade) === */

.skip-to-content {
    position: absolute;
    top: -40px;
    left: 10px;
    background: var(--primary);
    color: var(--black);
    padding: 8px 16px;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    z-index: 9999;
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 10px;
}

/* === CLASSES UTILITÁRIAS === */

.with-corner-detail {
  position: relative;
  max-width: 65%;
}

.with-corner-detail::before,
.with-corner-detail::after {
  content: '';
  position: absolute;
  width: 15px;
  height: 15px;
  opacity: var(--opacity-medium);
}

.with-corner-detail::before {
  left: -5px;
  top: 0;
  border-left: 1px solid var(--primary);
  border-top: 1px solid var(--primary);
}

.with-corner-detail::after {
  right: -5px;
  bottom: 0;
  border-right: 1px solid var(--primary);
  border-bottom: 1px solid var(--primary);
}

.aluno-nome {
    font-family: var(--font-heading);
}

/* === LAYOUT PRINCIPAL === */

.player-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    position: relative;
}

.player-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* === HEADER === */

.player-header {
    background: var(--gradient-header);
    padding: 5px 12px;
    display: flex;
    align-items: start;
    gap: 5px;
    flex-wrap: wrap;
    position: relative;
    flex-shrink: 0;
    /* iOS fix */
    z-index: var(--z-header);
}

.player-header::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 4" preserveAspectRatio="none"><path d="M0,0 L1000,0 Q1000,2 500,4 Q0,2 0,0 Z" fill="%239ba1ff"/></svg>') no-repeat center / 100% 100%;
    z-index: var(--z-decorator);
}
.player-header::before {
    content: '';
    position: absolute;
    display: block;
    height: 2px;
    width: 40%;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 4" preserveAspectRatio="none"><path d="M0,4 Q0,2 500,0 Q1000,2 1000,4 L0,4 Z" fill="%239ba1ff"/></svg>') no-repeat center / 100% 100%;
    box-shadow: -50px -3px 22px 1px var(--color-complete), 50px -3px 22px 1px var(--color-complete);
    z-index: var(--z-decorator);
}

.header-left {
    flex: 0 0 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    position: relative;
}

.btn-perfil {
    position: absolute;
    bottom: 0;
    right: 0;
    width: var(--btn-perfil-size);
    height: var(--btn-perfil-size);
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-transform);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.btn-perfil i {
    display: block;
    margin-top: 15px;
}

.btn-perfil:hover {
    transform: scale(1.15);
}

.btn-perfil:hover i {
    color: var(--white);
}

.aluno-nome {
    display: block;
    width: 100%;
    font-size: 0.6rem;
    line-height: 1.2rem;
    color: var(--primary);
    letter-spacing: var(--letter-spacing-normal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aluno-ranking {
    font-size: 0.6rem;
    color: var(--color-text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    margin-top: 5px;
}

.header-center {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    min-width: 0;
}

.curso-jornada-info {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: row;
    gap: 5px;
    max-width: 100%;
}

.curso-nome {
    font-size: 0.6rem;
    line-height: 0.7rem;
    letter-spacing: var(--letter-spacing-normal);
    text-transform: uppercase;
    color: var(--primary);
    border: var(--border-width) solid var(--primary-opacity-60);
    border-radius: var(--radius-md);
    padding: 5px;
    margin-left: -5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition-hover);
}

.curso-nome:hover {
    background: var(--primary);
    color: var(--bg-header);
    border-color: var(--primary);
}

.jornada-badge {
   color: var(--primary);
   font-size: 0.6rem;
   line-height: 0.7rem;
   letter-spacing: var(--letter-spacing-normal);
   text-transform: uppercase;
   white-space: nowrap;
   width: fit-content;
   border: var(--border-width) solid var(--primary-opacity-60);
   border-radius: var(--radius-md);
   padding: 4px 8px;
   margin-left: 0;
   overflow: hidden;
   text-overflow: ellipsis;
   text-decoration: none;
   display: inline-block;
   transition: var(--transition-hover);
}

.jornada-badge:hover {
   background: var(--primary);
   color: var(--bg-header);
   border-color: var(--primary);
}

.header-right {
    display: flex;
    gap: 5px;
    align-items: center;
}

.stat-item {
    display: none;
    border: var(--border-width) solid var(--primary-opacity-60);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.stat-item-icon {
    background: var(--primary-opacity-30);
    padding: 5px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-item img {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px;
    flex: 1;
    font-size: 0.75rem;
}

.stat-label {
    color: var(--color-text-gray);
    font-size: 0.7rem;
    line-height: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.stat-value {
    color: var(--primary);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1rem;
}

/* === ASIDE === */

.player-aside,
.player-forum {
    background: var(--bg-aside);
    border: var(--border-primary);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: fixed;
    top: var(--header-height-mobile);
    bottom: var(--header-height-mobile);
    z-index: var(--z-modal);
    backface-visibility: hidden;
}

.player-aside {
    width: var(--aside-width);
    border-left-width: 0;
    left: calc(-1 * var(--aside-width));
    transition: var(--transition-aside-mobile);
}

.player-aside.collapsed {
    margin-left: calc(-1 * var(--aside-width));
}

.player-aside::after,
.player-forum::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/graf-vert01.png') no-repeat bottom;
    background-size: cover;
    filter: grayscale(100%);
    opacity: var(--opacity-light);
    z-index: var(--z-base);
}

.player-aside::after {
    background-position: bottom left;
}

.aside-header,
.forum-header {
    position: relative;
    z-index: var(--z-header);
    padding: 5px 15px;
    border-bottom: var(--border-width) solid var(--color-border);
    display: flex;
    min-height: 45px;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    overflow: visible;
}

.aside-header h3,
.forum-header h3 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0;
    color: var(--primary);
}

/* === BOTÕES TOGGLE - CLASSES BASE === */

.btn-toggle-mobile {
    position: fixed;
    top: calc(var(--header-height-mobile) + 10px);
    width: 30px;
    height: 30px;
    background: var(--bg-aside);
    border: var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--primary);
    font-size: 1rem;
    cursor: pointer;
    z-index: var(--z-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-button);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-toggle-mobile:hover {
    background-color: var(--primary-opacity-10);
    transform: scale(1.05);
}

.btn-toggle-mobile:active {
    transform: scale(0.95);
}

.btn-toggle-collapse {
    background: var(--bg-aside);
    border: var(--border-default);
    border-radius: var(--radius-md);
    color: var(--color-text-light-gray);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-hover);
    width: var(--btn-collapse-width);
    height: var(--btn-collapse-height);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-toggle-collapse:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* === BOTÕES TOGGLE - VARIAÇÕES ESPECÍFICAS === */

.btn-toggle-aside-mobile {
    left: 10px;
    font-size: 1.25rem;
}

.btn-toggle-aside-collapse {
    margin-right: -10px;
}

.modulos-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    position: relative;
    z-index: var(--z-nav);
}

.aside-stats-mobile {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: var(--border-width) solid var(--color-border);
    background: rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: var(--z-nav);
    overflow-x: auto;
    overflow-y: hidden;
}

.aside-stats-mobile .stat-item {
    display: flex;
    border: var(--border-primary-60);
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    min-width: 80px;
}

.aside-stats-mobile .stat-content {
    padding: 6px 8px;
    gap: 0;
}

.aside-stats-mobile .stat-label {
    font-size: 0.7rem;
    line-height: 0.7rem;
}

.aside-stats-mobile .stat-value {
    font-size: 0.9rem;
    line-height: 0.9rem;
}

.aside-stats-mobile .stat-item-icon {
    padding: 4px;
}

.aside-stats-mobile .stat-item img {
    width: 20px;
    height: 20px;
}

.modulo-group {
    margin-bottom: 15px;
}

.modulo-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-text-gray);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.modulo-title i {
    color: var(--primary);
    font-size: 0.875rem;
}

.aulas-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aula-item {
    margin-bottom: 2px;
}

.aula-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--color-text-light-gray);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: var(--transition-hover);
    font-size: 0.8125rem;
}

.aula-link:hover {
    background-color: var(--primary-opacity-10);
    color: var(--white);
    border-left-color: var(--primary);
}

.aula-item.active .aula-link {
    background-color: var(--primary-opacity-10);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

.aula-icon {
    flex-shrink: 0;
    font-size: 1rem;
    color: var(--primary);
}

.aula-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.aula-duracao {
    font-size: 0.6875rem;
    color: var(--color-text-dark-gray);
}

.aula-check {
    flex-shrink: 0;
    color: var(--primary);
    font-size: 0.875rem;
}

.aside-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--overlay-bg);
    backdrop-filter: var(--blur-overlay);
    -webkit-backdrop-filter: var(--blur-overlay);
    z-index: calc(var(--z-modal) - 1);
    cursor: pointer;
}

/* === FORUM === */

.player-forum {
    width: var(--forum-width);
    border-right-width: 0;
    right: calc(-1 * var(--forum-width));
    transition: right 0.3s ease;
}

.player-forum.collapsed {
    right: calc(-1 * var(--forum-width));
}

.player-forum::after {
    background-position: bottom right;
}

.btn-toggle-forum-mobile {
    right: 10px;
}

.btn-toggle-forum-collapse {
    margin-left: -10px;
    padding: 5px;
}

.forum-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    position: relative;
    z-index: var(--z-nav);
}

.forum-post {
    background: rgba(255, 255, 255, 0.02);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 10px;
    transition: var(--transition-hover);
    cursor: pointer;
}

.forum-post:hover {
    background: var(--primary-opacity-10);
    border-color: var(--primary);
}

.forum-post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.forum-post-author {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
}

.forum-post-time {
    font-size: 0.625rem;
    color: var(--color-text-gray);
}

.forum-post-body {
    margin-bottom: 8px;
}

.forum-post-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 4px;
}

.forum-post-excerpt {
    font-size: 0.75rem;
    color: var(--color-text-light-gray);
    line-height: 1.4;
}

.forum-post-footer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.forum-post-replies {
    font-size: 0.6875rem;
    color: var(--color-text-gray);
    display: flex;
    align-items: center;
    gap: 4px;
}

.forum-post-replies i {
    color: var(--primary);
    font-size: 0.75rem;
}

/* === MAIN === */

.player-main {
    flex: 1;
    display: flex;
    position: relative;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    background: var(--gradient-main);
}

/* === PLACEHOLDERS (Loading e Error) === */

.loading-placeholder,
.error-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    gap: 20px;
    padding: 20px;
    text-align: center;
    background: var(--gradient-main);
    z-index: var(--z-decorator);
    opacity: 1;
    transition: var(--transition-opacity);
    pointer-events: all;
}

.loading-placeholder.fade-out,
.error-placeholder.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    padding: 10px;
    border-radius: 3px;
    background-color: #aabbff;
}

.loading-time {
    color: var(--primary);
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.8;
}

.error-icon {
    font-size: 3rem;
    color: var(--color-complete)
}

.error-title {
    color: #fff;
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
    text-transform: uppercase;
}

.error-message {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin: 0;
    max-width: 500px;
}

.btn-retry {
    background: var(--complete-opacity-20);
    color: var(--color-complete);
    border: var(--border-complete);
    padding: 8px 12px;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    border-radius: var(--radius-md);
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    margin-top: 10px;
}

.btn-retry:hover {
    background: var(--color-complete);
    color: var(--white);
}

.btn-retry:active {
    transform: scale(0.98);
}

#aulaFrame {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    opacity: 0;
    transition: var(--transition-opacity);
}

#aulaFrame.fade-in {
    opacity: 1;
}

/* === FOOTER === */

.player-footer {
    background: var(--gradient-header);
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    flex-direction: row;
    position: relative;
    flex-shrink: 0;
    /* iOS fix */
    z-index: var(--z-header);
}

.player-footer::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 4" preserveAspectRatio="none"><path d="M0,4 Q0,2 500,0 Q1000,2 1000,4 L0,4 Z" fill="%239ba1ff"/></svg>') no-repeat center / 100% 100%;
    z-index: var(--z-decorator);
}

.player-footer::after {
    content: '';
    position: absolute;
    display: block;
    height: 2px;
    width: 40%;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 4" preserveAspectRatio="none"><path d="M0,0 L1000,0 Q1000,2 500,4 Q0,2 0,0 Z" fill="%239ba1ff"/></svg>') no-repeat center / 100% 100%;
    box-shadow: -50px -3px 22px 1px var(--color-complete), 50px -3px 22px 1px var(--color-complete);
    z-index: var(--z-decorator);
}

.btn-home {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px 0 0;
    transition: var(--transition-transform);
    flex-shrink: 0;
}

.btn-home img {
    height: 30px;
    width: auto;
    display: block;
    transition: var(--transition-shadow);
}

.btn-home:hover {
    transform: scale(1.1);
}

.btn-home:hover img {
    box-shadow: 0 0 20px rgba(155, 161, 255, 0.6), 0 0 40px rgba(155, 161, 255, 0.4);
}

.footer-center {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.progresso-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.progresso-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: var(--border-width) solid var(--primary-opacity-30);
    min-width: 80px;
}

.progresso-fill {
    height: 100%;
    background: var(--gradient-progress);
    transition: var(--transition-progress);
    border-radius: var(--radius-md);
}

.progresso-text {
    font-size: 0.625rem;
    color: var(--primary);
    font-weight: 600;
    white-space: nowrap;
}

.progresso-text .percentual-texto {
    display: none;
}

.btn {
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
    font-weight: 600;
    border-radius: var(--radius-md);
}

.btn-nav,
.btn-mark-complete {
    padding: 8px 12px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex: 1;
    justify-content: center;
}

.btn-nav {
    background: transparent;
    color: var(--primary);
    border: var(--border-primary);
}

.btn-nav:hover {
    background: var(--primary);
    color: var(--bg-header);
}

.btn-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-nav:disabled:hover {
    background: transparent;
    color: var(--primary);
}

footer .btn-label {
    display: none;
    text-transform: uppercase;
    font-size: 0.6rem;
    line-height: 0.6rem;
    letter-spacing: var(--letter-spacing-normal);
}

.btn-mark-complete {
    background: var(--complete-opacity-20);
    color: var(--color-complete);
    border: var(--border-complete);
    max-width: 70px;
}

.btn-mark-complete:hover,
.btn-mark-complete.completed {
    background: var(--color-complete);
    color: var(--white);
}

.btn:focus-visible,
.aula-link:focus-visible,
.btn-perfil:focus-visible,
.btn-toggle-aside-mobile:focus-visible,
.btn-toggle-aside-collapse:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* === RESPONSIVE DESIGN - MOBILE FIRST === */

@media (min-width: 576px) {
    .aluno-nome {
        font-size: 0.75rem;
    }

    .curso-nome {
        font-size: 0.6875rem;
    }

    .progresso-bar {
        min-width: 100px;
    }
}

@media (min-width: 768px) {
    .player-header {
        padding: 12px 20px;
        min-height: var(--header-height);
        gap: 20px;
    }

    .with-corner-detail {
        max-width: none;
    }

    .with-corner-detail::before {
        left: -15px;
    }

    .with-corner-detail::after {
        right: -15px;
    }

    .aluno-nome {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        text-shadow: -1px 1px 1px var(--color-complete);
    }

    .aluno-ranking {
        margin-top: 0;
    }

    .header-left {
        flex: 0 0 auto;
        height: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .header-center {
        position: relative;
        flex: 1;
        margin: -10px 0 -10px 0;
        padding: 10px 0;
    }

    .header-center:after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: url('../img/graf-horiz04-verm.png') no-repeat right bottom;
        background-size: contain;
        opacity: 0.3;
    }

    .curso-jornada-info {
        flex-direction: column;
    }

    .player-footer {
        padding: 15px 20px;
        flex-direction: row;
        gap: 10px;
    }

    .footer-left,
    .footer-right {
        flex: 0 0 auto;
    }

    .footer-center {
        order: 0;
        width: auto;
        gap: 20px;
        min-width: 300px;
    }

    .progresso-container {
        gap: 12px;
    }

    .curso-nome {
        font-size: 1rem;
        line-height: 1rem;
    }

    .jornada-badge {
        font-size: 0.6rem;
        line-height: 0.6rem;
        padding: 5px;
    }

    .btn-nav {
        padding: 8px 16px;
        font-size: 0.8125rem;
        flex: 0 0 auto;
        justify-content: flex-start;
    }

    .btn-nav .btn-label {
        display: inline;
    }

    .btn-mark-complete {
        padding: 8px 14px;
        font-size: 0.8125rem;
        flex: 0 0 auto;
        justify-content: flex-start;
        max-width: 100%;
    }

    footer .btn-label {
        display: inline;
    }

    .progresso-bar {
        min-width: 150px;
    }

    .progresso-text {
        font-size: 0.75rem;
    }

    .progresso-text .percentual,
    .progresso-text .percentual-texto {
        display: inline;
    }
}

@media (min-width: 992px) {
    .header-left {
        flex: 0 0 260px;
    }

    .header-right {
        display: flex;
        margin-right: -10px;
    }

    .aside-stats-mobile {
        display: none;
    }

    .btn-toggle-aside-mobile {
        display: none;
    }

    .btn-toggle-forum-mobile {
        display: none;
    }

    .player-aside {
        position: relative;
        left: auto;
        top: auto;
        bottom: auto;
        z-index: auto;
        transition: var(--transition-aside);
        border-top: none;
        border-bottom: none;
        border-right: var(--border-width) solid var(--color-border);
    }

    .player-aside.collapsed {
        margin-left: calc(-1 * var(--aside-width));
    }

    .player-aside.collapsed .btn-toggle-aside-collapse {
        position: fixed;
        left: 10px;
        top: calc(var(--header-height) + 15px);
        z-index: var(--z-overlay);
        border-color: var(--primary);
    }

    .with-corner-detail {
        width: calc(100% - 50px);
    }

    .aluno-nome {
        font-size: 0.9rem;
        line-height: 1rem;
    }

    .curso-nome {
        font-size: 1.1rem;
        line-height: 0.9rem;
        margin: 0;
    }

    .player-forum {
        position: relative;
        right: auto;
        top: auto;
        bottom: auto;
        z-index: auto;
        transition: margin-right 0.4s ease;
        border-top: none;
        border-bottom: none;
        border-left: var(--border-width) solid var(--color-border);
    }

    .player-forum.collapsed {
        margin-right: calc(-1 * var(--forum-width));
    }

    .player-forum.collapsed .btn-toggle-forum-collapse {
        position: fixed;
        right: 20px;
        top: calc(var(--header-height) + 15px);
        width: auto;
        z-index: var(--z-overlay);
    }
}

@media (min-width: 1200px) {
    .stat-item {
        display: flex;
    }
}

/* ========================================
   CLASSES UTILITÁRIAS PARA CONTROLE JS
   ======================================== */

.loading-placeholder.visible {
    display: flex !important;
}

.loading-placeholder.hidden {
    display: none !important;
}

.error-placeholder.visible {
    display: flex !important;
}

.error-placeholder.hidden {
    display: none !important;
}

#aulaFrame.visible {
    display: block !important;
}

#aulaFrame.hidden {
    display: none !important;
}
