/* ===== INICIO APP STYLES - PROFENINJA ===== */

/* Variables específicas para la app Inicio */
:root {
    --inicio-primary: #3b82f6;
    --inicio-secondary: #10b981;
    --inicio-accent: #f59e0b;
    --inicio-success: #10b981;
    --inicio-card-bg: rgba(255, 255, 255, 0.05);
    --inicio-card-border: rgba(255, 255, 255, 0.1);
    --inicio-text-primary: #ffffff;
    --inicio-text-secondary: rgba(255, 255, 255, 0.7);
    --inicio-shadow: rgba(0, 0, 0, 0.1);
    --inicio-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ajustes por tema - Compatible con theme-manager.js */
.theme-light {
    --inicio-card-bg: rgba(255, 255, 255, 0.9);
    --inicio-card-border: rgba(0, 0, 0, 0.1);
    --inicio-text-primary: #1f2937;
    --inicio-text-secondary: rgba(31, 41, 55, 0.7);
    --inicio-shadow: rgba(0, 0, 0, 0.1);
}

.theme-dark {
    --inicio-primary: #3b82f6;
    --inicio-secondary: #10b981;
    --inicio-accent: #f59e0b;
    --inicio-success: #10b981;
    --inicio-card-bg: rgba(255, 255, 255, 0.05);
    --inicio-card-border: rgba(255, 255, 255, 0.1);
    --inicio-text-primary: #ffffff;
    --inicio-text-secondary: rgba(255, 255, 255, 0.7);
    --inicio-shadow: rgba(0, 0, 0, 0.1);
}

.theme-rosa {
    --inicio-primary: #ec4899;
    --inicio-secondary: #f97316;
    --inicio-accent: #8b5cf6;
    --inicio-success: #10b981;
    --inicio-card-bg: rgba(255, 255, 255, 0.05);
    --inicio-card-border: rgba(255, 255, 255, 0.1);
    --inicio-text-primary: #ffffff;
    --inicio-text-secondary: rgba(255, 255, 255, 0.7);
    --inicio-shadow: rgba(236, 72, 153, 0.1);
}

.theme-neon {
    --inicio-primary: #00ffff;
    --inicio-secondary: #39ff14;
    --inicio-accent: #ff073a;
    --inicio-success: #39ff14;
    --inicio-card-bg: rgba(0, 255, 255, 0.05);
    --inicio-card-border: rgba(0, 255, 255, 0.2);
    --inicio-text-primary: #ffffff;
    --inicio-text-secondary: rgba(255, 255, 255, 0.7);
    --inicio-shadow: rgba(0, 255, 255, 0.1);
}

/* Contenedor principal */
.app-container {
    min-height: 100vh;
}

/* Contenido principal */
.inicio-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 80px);
}

.main-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    min-height: 600px;
}

/* Panel de Guía de Inicio */
.guide-panel {
    width: 100%;
    height: 100%;
}

.guide-container {
    background: var(--inicio-card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--inicio-card-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px var(--inicio-shadow);
    transition: var(--inicio-transition);
    height: 100%;
    min-height: 600px;
    max-height: 1000px;
    display: flex;
    flex-direction: column;
}

.guide-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--inicio-text-primary);
    margin: 0 0 2rem 0;
    text-align: center;
    flex-shrink: 0;
}

.welcome-message {
    text-align: center;
    margin-bottom: 2.5rem;
    flex-shrink: 0;
}

.welcome-message h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--inicio-primary);
    margin: 0 0 0.5rem 0;
}

.welcome-message p {
    font-size: 1rem;
    color: var(--inicio-text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* Contenedor scrolleable para la guía */
.guide-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Scrollbar personalizada para guide-content */
.guide-content::-webkit-scrollbar {
    width: 6px;
}

.guide-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.guide-content::-webkit-scrollbar-thumb {
    background: var(--inicio-primary);
    border-radius: 3px;
}

.guide-content::-webkit-scrollbar-thumb:hover {
    background: var(--inicio-secondary);
}

/* Pasos de la guía */
.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.guide-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: var(--inicio-transition);
}

.guide-step:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-1px);
}

.step-number {
    min-width: 36px;
    height: 36px;
    background: var(--inicio-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--inicio-text-primary);
    margin: 0 0 0.5rem 0;
}

.step-content p {
    font-size: 0.95rem;
    color: var(--inicio-text-secondary);
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.step-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--inicio-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--inicio-transition);
    text-decoration: none;
}

.step-action-btn:hover {
    background: color-mix(in srgb, var(--inicio-primary) 85%, white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.step-action-btn svg {
    width: 14px;
    height: 14px;
}

/* Tip Ninja */
.ninja-tip {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    margin-top: 1.5rem;
}

.tip-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.tip-content {
    font-size: 0.95rem;
    color: var(--inicio-text-secondary);
    line-height: 1.5;
}

.tip-content strong {
    color: var(--inicio-success);
    font-weight: 600;
}

/* Panel de Cursos */
.courses-panel {
    width: 100%;
    height: 100%;
}

.courses-container {
    background: var(--inicio-card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--inicio-card-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px var(--inicio-shadow);
    transition: var(--inicio-transition);
    height: 100%;
    min-height: 600px;
    max-height: 1000px;
    display: flex;
    flex-direction: column;
}

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

.courses-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--inicio-text-primary);
    margin: 0;
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--inicio-text-secondary);
    cursor: pointer;
    transition: var(--inicio-transition);
}

.refresh-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--inicio-text-primary);
    transform: translateY(-1px);
}

.refresh-btn svg {
    width: 16px;
    height: 16px;
}

.courses-content {
    position: relative;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.courses-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Scrollbar personalizada */
.courses-list::-webkit-scrollbar {
    width: 6px;
}

.courses-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.courses-list::-webkit-scrollbar-thumb {
    background: var(--inicio-primary);
    border-radius: 3px;
}

.courses-list::-webkit-scrollbar-thumb:hover {
    background: var(--inicio-secondary);
}

.course-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--inicio-transition);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
}

.course-card::after {
    content: '';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 8px solid var(--inicio-text-secondary);
    transition: var(--inicio-transition);
}

.course-card.expanded::after {
    transform: translateY(-50%) rotate(180deg);
    border-top-color: var(--inicio-primary);
}

.course-card:hover,
.course-card:focus {
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-1px);
    border-color: var(--inicio-primary);
    outline: none;
}

.course-card:focus {
    box-shadow: 0 0 0 2px var(--inicio-primary);
}

.course-card.expanded {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--inicio-primary);
}

.course-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--inicio-text-primary);
    margin-bottom: 0.5rem;
    padding-right: 2rem;
}

.course-students {
    font-size: 0.9rem;
    color: var(--inicio-text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.course-students svg {
    width: 14px;
    height: 14px;
}

/* Lista de estudiantes expandida */
.students-list {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.students-list.show {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.students-list h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--inicio-text-primary);
    margin-bottom: 0.75rem;
}

.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.student-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 0.75rem;
    font-size: 0.9rem;
    color: var(--inicio-text-primary);
    transition: var(--inicio-transition);
}

.student-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.empty-courses {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--inicio-text-secondary);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

.empty-courses.hidden {
    display: none;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-courses h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--inicio-text-primary);
    margin-bottom: 0.5rem;
}

.empty-courses p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* Modales (mantener solo los necesarios) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--inicio-transition);
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--inicio-card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--inicio-card-border);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: var(--inicio-transition);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--inicio-card-border);
}

.modal-header h3 {
    margin: 0;
    color: var(--inicio-text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--inicio-text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: var(--inicio-transition);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--inicio-text-primary);
}

/* Notificaciones */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1100;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: var(--inicio-secondary);
}

.notification.error {
    background: #ef4444;
}

.notification.warning {
    background: var(--inicio-accent);
}

.notification.info {
    background: var(--inicio-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .inicio-main {
        padding: 1rem;
        min-height: calc(100vh - 60px);
    }
    
    .main-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        min-height: auto;
    }
    
    .guide-panel,
    .courses-panel {
        height: auto;
    }
    
    .guide-container,
    .courses-container {
        padding: 2rem;
        height: auto;
        min-height: auto;
        max-height: none;
    }
    
    .guide-content,
    .courses-content {
        overflow-y: visible;
        flex: none;
    }
    
    .courses-list {
        max-height: 400px;
        overflow-y: auto;
        height: auto;
    }
    
    .guide-title,
    .courses-title {
        font-size: 1.75rem;
    }
    
    .welcome-message h3 {
        font-size: 1.25rem;
    }
    
    .guide-steps {
        gap: 1rem;
    }
    
    .guide-step {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .step-number {
        align-self: center;
    }
    
    .step-action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .ninja-tip {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .courses-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .courses-title {
        text-align: center;
    }
    
    .refresh-btn {
        justify-content: center;
    }
    
    .empty-courses {
        padding: 2rem 1rem;
        position: static;
        transform: none;
    }
    
    .students-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .inicio-main {
        padding: 0.75rem;
    }
    
    .main-container {
        gap: 1.5rem;
    }
    
    .guide-container,
    .courses-container {
        padding: 1.5rem;
    }
    
    .guide-title,
    .courses-title {
        font-size: 1.5rem;
    }
    
    .guide-step {
        padding: 1rem;
    }
    
    .course-card {
        padding: 1rem;
    }
    
    .course-card::after {
        right: 1rem;
        top: 20%;
        transform: translateY(0);
    }
    
    .course-card.expanded::after {
        transform: rotate(180deg);
    }
    
    .course-name {
        padding-right: 1.5rem;
    }
    
    .empty-courses {
        padding: 1.5rem 1rem;
    }
    
    .students-grid {
        grid-template-columns: 1fr;
    }
    
    .student-item {
        text-align: center;
    }
    
    .courses-list {
        max-height: 300px;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.guide-panel {
    animation: fadeInUp 0.6s ease-out;
}

/* Efectos especiales para diferentes temas */
.theme-dark .guide-container {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.theme-light .guide-container {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.theme-rosa .guide-container {
    box-shadow: 0 20px 60px rgba(236, 72, 153, 0.2);
}

.theme-neon .guide-container {
    box-shadow: 0 20px 60px rgba(0, 255, 255, 0.2);
} 