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

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

/* Dereal Life Compass - Styles */

body {
    background: var(--bg-dark);
}

.app-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--accent-primary);
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    gap: 16px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

/* Section Titles */
h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
}

.section-desc {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Overview Section - Compass Visual */
.overview-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
    align-items: center;
}

.compass-visual {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

#compassSvg {
    width: 100%;
    height: auto;
}

.compass-bg {
    fill: var(--bg-card);
    stroke: var(--border-color);
    stroke-width: 1;
}

.compass-ring {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 1;
    stroke-dasharray: 4 4;
}

.compass-center {
    fill: var(--bg-dark);
    stroke: var(--accent-primary);
    stroke-width: 2;
}

.center-score {
    font-size: 24px;
    font-weight: 700;
    fill: var(--text-primary);
    text-anchor: middle;
}

.center-label {
    font-size: 10px;
    fill: var(--text-secondary);
    text-anchor: middle;
}

.radar-fill {
    fill: rgba(99, 102, 241, 0.2);
    stroke: var(--accent-primary);
    stroke-width: 2;
    transition: all 0.5s ease;
}

.domain-point {
    fill: var(--accent-primary);
    transition: all 0.3s;
    cursor: pointer;
}

.domain-point:hover {
    r: 8;
    fill: var(--accent-secondary);
}

.domain-point.low {
    fill: var(--accent-danger);
}

.domain-point.moderate {
    fill: var(--accent-warning);
}

.domain-point.high {
    fill: var(--accent-success);
}

.domain-labels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.domain-label {
    position: absolute;
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
    transform: translate(-50%, -50%);
}

.compass-legend {
    padding: 20px;
}

.compass-legend h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.compass-legend p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 14px;
}

.legend-scale {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: 12px;
    font-size: 12px;
}

.scale-low {
    color: var(--accent-danger);
}

.scale-mid {
    color: var(--accent-warning);
}

.scale-high {
    color: var(--accent-success);
}

/* Profile Section */
.profile-section {
    margin-bottom: 60px;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.profile-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.profile-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.profile-card.assessed {
    border-color: var(--border-color);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.card-icon {
    font-size: 24px;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.card-content {
    margin-bottom: 16px;
}

.primary-result {
    font-size: 20px;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 4px;
}

.primary-result.empty {
    color: var(--text-muted);
    font-size: 14px;
}

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

.card-action {
    display: inline-block;
    font-size: 13px;
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.card-action:hover {
    color: var(--accent-secondary);
}

/* Domains Section */
.domains-section {
    margin-bottom: 60px;
}

.domains-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.domain-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 12px;
    transition: all 0.2s;
}

.domain-row:hover {
    background: var(--bg-elevated);
}

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

.domain-info {
    flex: 1;
}

.domain-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.domain-bar {
    height: 6px;
    background: var(--bg-dark);
    border-radius: 3px;
    overflow: hidden;
}

.domain-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.domain-bar-fill.low {
    background: var(--accent-danger);
}

.domain-bar-fill.moderate {
    background: var(--accent-warning);
}

.domain-bar-fill.high {
    background: var(--accent-success);
}

.domain-score {
    font-size: 16px;
    font-weight: 600;
    min-width: 40px;
    text-align: right;
}

.domain-score.low {
    color: var(--accent-danger);
}

.domain-score.moderate {
    color: var(--accent-warning);
}

.domain-score.high {
    color: var(--accent-success);
}

.domain-score.empty {
    color: var(--text-muted);
    font-size: 12px;
}

/* Priorities Section */
.priorities-section {
    margin-bottom: 60px;
}

.priorities-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.priority-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 16px;
    border-left: 4px solid var(--accent-danger);
    cursor: pointer;
    transition: all 0.2s;
}

.priority-card:hover {
    background: var(--bg-elevated);
}

.priority-rank {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-muted);
    width: 40px;
}

.priority-info {
    flex: 1;
}

.priority-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

.priority-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.priority-score {
    font-size: 24px;
    font-weight: 600;
    color: var(--accent-danger);
}

.priority-action {
    padding: 8px 16px;
    background: var(--gradient-primary);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-primary);
    text-decoration: none;
}

/* Integration Section */
.integration-section {
    margin-bottom: 60px;
}

.integration-card {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 30px;
    background: var(--bg-card);
    border-radius: 20px;
}

.integration-visual {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.integration-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: var(--bg-dark);
    stroke-width: 8;
}

.ring-fill {
    fill: none;
    stroke: url(#integrationGradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 1s ease;
}

.integration-score {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.integration-score .score-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
}

.integration-score .score-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.integration-info {
    flex: 1;
}

.integration-info h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.integration-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.integration-level {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.integration-level.high {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
}

.integration-level.moderate {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
}

.integration-level.low {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
}

/* Actions Section */
.actions-section {
    display: flex;
    gap: 16px;
    justify-content: center;
    padding: 40px 0;
}

.btn {
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--accent-primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.empty-state p {
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .overview-section {
        grid-template-columns: 1fr;
    }
    
    .compass-visual {
        max-width: 300px;
    }
    
    .integration-card {
        flex-direction: column;
        text-align: center;
    }
    
    .actions-section {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header {
        flex-direction: column;
        gap: 16px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .domains-list {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Inferred Data (from conversations)
   ============================================ */

.profile-card.inferred {
    border: 1px solid rgba(168, 85, 247, 0.3);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.05) 0%, var(--card-bg) 100%);
}

.inferred-badge {
    display: inline-block;
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
    color: var(--text-primary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 500;
    margin-right: 6px;
    vertical-align: middle;
}

.domain-row.inferred {
    border-left: 3px solid #a855f7;
}
