/* Importando as fontes da marca */
@import url('https://fonts.googleapis.com/css2?family=Michroma&family=Montserrat:wght@300;400;600&display=swap');

:root {
    /* Paleta Macelan Company */
    --color-primary: #E650B4;   /* Magenta Vivo */
    --color-secondary: #4858D8; /* Azul Real */
    --color-dark: #0B2545;      /* Azul Navy */
    --color-bg: #F4F6F8;        /* Fundo Geral */
    --color-white: #FFFFFF;
    
    /* Fontes */
    --font-title: 'Michroma', sans-serif;
    --font-body: 'Montserrat', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* CORREÇÃO CRÍTICA: O body agora permite rolagem e não centraliza forçado */
body {
    background-color: var(--color-bg);
    font-family: var(--font-body);
    color: var(--color-dark);
    display: block; /* Mudado de flex para block */
    height: auto;   /* Mudado de 100vh para auto */
    min-height: 100vh;
    padding-bottom: 50px;
}

/* --- ESTILOS DE LOGIN (Mantidos, mas isolados) --- */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-container {
    background-color: var(--color-white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(11, 37, 69, 0.08);
    width: 100%;
    max-width: 400px;
    text-align: center;
    margin: 0 auto; /* Centraliza se estiver solto */
}

/* Tipografia Básica */
h1 { font-family: var(--font-title); font-size: 1.5rem; margin-bottom: 0.5rem; color: var(--color-dark); text-transform: uppercase; }
p.subtitle { font-size: 0.9rem; color: #666; margin-bottom: 2rem; }
.input-group { margin-bottom: 1.2rem; text-align: left; }
label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.5rem; }
input { width: 100%; padding: 12px; border: 2px solid #EEE; border-radius: 8px; font-family: var(--font-body); }
input:focus { border-color: var(--color-secondary); outline: none; }
.error-message { color: #ff3333; font-size: 0.85rem; margin-top: 1rem; display: none; }

button.btn-primary {
    width: 100%; padding: 14px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    color: white; border: none; border-radius: 8px;
    font-family: var(--font-title); font-size: 0.9rem; cursor: pointer;
    transition: transform 0.2s;
}
button.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(230, 80, 180, 0.3); }

/* --- DASHBOARD & PLAYER (AREA VIP) --- */

/* Navbar Fixa */
.dashboard-nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 5%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed; width: 100%; top: 0; z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
}
.nav-brand { font-family: var(--font-title); font-size: 1.2rem; font-weight: bold; color: var(--color-dark); letter-spacing: 1px; }

/* Avatar e User */
.user-profile-area { display: flex; align-items: center; gap: 15px; }
.profile-avatar {
    width: 40px; height: 40px;
    background-color: var(--color-dark); color: white;
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-weight: bold; font-size: 1rem; cursor: pointer;
    border: 2px solid var(--color-primary); transition: transform 0.2s;
}
.profile-avatar:hover { transform: scale(1.1); }

/* HERO BANNER (Destaque) */
.hero-billboard {
    height: 75vh; /* Bem alto para impacto */
    width: 100%;
    background-size: cover; background-position: center;
    position: relative; display: flex; align-items: flex-end;
    margin-bottom: 60px; /* Espaço para respirar em baixo */
}
.hero-gradient {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, var(--color-bg) 5%, rgba(11, 37, 69, 0.8) 60%, rgba(11, 37, 69, 0.4) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 0 5% 80px 5%; max-width: 900px; color: white; }
.hero-tag { background: var(--color-primary); color: white; padding: 6px 12px; font-size: 0.75rem; font-weight: bold; border-radius: 4px; text-transform: uppercase; margin-bottom: 20px; display: inline-block; }
.hero-title { font-family: var(--font-title); font-size: 3.5rem; margin-bottom: 15px; line-height: 1.1; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.hero-desc { font-size: 1.1rem; margin-bottom: 30px; line-height: 1.6; max-width: 600px; opacity: 0.9; }
.hero-actions { display: flex; gap: 15px; }
.btn-hero { padding: 14px 35px; border-radius: 6px; font-weight: bold; text-decoration: none; display: flex; align-items: center; gap: 10px; transition: 0.3s; font-size: 1rem; }
.btn-play { background: white; color: var(--color-dark); }
.btn-play:hover { background: #eee; transform: scale(1.05); }

/* SEÇÕES E GRIDS */
.courses-section { padding: 0 5% 60px 5%; }
.section-title { font-family: var(--font-title); font-size: 1.4rem; margin-bottom: 2rem; color: var(--color-dark); border-left: 5px solid var(--color-primary); padding-left: 20px; display: flex; align-items: center; }

/* GRID RESPONSIVO */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Responsivo inteligente */
    gap: 30px; /* Espaço generoso entre cards */
}

/* CARD DE CURSO (HOVER EFFECT) */
.course-card {
    background: white; border-radius: 12px; overflow: hidden;
    position: relative; cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Animação elástica */
    border: 1px solid rgba(0,0,0,0.05);
}

.course-card:hover {
    transform: translateY(-10px) scale(1.02); /* Sobe e cresce */
    box-shadow: 0 20px 40px rgba(11, 37, 69, 0.2);
    z-index: 10;
}

.course-thumb {
    width: 100%; height: 180px;
    background-color: #eee; background-size: cover; background-position: center;
    position: relative;
}

/* Degradê sobre a imagem do card */
.course-thumb::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.course-info { padding: 1.5rem; position: relative; }
.course-info h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--color-dark); font-weight: 700; }

/* Status Badges */
.status-badge {
    display: inline-block; padding: 5px 12px; border-radius: 20px;
    font-size: 0.7rem; font-weight: bold; margin-top: 10px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.status-unlocked { background: #d4fcd4; color: #006400; }
.status-locked { background: #eee; color: #555; }

/* Bloqueado Style */
.course-card.locked .course-thumb { filter: grayscale(100%); opacity: 0.9; }
.course-card.locked:hover .course-thumb { filter: grayscale(0%); opacity: 1; /* Ganha cor no hover */ }

/* --- PLAYER PAGE FIXES --- */
body.player-mode { background-color: #141414; color: #fff; display: block; overflow-x: hidden; }
.player-layout { display: grid; grid-template-columns: 1fr 350px; min-height: 100vh; }
.video-stage { background: #000; padding-bottom: 50px; }
.video-wrapper { position: relative; padding-bottom: 56.25%; background: black; }
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.lesson-content { padding: 30px 5%; max-width: 1200px; margin: 0 auto; }
.sidebar-playlist { background: #1f1f1f; border-left: 1px solid #333; height: 100vh; position: sticky; top: 0; overflow-y: auto; }
.module-title { background: #2a2a2a; padding: 15px 20px; font-weight: bold; border-bottom: 1px solid #333; }
.lesson-item { padding: 15px 20px; border-bottom: 1px solid #252525; cursor: pointer; color: #aaa; transition: 0.2s; display: block; }
.lesson-item:hover { background: #333; color: white; padding-left: 25px; }
.lesson-item.active { background: #333; color: var(--color-primary); border-left: 4px solid var(--color-primary); }

@media (max-width: 900px) {
    .player-layout { grid-template-columns: 1fr; }
    .sidebar-playlist { height: auto; position: relative; }
    .hero-title { font-size: 2rem; }
    .hero-billboard { height: 60vh; }
}