/* ============================================================
   academia.css — Estilos de la Academia Un Rezo Cósmico
   ============================================================ */

.academia-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}

/* ── Auth pages ──────────────────────────────────────────────── */
.academia-body { min-height: 100vh; display: flex; flex-direction: column; }

.academia-auth-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.academia-auth-card {
    background: var(--card-bg, rgba(26,0,53,0.85));
    border: 1px solid rgba(255,215,0,0.2);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    backdrop-filter: blur(20px);
}

.academia-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    text-decoration: none;
}

/* ── Curso cards ─────────────────────────────────────────────── */
.curso-card {
    background: var(--card-bg, rgba(26,0,53,0.7));
    border: 1px solid rgba(255,215,0,0.15);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.curso-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,215,0,0.4);
    box-shadow: 0 12px 40px rgba(107,0,153,0.3);
}

.curso-card-disponible { opacity: 0.85; }
.curso-card-disponible:hover { opacity: 1; }

.curso-thumbnail {
    position: relative;
    height: 160px;
    overflow: hidden;
    background: linear-gradient(135deg,#2d0055,#1a0035);
}

.curso-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.curso-card:hover .curso-thumbnail img { transform: scale(1.04); }

.curso-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.progreso-bar-wrap {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(0,0,0,0.4);
}

.progreso-bar {
    height: 100%;
    background: linear-gradient(90deg,#FFD700,#FFA500);
    transition: width .5s ease;
    min-width: 4px;
}

.curso-precio-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(10,0,21,0.85);
    border: 1px solid rgba(255,215,0,0.4);
    color: #FFD700;
    font-family: 'Cinzel', serif;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}

.curso-info {
    padding: 16px;
}

.curso-info h3 {
    font-family: 'Cinzel', serif;
    color: var(--gold, #FFD700);
    font-size: 0.95rem;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Lecciones ───────────────────────────────────────────────── */
.leccion-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
    transition: all .2s ease;
}

.leccion-item:hover {
    background: rgba(255,215,0,0.06);
    border-color: rgba(255,215,0,0.25);
    transform: translateX(4px);
}

.leccion-item.completada {
    background: rgba(92,184,92,0.05);
    border-color: rgba(92,184,92,0.2);
}

/* ── Chat ────────────────────────────────────────────────────── */
.chat-container {
    background: var(--card-bg, rgba(26,0,53,0.7));
    border: 1px solid rgba(255,215,0,0.15);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 500px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,215,0,0.2) transparent;
}

.chat-msg {
    max-width: 75%;
    align-self: flex-start;
}

.chat-msg-yo {
    align-self: flex-end;
}

.chat-msg-admin {
    align-self: flex-start;
}

.chat-msg-nombre {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 3px;
    display: flex;
    gap: 6px;
    align-items: center;
}

.chat-msg-admin .chat-msg-nombre { color: rgba(255,215,0,0.7); }
.chat-msg-yo .chat-msg-nombre { flex-direction: row-reverse; color: rgba(100,200,255,0.7); }

.chat-msg-hora { font-size: 0.65rem; opacity: 0.6; }

.chat-msg-texto {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px 12px 12px 2px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.5;
    word-break: break-word;
}

.chat-msg-yo .chat-msg-texto {
    background: rgba(107,0,153,0.3);
    border-color: rgba(200,150,255,0.2);
    border-radius: 12px 12px 2px 12px;
    color: #e8d5ff;
}

.chat-msg-admin .chat-msg-texto {
    background: rgba(255,215,0,0.08);
    border-color: rgba(255,215,0,0.2);
    color: #ffe9a0;
}

.chat-input-wrap {
    padding: 12px 16px;
    border-top: 1px solid rgba(255,215,0,0.1);
    background: rgba(0,0,0,0.2);
    flex-shrink: 0;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
    .academia-auth-card { padding: 24px 20px; }
    .academia-container { padding: 20px 14px 40px; }
    .chat-container { height: 400px; }
    .chat-msg { max-width: 90%; }
}

/* ── En Vivo badge ───────────────────────────────────────────── */
.badge-gold {
    background: rgba(255,215,0,0.15);
    border: 1px solid rgba(255,215,0,0.35);
    color: #FFD700;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 600;
}

/* ── Toast notifications ─────────────────────────────────────── */
.academia-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.88rem;
    z-index: 99999;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    animation: slideInToast .3s ease;
    max-width: 320px;
}
.academia-toast.success {
    background: rgba(92,184,92,0.2);
    border: 1px solid rgba(92,184,92,0.4);
    color: #90EE90;
}
.academia-toast.error {
    background: rgba(200,50,50,0.2);
    border: 1px solid rgba(200,50,50,0.4);
    color: #FFA0A0;
}
.academia-toast.info {
    background: rgba(255,215,0,0.1);
    border: 1px solid rgba(255,215,0,0.3);
    color: #FFD700;
}
@keyframes slideInToast {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
