/**
 * GemBot Academy Styles
 * © 2024-2025 Ryan Barbrick / Barbrick Design
 */

/* Academy Container */
.academy-container {
    background: linear-gradient(135deg, #0a0015 0%, #1a0a2e 100%);
    border-radius: 16px;
    padding: 20px;
    min-height: 500px;
    color: #fff;
}

/* Academy Header */
.academy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.academy-player-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.academy-level-badge {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

.academy-level-badge .level-number {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
}

.academy-level-badge .level-label {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.academy-xp-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 200px;
}

.academy-xp-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.academy-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #00ffff 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.academy-xp-text {
    font-size: 11px;
    color: #888;
}

.academy-currencies {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.currency-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* Academy Tabs */
.academy-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.academy-tab {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ccc;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.academy-tab:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.academy-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: #fff;
}

/* Tasks Section */
.task-section {
    margin-bottom: 25px;
}

.task-section h3 {
    color: #00ffff;
    font-size: 16px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 15px;
    transition: all 0.2s;
}

.task-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(102, 126, 234, 0.5);
}

.task-item.completed {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
}

.task-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.task-info {
    flex: 1;
    min-width: 0;
}

.task-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.task-desc {
    font-size: 12px;
    color: #888;
}

.task-progress {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.task-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #00ffff 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.task-progress-text {
    font-size: 11px;
    color: #667eea;
    min-width: 40px;
}

.task-rewards {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
    font-size: 11px;
}

.reward-xp { color: #00ffff; }
.reward-gem { color: #ffd700; }
.reward-token { color: #ff8c00; }

.task-check {
    font-size: 20px;
}

/* Courses */
.courses-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.course-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s;
}

.course-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.course-card.locked {
    opacity: 0.6;
    filter: grayscale(50%);
}

.course-icon {
    font-size: 36px;
}

.course-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #00ffff;
}

.course-desc {
    font-size: 12px;
    color: #888;
    margin: 0;
}

.course-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: #888;
}

.course-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.course-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88 0%, #00ffff 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.course-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.course-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.course-locked {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    font-size: 12px;
    color: #888;
}

/* Achievements */
.achievements-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.achievement-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.achievement-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.achievement-card.unlocked {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
}

.achievement-card.secret {
    opacity: 0.5;
}

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

.achievement-info h4 {
    margin: 0;
    font-size: 14px;
}

.achievement-info p {
    margin: 4px 0 0;
    font-size: 11px;
    color: #888;
}

.achievement-check {
    margin-left: auto;
    font-size: 18px;
}

/* Stats */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #00ffff;
}

.stat-label {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* Course Detail */
.course-detail {
    padding: 10px;
}

.course-detail h2 {
    margin: 15px 0;
    color: #00ffff;
}

.course-detail p {
    color: #888;
    margin-bottom: 20px;
}

.back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ccc;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Lessons List */
.lessons-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.2s;
}

.lesson-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(102, 126, 234, 0.5);
}

.lesson-item.completed {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
}

.lesson-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.lesson-info {
    flex: 1;
}

.lesson-info h4 {
    margin: 0 0 4px;
    font-size: 14px;
}

.lesson-info p {
    margin: 0;
    font-size: 12px;
    color: #888;
}

.lesson-duration {
    font-size: 11px;
    color: #667eea;
    margin-top: 4px;
    display: inline-block;
}

.lesson-reward {
    color: #00ffff;
    font-weight: 600;
    font-size: 12px;
}

.lesson-check {
    font-size: 24px;
}

.lesson-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.lesson-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Notifications */
.academy-notification {
    animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* Panel Dragging Styles */
.panel-dragging {
    opacity: 0.9;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
}

.panel-resizing {
    opacity: 0.9;
}

.panel-drag-handle:hover {
    background: rgba(102, 126, 234, 0.5) !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .academy-header {
        flex-direction: column;
        text-align: center;
    }
    
    .academy-player-info {
        flex-direction: column;
    }
    
    .academy-tabs {
        justify-content: center;
    }
    
    .academy-tab {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .courses-container,
    .achievements-container,
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .task-item {
        flex-wrap: wrap;
    }
    
    .task-rewards {
        flex-direction: row;
        gap: 10px;
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }
}
