/**
 * BotC Dimensions — Skill Tree & Detail Panel Styles
 * Loaded alongside styles.css (which provides base vars, reset, header, nav)
 */

/* === Good/Evil Toggle === */
.alignment-toggle {
    display: inline-flex;
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 2px;
    gap: 2px;
}

.toggle-btn {
    padding: 4px 16px;
    border: none;
    border-radius: 18px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.toggle-btn.active[data-alignment="good"] {
    background: rgba(74, 222, 128, 0.2);
    color: var(--accent-good);
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.15);
}

.toggle-btn.active[data-alignment="evil"] {
    background: rgba(248, 113, 113, 0.2);
    color: var(--accent-evil);
    box-shadow: 0 0 15px rgba(248, 113, 113, 0.15);
}

.toggle-btn:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.toggle-icon {
    font-size: 0.8rem;
}

/* === Graph Container === */
.graph-container {
    position: relative;
    background: radial-gradient(ellipse at center, #0d1b2a 0%, #0a0f1a 60%, #060810 100%);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow), inset 0 0 80px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid rgba(45, 55, 72, 0.3);
}

#skill-graph {
    width: 100%;
    height: 600px;
    display: block;
    cursor: default;
}

/* === Tooltip === */
.tooltip {
    position: absolute;
    background: rgba(15, 52, 96, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 14px;
    pointer-events: none;
    z-index: 20;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    max-width: 220px;
}

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

.tooltip-tier {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* === Detail Panel === */
.detail-panel {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 20px;
    position: relative;
    animation: slideUp 0.3s ease;
    border-left: 4px solid var(--accent-blue);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-panel.alignment-good {
    border-left-color: var(--accent-good);
}

.detail-panel.alignment-evil {
    border-left-color: var(--accent-evil);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

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

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

.detail-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.detail-header h2 {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.detail-tier {
    font-size: 0.8rem;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.detail-tier.tier-1 { background: rgba(96, 165, 250, 0.2); color: var(--tier-1); }
.detail-tier.tier-2 { background: rgba(167, 139, 250, 0.2); color: var(--tier-2); }
.detail-tier.tier-3 { background: rgba(244, 114, 182, 0.2); color: var(--tier-3); }
.detail-tier.tier-4 { background: rgba(251, 146, 60, 0.2); color: var(--tier-4); }
.detail-tier.tier-5 { background: rgba(251, 191, 36, 0.2); color: var(--tier-5); }

.detail-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.detail-parents h3,
.detail-alignment h3,
.detail-fusions h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.parent-tags,
.fusion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.skill-tag {
    padding: 4px 14px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.skill-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.skill-tag.deception { background: rgba(248, 113, 113, 0.15); color: var(--color-deception); border-color: rgba(248, 113, 113, 0.3); }
.skill-tag.persuasion { background: rgba(96, 165, 250, 0.15); color: var(--color-persuasion); border-color: rgba(96, 165, 250, 0.3); }
.skill-tag.social-insight { background: rgba(167, 139, 250, 0.15); color: var(--color-social-insight); border-color: rgba(167, 139, 250, 0.3); }
.skill-tag.game-knowledge { background: rgba(74, 222, 128, 0.15); color: var(--color-game-knowledge); border-color: rgba(74, 222, 128, 0.3); }
.skill-tag.logic { background: rgba(251, 191, 36, 0.15); color: var(--color-logic); border-color: rgba(251, 191, 36, 0.3); }
.skill-tag.fusion { background: rgba(244, 114, 182, 0.15); color: #f472b6; border-color: rgba(244, 114, 182, 0.3); }

.alignment-summary {
    padding: 14px 18px;
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.alignment-good .alignment-summary {
    background: rgba(74, 222, 128, 0.08);
    border-left: 3px solid var(--accent-good);
    color: var(--accent-good);
}

.alignment-evil .alignment-summary {
    background: rgba(248, 113, 113, 0.08);
    border-left: 3px solid var(--accent-evil);
    color: var(--accent-evil);
}

.example-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.example-list li {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border-left: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.alignment-good .example-list li {
    border-left-color: rgba(74, 222, 128, 0.3);
}

.alignment-evil .example-list li {
    border-left-color: rgba(248, 113, 113, 0.3);
}

.detail-growth {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.detail-growth p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    font-style: italic;
}

.detail-fusions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* === Legend === */
.legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 12px 20px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

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

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

.legend-dot.tier-1 { background: var(--tier-1); }
.legend-dot.tier-2 { background: var(--tier-2); }
.legend-dot.tier-3 { background: var(--tier-3); }
.legend-dot.tier-4 { background: var(--tier-4); }
.legend-dot.tier-5 { background: var(--tier-5); }

/* === Responsive === */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    #skill-graph {
        height: 450px;
    }

    .detail-panel {
        padding: 20px;
    }

    .detail-header h2 {
        font-size: 1.2rem;
    }

    .legend {
        gap: 12px;
    }
}
