/* WOW Features Styles - AI Coach, Gamification, Adaptive Learning */
/* A product of Bradley Virtual Solutions, LLC */

/* AI Study Coach Dashboard */
.ai-coach-section {
    margin: 32px 0;
}

.ai-coach-section h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.ai-coach-dashboard {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px;
    color: white;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.readiness-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 24px;
}

.readiness-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.readiness-header h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.readiness-score {
    font-size: 36px;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.readiness-progress {
    margin-bottom: 24px;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    height: 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.5s ease, background 0.5s ease;
}

.readiness-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 8px;
}

.stat-icon {
    font-size: 24px;
}

.stat-title {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
}

.ai-recommendations {
    margin-top: 20px;
}

.recommendation-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255, 255, 255, 0.15);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid rgba(255, 255, 255, 0.3);
}

.recommendation-item.high-priority {
    border-left-color: #ef4444;
}

.recommendation-item.medium-priority {
    border-left-color: #f59e0b;
}

.rec-icon {
    font-size: 24px;
}

.rec-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.rec-description {
    font-size: 14px;
    opacity: 0.9;
}

/* Gamification Dashboard */
.gamification-section {
    margin: 32px 0;
}

.gamification-header h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.gamification-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gamification-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.gamification-card .card-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.level-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.level-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
    font-weight: 600;
}

.level-title span:first-child {
    font-size: 18px;
}

.level-title span:last-child {
    font-size: 14px;
    opacity: 0.9;
}

.xp-progress {
    margin-top: 16px;
}

.xp-text {
    margin-top: 8px;
    font-size: 14px;
    opacity: 0.9;
    text-align: center;
}

.streak-card {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: white;
}

.streak-number {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
}

.streak-label {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.streak-message {
    font-size: 14px;
    opacity: 0.9;
}

.achievements-card {
    background: linear-gradient(135deg, #10b981 0%, #22c55e 100%);
    color: white;
}

.achievements-count {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
}

.achievements-label {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.btn-link {
    background: none;
    border: none;
    color: white;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}

.btn-link:hover {
    opacity: 0.8;
}

/* Adaptive Learning Banner */
.adaptive-learning-banner {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.adaptive-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.adaptive-icon {
    font-size: 32px;
}

.adaptive-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.adaptive-text strong {
    font-size: 16px;
}

.adaptive-text span {
    font-size: 14px;
    opacity: 0.9;
}

.adaptive-level {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

#adaptive-difficulty {
    font-size: 18px;
    font-weight: 700;
}

#adaptive-stars {
    font-size: 20px;
}

/* Achievements Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow: visible;  /* Allow content to be visible */
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
    -webkit-overflow-scrolling: touch !important;
}

/* Mobile fix for modal content */
@media (max-width: 1024px) {
    .modal-content {
        max-height: 95vh;
        overflow: visible !important;
    }
    
    .modal-body {
        overflow-y: auto !important;
        max-height: 70vh !important;
        -webkit-overflow-scrolling: touch !important;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch !important;
    display: block !important;
    visibility: visible !important;
}

.achievements-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.summary-stat {
    text-align: center;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
}

.summary-value {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: #667eea;
    margin-bottom: 4px;
}

.summary-label {
    font-size: 14px;
    color: #6b7280;
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    transition: all 0.2s ease;
}

.achievement-item.unlocked {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(34, 197, 94, 0.1) 100%);
    border-color: #10b981;
}

.achievement-item.locked {
    opacity: 0.6;
}

.achievement-icon {
    font-size: 40px;
    filter: grayscale(1);
}

.achievement-item.unlocked .achievement-icon {
    filter: grayscale(0);
}

.achievement-content {
    flex: 1;
}

.achievement-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.achievement-description {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 4px;
}

.achievement-xp {
    font-size: 12px;
    color: #667eea;
    font-weight: 600;
}

.achievement-badge {
    font-size: 24px;
}

.locked-badge {
    opacity: 0.3;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ai-coach-dashboard,
    .readiness-card {
        padding: 16px;
    }
    
    .readiness-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .gamification-grid {
        grid-template-columns: 1fr;
    }
    
    .adaptive-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .adaptive-level {
        align-items: flex-start;
    }
    
    .achievements-summary {
        grid-template-columns: 1fr;
    }
    
    .achievement-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .gamification-card {
        background: #1f2937;
        color: white;
    }
    
    .modal-content {
        background: #1f2937;
        color: white;
    }
    
    .modal-header {
        border-bottom-color: #374151;
    }
    
    .modal-close {
        color: #9ca3af;
    }
    
    .modal-close:hover {
        background: #374151;
    }
    
    .summary-stat {
        background: #111827;
    }
    
    .achievement-item {
        border-color: #374151;
        background: #111827;
    }
    
    .achievement-item.unlocked {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(34, 197, 94, 0.2) 100%);
    }
}

