/* ===== VARIÁVEIS GLOBAIS ===== */
:root {
    /* Cores principais */
    --primary-dark: #0A2472;
    --primary: #3A7CA5;
    --primary-light: #5B9ABF;
    --accent: #ca7aff;
    --accent-light: #ba82e0;    
    --accent-shadow: rgba(202, 122, 255, 0.4);
    
    /* Cores neutras */
    --dark: #1F2937;
    --gray: #6B7280;
    --light-gray: #E5E7EB;
    --lighter-gray: #F3F4F6;
    --white: #FFFFFF; 
    
    /* Cores de feedback */
    --success: #10B981;
    --success-bg: #D1FAE5;
    --error: #EF4444;
    --error-bg: #FEE2E2;
    --warning: #F59E0B;
    --warning-bg: #FEF3C7;
    --info: #3B82F6;
    --info-bg: #DBEAFE;
    
    /* Espaçamentos */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Tipografia */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-sm: 0.875rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    
    /* Bordas */
    --border-radius-sm: 0.25rem;
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-full: 9999px;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
/* header e footer */

footer
{
    background-color: #1F2937; 
    color: #9CA3AF; 
    text-align: center; 
    padding: 1rem; 
    font-size: 0.9rem;
}


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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    line-height: 1.5;
    color: var(--dark);
    /* background: linear-gradient(135deg, #f5f7fa 0%, #e9eef5 100%); */
    /* background: linear-gradient(135deg, #8e2de2, #4a00e0); */
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
        background: linear-gradient(180deg, 
        #ffffff, 
        #e8eeff, 
        #b5ccff, 
        #ca7aff, 
        #5f7ee0
    );
    background-size: 100% 200%;
    animation: gradientFlow 10s ease infinite alternate;

    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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


/* Para garantir que os cards e conteúdo ficam legíveis  */
.card, .form-container, .alert {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
} 



main {
    flex: 1;
}

/* ===== UTILITÁRIOS ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--spacing-md); }
.mt-2 { margin-top: var(--spacing-lg); }
.mt-3 { margin-top: var(--spacing-xl); }
.mb-1 { margin-bottom: var(--spacing-md); }
.mb-2 { margin-bottom: var(--spacing-lg); }
.mb-3 { margin-bottom: var(--spacing-xl); }

/* ===== LAYOUT ===== */
.flex {
    display: flex;
    gap: var(--spacing-md);
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header {
        padding: 0.8rem 1rem; /* Reduz o padding no mobile */
        padding-top: 0;
        padding-left: 0;
        padding-right: 0;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        box-sizing: border-box;
        z-index: 1000;
    }
    
    /* Ajustar o padding do main para compensar a altura do header no mobile */
    main {
        padding-top: 70px; /* Valor ligeiramente menor que no desktop */
    }
    
    /* Se houver algum elemento com margem a empurrar */
    body {
        overflow-x: hidden; /* Evita scroll horizontal */
    }
}

/* ===== PLAYLISTS SECTION ===== */
.playlists-section {
    margin: 2rem 0;
}

.playlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* ===== PLAYLIST CARD (reutilizado para playlists e vídeos) ===== */
.playlist-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.playlist-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.playlist-thumbnail {
    position: relative;
}

.playlist-thumbnail img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.playlist-thumbnail a {
    display: block;
}

.playlist-video-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.playlist-date {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.playlist-content {
    padding: 1rem;
}

.playlist-title {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    color: var(--primary-dark);
}

.playlist-title a {
    color: var(--primary-dark);
    text-decoration: none;
}

.playlist-title a:hover {
    text-decoration: underline;
}

.playlist-description {
    color: var(--gray);
    margin-bottom: 1rem;
    line-height: 1.4;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.playlist-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===== PLAYLIST HEADER ===== */
.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.playlist-title-large {
    color: var(--primary-dark);
    font-size: 2rem;
}

/* ===== PLAYLIST DESCRIPTION BOX ===== */
.playlist-description-box {
    background: var(--light-gray);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.playlist-description-box p {
    color: var(--gray);
    margin: 0;
}

/* ===== VÍDEOS GRID (reutiliza .playlists-grid) ===== */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* ===== PLACEHOLDERS PARA CURSOS ===== */
.placeholder-course {
    width: 100%;
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    font-size: 3rem;
}

.placeholder-course i {
    font-style: normal;
    margin-bottom: 0.5rem;
}

.placeholder-course span {
    font-size: 0.9rem;
    background: rgba(255,255,255,0.2);
    padding: 0.3rem 1rem;
    border-radius: 20px;
}

/* Variações de cores para diferentes cursos */
.placeholder-course.nodejs {
    background: linear-gradient(135deg, #3a7e4c, #2b5e3a);
}

.placeholder-course.react {
    background: linear-gradient(135deg, #61dafb, #2c7a9e);
}

.placeholder-course.docker {
    background: linear-gradient(135deg, #2496ed, #1a6ea8);
}

.placeholder-course.mysql {
    background: linear-gradient(135deg, #f29111, #c76e0b);
}

.placeholder-course.git {
    background: linear-gradient(135deg, #f05033, #b53e2a);
}

.placeholder-course.typescript {
    background: linear-gradient(135deg, #3178c6, #235a97);
}

/* ===== PÁGINA DE CURSOS ===== */
.cursos-container {
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.cursos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.cursos-header h1 {
    color: var(--primary-dark);
    font-size: 2rem;
    margin: 0;
}

.cursos-intro {
    background: var(--light-gray);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.cursos-intro p {
    color: var(--gray);
    margin: 0;
}

/* ===== DETALHE DO CURSO ===== */
.curso-detalhe {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.curso-conteudo-principal {
    width: 100%;
}

.curso-imagem {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.curso-descricao-box {
    background: var(--light-gray);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.curso-descricao-box h3 {
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.curso-descricao-box p {
    color: var(--gray);
    line-height: 1.6;
}

.curso-licoes-titulo {
    margin: 2rem 0 1rem;
    color: var(--primary-dark);
}

.curso-licoes-lista {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--light-gray);
}

.curso-licao-item {
    padding: 1rem;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.curso-licao-item:last-child {
    border-bottom: none;
}

.curso-licao-info {
    flex: 1;
}

.curso-licao-titulo {
    font-weight: bold;
    color: var(--dark);
    margin-right: 1rem;
}

.curso-licao-meta {
    color: var(--gray);
    font-size: 0.9rem;
    margin-left: 1rem;
}

.curso-licao-recompensa {
    background: var(--success-bg);
    color: var(--success);
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* ===== SIDEBAR DO CURSO ===== */
.curso-sidebar {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    height: fit-content;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.curso-sidebar h3 {
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.curso-info-item {
    margin-bottom: 1rem;
}

.curso-info-label {
    color: var(--gray);
    font-weight: bold;
    display: block;
    margin-bottom: 0.3rem;
}

.curso-info-valor {
    color: var(--dark);
}

.curso-nivel-badge {
    display: inline-block;
    padding: 0.2rem 1rem;
    border-radius: 12px;
    color: white;
    font-size: 0.9rem;
}

.curso-nivel-badge.iniciante {
    background: #10B981;
}

.curso-nivel-badge.intermediario {
    background: #F59E0B;
}

.curso-nivel-badge.avancado {
    background: #EF4444;
}

/* Fallback caso o nível não seja reconhecido */
.curso-nivel-badge:not(.iniciante):not(.intermediario):not(.avancado) {
    background: var(--primary);
}

.curso-preco {
    margin: 2rem 0;
    text-align: center;
}

.curso-preco-valor {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-dark);
}

.curso-preco-label {
    color: var(--gray);
    font-size: 0.9rem;
}

.curso-botao {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .curso-detalhe {
        grid-template-columns: 1fr;
    }
    
    .cursos-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .curso-licao-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .curso-licao-recompensa {
        align-self: flex-start;
    }
}

/* SkillBit Icon */
.skillbit-image {
    width: 40px;
    height: 40px;
    margin-left: 8px;
    vertical-align: middle;
}

.skillbit-amount {
    font-weight: bold;
    color: var(--primary-dark);
    margin-left: 4px;
}

@media (max-width: 768px) {
    .skillbit-image {
        width: 20px;
        height: 20px;
    }
}

/* Animações para o saldo */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.skillbit-balance {
    animation: pulse 2s infinite;
}

/* dashboard */
/* ===== DASHBOARD ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.dashboard-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.dashboard-card-skill {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.dashboard-card-skill img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.dashboard-card-content {
    padding: 1.5rem;
    text-align: center;
}

.dashboard-card-content h3 {
    margin: 0 0 0.5rem;
    color: var(--primary-dark);
}

.saldo-valor {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-dark);
    margin: 1rem 0;
}

/* Card de transações */
.dashboard-card-large {
    grid-column: span 2;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.transacoes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.transacoes-titulo {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin: 0;
}

.transacoes-lista {
    background: var(--light-gray);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--light-gray);
}

.transacao-item {
    padding: 1rem;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.transacao-item:last-child {
    border-bottom: none;
}

.transacao-info {
    flex: 1;
}

.transacao-descricao {
    font-weight: bold;
    color: var(--dark);
}

.transacao-meta {
    color: var(--gray);
    font-size: 0.9rem;
    margin-left: 1rem;
}

.transacao-valor-positivo {
    font-weight: bold;
    color: var(--success);
}

.transacao-valor-negativo {
    font-weight: bold;
    color: var(--error);
}

.transacao-ver-todas {
    text-align: center;
    margin-top: 1rem;
}

/* ===== PÁGINA DE HISTÓRICO ===== */
.saldo-resumo {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.saldo-resumo img {
    width: 200px;
    height: 200px;
}

.saldo-resumo h2 {
    color: #0A2472;
    margin: 0;
}

.saldo-resumo-valor {
    font-size: 3rem;
    font-weight: bold;
    color: #0A2472;
}

.transacoes-completas {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.transacao-item-detalhado {
    padding: 1rem;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.transacao-info-detalhada {
    flex: 1;
}

.transacao-titulo {
    font-weight: bold;
    color: var(--dark);
}

.transacao-tags {
    display: flex;
    gap: 1rem;
    margin-top: 0.3rem;
}

.transacao-tag {
    background: var(--light-gray);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--gray);
}

.transacao-data {
    color: var(--gray);
    font-size: 0.85rem;
}

.transacao-saldo-info {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 0.3rem;
}

.transacao-saldo-info strong {
    color: var(--dark);
}

.transacao-valor-detalhado {
    font-size: 1.2rem;
    font-weight: bold;
    min-width: 100px;
    text-align: right;
}

.sem-transacoes {
    text-align: center;
    color: var(--gray);
    padding: 3rem;
}

/* ===== SKILLBIT BADGE ===== */
.skillbit-badge {
    display: flex;
    align-items: center;
    gap: 8px;  /* Aumentei o gap para dar mais espaço */
}

.skillbit-badge img {
    width: 32px;  /* Aumentado para 32px */
    height: 32px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.skillbit-badge:hover img {
    transform: scale(1.1);  /* Efeito de zoom suave no hover */
}

.skillbit-amount {
    font-weight: bold;
    color: #0A2472;
    font-size: 1.2rem;  /* Aumentei ligeiramente para acompanhar */
}

/* ===== DASHBOARD LINK (container do badge) ===== */
.dashboard-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 0.5rem 1.2rem;  /* Aumentei o padding para acompanhar o ícone maior */
    border-radius: 30px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}




.skillbit-badge span {
    font-weight: bold;
    color: var(--primary-dark);
}

.skillbit-badge {
    display: flex;
    align-items: center;
    gap: 6px;
}

.skillbit-badge img {
    width: 28px;  /* Aumentado de 20px para 28px */
    height: 28px;
    object-fit: contain;
}

.skillbit-amount {
    font-weight: bold;
    color: #0A2472;
    font-size: 1.1rem;
}

/* ===== PROFILE LINK ===== */
.profile-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    transition: background-color 0.2s ease;
}

.profile-link:hover {
    background-color: rgba(0,0,0,0.05);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.profile-name {
    color: var(--dark);
    font-weight: 500;
    display: none;  /* Escondido em mobile, mostrado em desktop */
}

/* ===== RESPONSIVIDADE ===== */
@media (min-width: 769px) {
    .profile-name {
        display: inline-block;
    }
}

@media (max-width: 768px) {
     .skillbit-badge img {
        width: 28px;  /* Um pouco menor em mobile, mas ainda maior que antes */
        height: 28px;
    }
    
    .skillbit-amount {
        font-size: 1rem;
    }
    
    .dashboard-link {
        padding: 0.4rem 1rem;
    }
    
    .profile-avatar {
        width: 35px;
        height: 35px;
    }
    
    .btn-danger {
        padding: 0.3rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* ===== BARRA DE PROGRESSO ===== */
.progresso-container {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.progresso-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progresso-header h3 {
    margin: 0;
    color: var(--primary-dark);
}

.progresso-percentual {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--primary);
}

.progresso-bar {
    width: 100%;
    height: 20px;
    background: var(--light-gray);
    border-radius: 10px;
    overflow: hidden;
}

.progresso-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* ===== ÍCONES SKILLBITS ===== */
.skillbit-icon-small {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    vertical-align: middle;
}

/* ===== LIÇÕES CONCLUÍDAS ===== */
.curso-licao-item.clicavel:hover {
    background: var(--lighter-gray);
    cursor: pointer;
}

.licao-concluida {
    font-size: 1.2rem;
    margin-left: 8px;
}

.curso-licao-recompensa {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--success-bg);
    color: var(--success);
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    white-space: nowrap;
}