/* Dashboard V2 - Path-First Dashboard Styles */

/* Career Path Cards */
.career-path-card {
    border: 2px solid var(--color-border);
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
}

.career-path-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.career-path-icon {
    font-size: 32px;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 8px;
}

.career-path-card .card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.career-path-card:hover .card-title {
    color: #667eea;
}

/* View Toggle Header */
.view-toggle-header {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    border-bottom: 2px solid var(--color-border);
}

.view-toggle-btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--color-text-secondary);
}

.view-toggle-btn:hover {
    color: #667eea;
    background: var(--color-surface-raised);
}

.view-toggle-btn.active {
    border-bottom-color: #667eea;
    color: #667eea;
}

/* View Sections */
.view-section {
    display: none;
}

.view-section.active {
    display: block;
}

/* Career Paths View Styles */
#careerPathsView {
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Path Selector Tabs */
.path-selector-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.path-tabs-horizontal {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    margin-bottom: 32px;
    padding-bottom: 8px;
}

.path-tab-compact {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: 8px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
}

.path-tab-compact:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.path-tab-compact.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.path-tab-icon {
    font-size: 24px;
    line-height: 1;
}

.path-tab-content {
    flex: 1;
}

.path-tab-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.path-tab-meta {
    font-size: 12px;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.path-progress-indicator {
    color: #10b981;
    font-weight: 600;
}

/* Progress Sidebar */
.progress-sidebar {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    position: sticky;
    top: 20px;
    margin-bottom: 24px;
}

.progress-sidebar-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    padding: 28px;
    text-align: center;
    border-bottom: 2px solid var(--color-border);
}

.progress-sidebar-icon {
    font-size: 56px;
    margin-bottom: 12px;
    display: block;
}

.progress-sidebar-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-text-primary);
    margin-bottom: 6px;
}

.progress-sidebar-tagline {
    font-size: 14px;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.progress-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 2px solid var(--color-border);
}

.progress-stat-box {
    padding: 24px;
    text-align: center;
    border-right: 1px solid var(--color-border);
}

.progress-stat-box:last-child {
    border-right: none;
}

.progress-stat-icon {
    font-size: 20px;
    margin-bottom: 8px;
}

.progress-stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--color-text-primary);
    display: block;
    margin-bottom: 4px;
}

.progress-stat-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
}

.progress-main-metric {
    padding: 28px;
}

.progress-percentage {
    font-size: 48px;
    font-weight: 800;
    color: var(--color-text-primary);
    text-align: center;
    margin-bottom: 12px;
}

.progress-percentage-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

.progress-bar-wrapper {
    background: #e5e7eb;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar-fill {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 6px;
}

.progress-count-text {
    font-size: 14px;
    color: var(--color-text-secondary);
    text-align: center;
    font-weight: 500;
}

.cert-action {
    padding: 24px;
    background: var(--color-surface-raised);
    border-top: 2px solid var(--color-border);
}

.cert-action.unlocked {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
}

.cert-action-icon {
    font-size: 32px;
    text-align: center;
    margin-bottom: 12px;
}

.cert-action-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-align: center;
    margin-bottom: 16px;
}

/* Curriculum Section */
.curriculum-header {
    margin-bottom: 32px;
}

.curriculum-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-text-primary);
    margin-bottom: 8px;
}

.curriculum-subtitle {
    font-size: 16px;
    color: var(--color-text-secondary);
}

/* Job Requirements Card */
.jd-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 2px solid var(--color-border);
    border-radius: 8px;
    padding: 28px;
    margin-bottom: 32px;
}

.jd-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 20px;
}

.jd-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
}

.jd-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.jd-list li {
    display: flex;
    gap: 12px;
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.jd-check {
    color: #10b981;
    font-weight: bold;
}

/* Module Cards */
.module-item {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-left: 4px solid var(--color-border);
    border-radius: 6px;
    margin-bottom: 12px;
    transition: all 0.2s;
    overflow: hidden;
}

.module-item:hover {
    border-left-color: #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.module-item.completed {
    border-left-color: #10b981;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.02) 100%);
}

.module-item-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    gap: 16px;
}

.module-number {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-muted);
    min-width: 40px;
    text-align: center;
}

.module-item.completed .module-number {
    color: #10b981;
}

.module-info {
    flex: 1;
}

.module-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.module-item.completed .module-name {
    color: #059669;
}

.completion-badge {
    background: #10b981;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.module-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--color-text-secondary);
}

.module-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.module-badge-small {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.badge-capstone {
    background: #fef3c7;
    color: #92400e;
}

.module-expand-icon {
    color: var(--color-text-faint);
    font-size: 14px;
    transition: transform 0.2s;
}

.module-item.expanded .module-expand-icon {
    transform: rotate(180deg);
}

.module-body {
    padding: 0 20px 20px 76px;
    border-top: 1px solid #f3f4f6;
    display: none;
}

.module-item.expanded .module-body {
    display: block;
    padding-top: 16px;
}

.module-objectives-inline {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.module-objectives-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.objectives-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.objective-tag {
    background: var(--color-bg);
    color: var(--color-text-secondary);
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.module-body-section {
    margin-bottom: 16px;
}

.module-body-heading {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.module-body-text {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* Browse All View - Card Gallery Design */
#browseAllView {
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Hero Stats */
.games-hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.hero-stat-card {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
}

.hero-stat-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.12);
    transform: translateY(-2px);
}

.hero-stat-icon {
    font-size: 40px;
    line-height: 1;
    color: #667eea;
}

.hero-stat-content {
    flex: 1;
}

.hero-stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--color-text-primary);
    line-height: 1.2;
    margin-bottom: 4px;
}

.hero-stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Games Gallery */
.games-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* Game Card */
.game-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    position: relative;
}

.game-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.08);
    transform: translateY(-2px);
}

/* Game Card Image Section */
.game-card-image {
    position: relative;
    width: 100%;
    height: 156px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-card-image .game-icon-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Image scrim — keeps the status chip legible without darkening the whole image */
.game-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

/* Status chip on the image — only rendered for completed / in-progress games */
.card-status-chip {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 999px;
    color: #fff;
    backdrop-filter: blur(4px);
}

.card-status-chip.completed {
    background: rgba(16, 185, 129, 0.92);
}

.card-status-chip.in-progress {
    background: rgba(79, 70, 229, 0.92);
}

/* Scheduled game teaser. Amber rather than the play-state colours, because it
   is announcing a date, not reporting the visitor's progress. */
.card-status-chip.coming-soon {
    background: rgba(217, 119, 6, 0.94);
    letter-spacing: 0.02em;
}

/* A Coming Soon card is an anchor to the countdown, not a panel opener, so it
   needs the block/inherit reset an <a> does not get for free. */
a.game-card-modern--coming-soon {
    display: block;
    color: inherit;
    text-decoration: none;
}

a.game-card-modern--coming-soon:hover {
    color: inherit;
    text-decoration: none;
}

/* Thin progress bar along the bottom of the image */
.card-progress-track {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.35);
    z-index: 2;
}

.card-progress-fill {
    height: 100%;
    background: #4f46e5;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Game Card Content */
.game-card-content {
    padding: 14px 16px 16px;
}

.game-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 14px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

/* Game Card Action */
.game-action-btn {
    width: 100%;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.game-action-btn.primary {
    background: #4f46e5;
    color: #fff;
}

.game-action-btn.primary:hover {
    background: #4338ca;
}

.game-action-btn.ghost {
    background: transparent;
    border-color: var(--color-border);
    color: var(--color-text-secondary);
}

.game-action-btn.ghost:hover {
    border-color: #10b981;
    color: #059669;
}

/* Empty State */
.games-empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--color-surface);
    border: 2px dashed var(--color-border);
    border-radius: 12px;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
    color: var(--color-text-muted);
}

.empty-state-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 14px;
    color: var(--color-text-secondary);
}

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

.game-card {
    animation: fadeInUp 0.4s ease-out backwards;
}

.game-card:nth-child(1) { animation-delay: 0.05s; }
.game-card:nth-child(2) { animation-delay: 0.1s; }
.game-card:nth-child(3) { animation-delay: 0.15s; }
.game-card:nth-child(4) { animation-delay: 0.2s; }
.game-card:nth-child(5) { animation-delay: 0.25s; }
.game-card:nth-child(6) { animation-delay: 0.3s; }

/* Responsive */
@media (max-width: 768px) {
    .path-tabs-horizontal {
        flex-direction: column;
    }

    .path-tab-compact {
        width: 100%;
    }

    .progress-sidebar {
        position: static;
    }

    .games-gallery {
        grid-template-columns: 1fr;
    }

    .games-hero-stats {
        grid-template-columns: 1fr;
    }
}

/* Suggested Games Cards (Quick Wins) */
.suggested-game-card {
    background: var(--color-surface);
    border: 2px solid #fef3c7;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.suggested-game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.2);
    border-color: #fbbf24;
}

.suggested-game-image {
    position: relative;
    overflow: hidden;
}

.suggested-game-image img {
    transition: transform 0.3s ease;
}

.suggested-game-card:hover .suggested-game-image img {
    transform: scale(1.05);
}

.suggested-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.suggested-game-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.suggested-game-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.suggested-game-tagline {
    font-size: 12px;
    color: var(--color-text-secondary);
    margin: 0 0 8px 0;
    font-weight: 500;
}

.suggested-game-tagline i {
    color: #f59e0b;
    margin-right: 4px;
}

/* Progress bar within suggested game cards */
.suggested-game-content .progress {
    margin-top: 8px;
}

/* Suggested Section Header */
#suggestedGamesSection .badge-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fbbf24;
}
