/* Dashboard Styles */

/* Dashboard Navigation */
.dashboard-nav {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.user-level {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.user-dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.user-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Dashboard Header */
.dashboard-header {
    padding: 2rem 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.welcome-section h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.welcome-section p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.quick-stats {
    display: flex;
    gap: 1rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    min-width: 150px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Dashboard Grid */
.dashboard-main {
    padding: 3rem 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.dashboard-card {
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

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

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Progress Section */
.level-progress {
    margin-bottom: 2rem;
}

.level-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.current-level {
    font-weight: 600;
    color: var(--text-primary);
}

.next-level {
    color: var(--text-secondary);
}

.progress-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.xp-info {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.skill-progress h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.skill-item {
    margin-bottom: 1rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.skill-name {
    font-weight: 500;
    color: var(--text-primary);
}

.skill-level {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.skill-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* AI Recommendations */
.ai-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.recommendation-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.recommendation-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.recommendation-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.recommendation-text {
    flex: 1;
}

.recommendation-text h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.recommendation-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.recommendation-action {
    display: flex;
    align-items: center;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Achievements */
.achievement-count {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.achievement-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.achievement-item.unlocked {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.achievement-item.locked {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.6;
}

.achievement-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.achievement-item.unlocked .achievement-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.achievement-item.locked .achievement-icon {
    background: rgba(255, 255, 255, 0.2);
}

.achievement-info {
    flex: 1;
}

.achievement-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.achievement-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.achievement-date,
.achievement-progress {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.achievement-badge {
    display: flex;
    align-items: center;
}

.xp-reward {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.achievements-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.view-all-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    color: #6366f1;
}

/* Leaderboard */
.leaderboard-filter select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.leaderboard-item.current-user {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.rank-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.rank-1 .rank-number {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.rank-2 .rank-number {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

.rank-3 .rank-number {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: white;
}

.leaderboard-item:not(.rank-1):not(.rank-2):not(.rank-3) .rank-number {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
}

.user-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder-small {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.username {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.user-sport {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.user-score {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* Training Section */
.training-section,
.analytics-section {
    margin-top: 3rem;
}

.training-plan {
    padding: 2rem;
}

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

.training-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.training-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.training-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.training-actions {
    display: flex;
    gap: 1rem;
}

.training-exercises {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.exercise-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.exercise-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.exercise-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.exercise-info {
    flex: 1;
}

.exercise-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.exercise-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.exercise-duration {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

/* Analytics Section */
.analytics-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.analytics-card {
    padding: 2rem;
}

.time-filter {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.filter-btn.active,
.filter-btn:hover {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    border-color: transparent;
}

.chart-container {
    height: 300px;
    margin-top: 1rem;
}

.training-distribution {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.distribution-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.distribution-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.distribution-label {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
}

.distribution-value {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .quick-stats {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .training-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .training-actions {
        justify-content: center;
    }
    
    .training-meta {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .exercise-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .user-profile {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .user-info {
        text-align: center;
    }
}

/* Dark mode adjustments */
[data-theme="dark"] .dashboard-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .training-plan,
[data-theme="dark"] .analytics-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .recommendation-item,
[data-theme="dark"] .exercise-item {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .recommendation-item:hover,
[data-theme="dark"] .exercise-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

