/* Enable scrolling for this page */
body.life-compass-page {
    overflow-y: auto !important;
    overflow-x: hidden;
    height: auto;
    min-height: 100vh;
}

body.life-compass-page #app {
    height: auto;
    min-height: 100vh;
}

/* Life Compass - Interactive Mind Map Styles */

/* Nav Bar */
.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 60px;
    background: var(--bg-card, #12121a);
    border-bottom: 1px solid var(--border-color, #3a3a42);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
}

.main-nav .logo {
    color: var(--accent, #C4A77D);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-secondary, #A09A92);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary, #E8E6E3);
    background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
    color: var(--accent-primary, #6366f1);
    background: rgba(99, 102, 241, 0.1);
}

.compass-main {
    min-height: 100vh;
    padding-top: 70px;
    display: flex;
    flex-direction: column;
    background: var(--bg-dark, #0a0a0f);
}

/* Header */
.compass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.15) 0%,
        rgba(139, 92, 246, 0.1) 50%,
        rgba(236, 72, 153, 0.05) 100%);
    border-bottom: 1px solid var(--border-color, #3a3a42);
}

.header-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.header-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mind Map Wrapper */
.mindmap-wrapper {
    flex: 1;
    position: relative;
    min-height: 450px;
    max-height: 55vh;
    background: radial-gradient(ellipse at center, 
        rgba(99, 102, 241, 0.05) 0%, 
        transparent 70%);
}

.mindmap-container {
    width: 100%;
    height: 100%;
    min-height: 450px;
}

#mindmapSvg {
    width: 100%;
    height: 100%;
}

/* Controls */
.mindmap-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 10;
}

.control-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-color, #3a3a42);
    background: var(--bg-card, #12121a);
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.control-btn:hover {
    background: var(--accent-primary);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

/* Legend */
.mindmap-legend {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    display: flex;
    gap: 1.5rem;
    padding: 0.75rem 1rem;
    background: rgba(30, 30, 40, 0.9);
    border-radius: 10px;
    border: 1px solid var(--border-color, #3a3a42);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.archetype { background: #6366f1; }
.legend-dot.tone { background: #ec4899; }
.legend-dot.awareness { background: #10b981; }
.legend-dot.integration { background: #f59e0b; }

/* Category Cards */
.category-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1.5rem 2rem 2rem;
    background: var(--bg-dark, #0a0a0f);
    border-top: 1px solid var(--border-color, #3a3a42);
}

.category-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card, #12121a);
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.category-card.archetype:hover,
.category-card.archetype.active { border-color: #6366f1; }
.category-card.tone:hover,
.category-card.tone.active { border-color: #ec4899; }
.category-card.awareness:hover,
.category-card.awareness.active { border-color: #10b981; }
.category-card.integration:hover,
.category-card.integration.active { border-color: #f59e0b; }

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

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

.card-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-progress {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary, #232328);
    border-radius: 8px;
}

/* Detail Panel - SOLID BACKGROUND */
.detail-panel {
    position: fixed;
    top: 70px;
    right: -380px;
    width: 360px;
    height: calc(100vh - 70px);
    background: #1a1a2e;  /* Solid dark background */
    border-left: 1px solid var(--border-color, #3a3a42);
    padding: 1.5rem;
    transition: right 0.3s ease;
    z-index: 100;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0,0,0,0.4);
}

.detail-panel.open {
    right: 0;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    transition: all 0.2s;
}

.close-btn:hover {
    background: var(--accent-primary);
    color: var(--text-primary);
}

.detail-content {
    padding-top: 1rem;
}

.detail-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.detail-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
}

.detail-description {
    font-size: 0.95rem;
    color: #a0a0b0;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.detail-score {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

.score-bar {
    height: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #ec4899 100%);
    border-radius: 5px;
    transition: width 0.5s ease;
    width: 0%;
}

.score-label {
    font-size: 0.9rem;
    color: #a0a0b0;
}

.detail-traits {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.trait-tag {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    background: rgba(255,255,255,0.08);
    border-radius: 20px;
    font-size: 0.85rem;
    color: #c0c0d0;
}

.trait-tag.primary {
    background: rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.4);
}

.detail-action-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.detail-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

/* Responsive */
@media (max-width: 1024px) {
    .category-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .compass-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .category-cards {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .detail-panel {
        width: 100%;
        right: -100%;
    }
    
    .mindmap-legend {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
}


/* ═══════════════════════════════════════════════════════════════
   ONTOLOGICAL LAYERS
   ═══════════════════════════════════════════════════════════════ */

.ontological-layers {
    padding: 1.5rem 2rem 2rem;
    margin: 0 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
}

.ontological-layers .section-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary, #e2e8f0);
    margin: 0 0 0.25rem;
}

.ontological-layers .section-subtitle {
    font-size: 0.82rem;
    color: var(--text-secondary, #94a3b8);
    margin: 0 0 1.25rem;
}

.layer-bars {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.layer-bar-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.layer-label {
    width: 100px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary, #94a3b8);
    text-align: right;
    flex-shrink: 0;
}

.layer-track {
    flex: 1;
    height: 14px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 7px;
    overflow: hidden;
}

.layer-fill {
    height: 100%;
    border-radius: 7px;
    transition: width 0.6s ease;
}

/* Per-layer gradient colours */
.layer-bar-row[data-layer="physical"] .layer-fill {
    background: linear-gradient(90deg, #10b981, #34d399);
}
.layer-bar-row[data-layer="emotional"] .layer-fill {
    background: linear-gradient(90deg, #ec4899, #f472b6);
}
.layer-bar-row[data-layer="cognitive"] .layer-fill {
    background: linear-gradient(90deg, #6366f1, #818cf8);
}
.layer-bar-row[data-layer="ethical"] .layer-fill {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.layer-bar-row[data-layer="transcendent"] .layer-fill {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.layer-value {
    width: 40px;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary, #94a3b8);
    text-align: left;
    flex-shrink: 0;
}

.layer-summary {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.layer-tag {
    font-size: 0.75rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.layer-tag.shadow {
    background: rgba(236, 72, 153, 0.12);
    color: #f9a8d4;
    border-color: rgba(236, 72, 153, 0.2);
}

@media (max-width: 600px) {
    .ontological-layers {
        margin: 0 0.5rem 1rem;
        padding: 1rem;
    }
    .layer-label {
        width: 75px;
        font-size: 0.75rem;
    }
}
