:root {
    --bg-dark: #202020;
    --sidebar-bg: #151515;
    --card-bg: #2d2d2d;
    --text-main: #b6b6b6;
    --text-white: #ffffff;
    --accent: #2196f3;
    /* Unity Blue-ish */
    --hover-bg: #383838;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

.hub-container {
    display: flex;
    height: 100%;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-right: 1px solid #000;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-white);
    margin-bottom: 30px;
}

.unity-logo {
    display: flex;
    flex-direction: column;
}

/* Tech Selector */
.tech-selector {
    padding: 0 20px;
    margin-bottom: 20px;
}

.tech-selector label {
    display: block;
    color: #b0bec5;
    font-size: 0.8rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.custom-select {
    position: relative;
}

.custom-select select {
    width: 100%;
    background-color: #2d2d2d;
    border: 1px solid #444;
    color: #fff;
    padding: 10px 12px;
    border-radius: 6px;
    appearance: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s;
}

.custom-select select:hover,
.custom-select select:focus {
    border-color: #00bcd4;
    outline: none;
}

.custom-select .select-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    pointer-events: none;
    color: #b0bec5;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 10px;
    gap: 5px;
}

.nav-item {
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    text-align: left;
}

.nav-item:hover {
    background-color: var(--hover-bg);
    color: var(--text-white);
}

.nav-item.active {
    background-color: var(--hover-bg);
    color: var(--text-white);
    border-left: 3px solid var(--accent);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.avatar {
    width: 32px;
    height: 32px;
    background: #4caf50;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

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

.user-info .name {
    color: var(--text-white);
    font-size: 0.9rem;
}

.user-info .status {
    font-size: 0.7rem;
    color: #4caf50;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
}

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

.main-header h2 {
    color: var(--text-white);
    font-weight: 500;
}

.actions {
    display: flex;
    gap: 10px;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid #555;
    color: var(--text-white);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

/* Projects Grid */
.view-section {
    display: none;
}

.view-section.active {
    display: block;
    animation: fadeIn 0.3s;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    /* Increased min-width slightly for better look */
    gap: 30px;
    /* More breathing room */
    padding-bottom: 40px;
    width: 100%;
    /* Ensure full width */
}

/* Ensure Hub container takes full space without shared-game.css interfering */
.hub-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: relative;
    background-color: var(--bg-dark);
}

.main-content {
    flex: 1;
    overflow-y: auto;
    /* Scrollable content area */
    padding: 40px;
    position: relative;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: 180px;
    position: relative;
    border: 1px solid transparent;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: #444;
}

.card-icon {
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.custom-icon-bug {
    background: linear-gradient(135deg, #e91e63, #ad1457);
}

.custom-icon-code {
    background: linear-gradient(135deg, #00bcd4, #0097a7);
}

.custom-icon-box {
    background: linear-gradient(135deg, #ffc107, #ff8f00);
}

.custom-icon-potion {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
}

.custom-icon-vector {
    background: linear-gradient(135deg, #2196f3, #1565c0);
}

.custom-icon-event {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
}

.custom-icon-collider {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

.custom-icon-factory {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

.custom-icon-timer {
    background: linear-gradient(135deg, #00bcd4, #0097a7);
}

.custom-icon-raycast {
    background: linear-gradient(135deg, #ffeb3b, #fbc02d);
}

.custom-icon-transform {
    background: linear-gradient(135deg, #e91e63, #c2185b);
}

.custom-icon-animator {
    background: linear-gradient(135deg, #673ab7, #512da8);
}


/* Python Icons - Blue & Yellow Theme */
.custom-icon-python-1 {
    background: linear-gradient(135deg, #3776AB, #2A5B84);
}

.custom-icon-python-2 {
    background: linear-gradient(135deg, #FFD43B, #F4C025);
    color: #333 !important;
}

.custom-icon-python-3 {
    background: linear-gradient(135deg, #306998, #204A6B);
}

.custom-icon-python-4 {
    background: linear-gradient(135deg, #FFE873, #FFD43B);
    color: #333 !important;
}

.custom-icon-python-5 {
    background: linear-gradient(135deg, #4B8BBE, #306998);
}

.custom-icon-python-6 {
    background: linear-gradient(135deg, #646464, #3776AB);
}

.custom-icon-python-7 {
    background: linear-gradient(135deg, #3776AB, #FFD43B);
}

/* Hybrid */
.custom-icon-python-8 {
    background: linear-gradient(135deg, #2A5B84, #1E415E);
}

.custom-icon-python-9 {
    background: linear-gradient(135deg, #FFD43B, #E0B01C);
    color: #333 !important;
}

.custom-icon-python-10 {
    background: linear-gradient(135deg, #D32F2F, #B71C1C);
}

/* Error Red */
.custom-icon-python-11 {
    background: linear-gradient(135deg, #757575, #424242);
}

.custom-icon-python-12 {
    background: linear-gradient(135deg, #FFC107, #FF9800);
}

/* Power BI Icons - Yellow/Gold Theme with Variations */
.custom-icon-powerbi-1 {
    background: linear-gradient(135deg, #F2C811, #E0B01C);
    /* Classic Power BI Yellow */
    color: #333 !important;
}

.custom-icon-powerbi-2 {
    background: linear-gradient(135deg, #121212, #333333);
    /* Dark Mode / Control */
}

.custom-icon-powerbi-3 {
    background: linear-gradient(135deg, #F9E06C, #F2C811);
    /* Lighter Yellow */
    color: #333 !important;
}

.custom-icon-powerbi-4 {
    background: linear-gradient(135deg, #D4AF37, #AA8A2E);
    /* Metallic Gold */
}

.custom-icon-powerbi-5 {
    background: linear-gradient(135deg, #E65100, #EF6C00);
    /* Orange Data Access */
}

.custom-icon-powerbi-6 {
    background: linear-gradient(135deg, #444444, #222222);
    /* Dark Grey */
}

.custom-icon-powerbi-7 {
    background: linear-gradient(135deg, #FFD740, #FFC400);
    /* Amber */
    color: #333 !important;
}

.custom-icon-powerbi-8 {
    background: linear-gradient(135deg, #00796B, #004D40);
    /* Teal Security */
}

.custom-icon-powerbi-9 {
    background: linear-gradient(135deg, #FF6F00, #FF8F00);
    /* Deep Orange Performance */
}

.custom-icon-powerbi-10 {
    background: linear-gradient(135deg, #F57F17, #F9A825);
    /* Yellow Orange */
    color: #333 !important;
}

.custom-icon-powerbi-11 {
    background: linear-gradient(135deg, #212121, #000000);
    /* Deep Black Design */
}

.custom-icon-powerbi-12 {
    background: linear-gradient(135deg, #FDD835, #FBC02D);
    /* Bright Yellow Deployment */
    color: #333 !important;
}

/* Capstone Gold */
/*something missing here
width: 32px;
height: 32px;
}*/

.card-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-info h3 {
    color: var(--text-white);
    font-size: 1rem;
    margin-bottom: 5px;
}

.card-info .description {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: auto;
}

.meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #666;
    margin-top: 10px;
    align-items: center;
}

.tag {
    background: #444;
    padding: 2px 6px;
    border-radius: 3px;
    color: #ccc;
}

.card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.2s;
}

.card-actions i {
    width: 24px;
    height: 24px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.project-card:hover .card-actions {
    opacity: 1;
}

.empty-state {
    text-align: center;
    padding: 50px;
    color: #555;
    border: 2px dashed #333;
    border-radius: 10px;
}

.empty-state i {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
}

/* App Runner Overlay */
.app-runner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.app-runner.hidden {
    display: none;
}

.runner-header {
    height: 50px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid #333;
}

.runner-title {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    font-weight: bold;
}

.back-btn {
    background: transparent;
    border: none;
    color: #ccc;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.back-btn:hover {
    color: white;
}

.runner-controls {
    display: flex;
    gap: 10px;
}

.runner-controls button {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
}

.runner-controls button:hover {
    color: white;
}

.runner-viewport {
    flex: 1;
    background: #000;
}

#app-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* AI Engineering Icons */
.custom-icon-ai-1 {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

/* Violet */
.custom-icon-ai-2 {
    background: linear-gradient(135deg, #ec4899, #be185d);
}

/* Pink */
.custom-icon-ai-3 {
    background: linear-gradient(135deg, #06b6d4, #0e7490);
}

/* Cyan */
.custom-icon-ai-4 {
    background: linear-gradient(135deg, #f59e0b, #b45309);
}

/* Amber */
.custom-icon-ai-5 {
    background: linear-gradient(135deg, #10b981, #047857);
}

/* Emerald */
.custom-icon-ai-6 {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

/* Blue */
.custom-icon-ai-7 {
    background: linear-gradient(135deg, #6366f1, #4338ca);
}

/* Indigo */
.custom-icon-ai-8 {
    background: linear-gradient(135deg, #f43f5e, #be123c);
}

/* Rose */
.custom-icon-ai-9 {
    background: linear-gradient(135deg, #a855f7, #7e22ce);
}

/* Purple */
.custom-icon-ai-10 {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

/* Red */
.custom-icon-ai-11 {
    background: linear-gradient(135deg, #14b8a6, #0f766e);
}

/* Teal */
.custom-icon-ai-12 {
    background: linear-gradient(135deg, #eab308, #a16207);
}

/* Yellow */

/* Math Icons - Vibrant & Analytical Theme */
.custom-icon-math-1 {
    background: linear-gradient(135deg, #00b09b, #96c93d);
    /* Teal/Green - Stats */
}

.custom-icon-math-2 {
    background: linear-gradient(135deg, #8e44ad, #c0392b);
    /* Purple/Red - Probability */
}

.custom-icon-math-3 {
    background: linear-gradient(135deg, #1565C0, #1E88E5);
    /* Blue - Distributions */
}

.custom-icon-math-4 {
    background: linear-gradient(135deg, #ff7e5f, #feb47b);
    /* Coral/Orange - Correlation */
}

.custom-icon-math-5 {
    background: linear-gradient(135deg, #cb2d3e, #ef473a);
    /* Red - Outliers */
}

.custom-icon-math-6 {
    background: linear-gradient(135deg, #4b6cb7, #182848);
    /* Deep Blue - Deviation */
}

.custom-icon-math-7 {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    /* Green - Hypothesis */
}

.custom-icon-math-8 {
    background: linear-gradient(135deg, #667db6, #0082c8);
    /* Periwinkle/Blue - Bayes */
}

.custom-icon-math-9 {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    /* Cyan/Blue - Matrix */
}

.custom-icon-math-10 {
    background: linear-gradient(135deg, #f09819, #edde5d);
    /* Orange/Yellow - Vector */
    color: #333 !important;
}

.custom-icon-math-11 {
    background: linear-gradient(135deg, #DA4453, #89216B);
    /* Red/Purple - Derivative */
}

.custom-icon-math-12 {
    background: linear-gradient(135deg, #8360c3, #2ebf91);
    /* Purple/Green - Regression */
}