/**
 * Skill Tree Styles
 * Sprint 2 - Skill Tree System
 */

/* ==================== Skill Header ==================== */
.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.skill-points-display {
    display: flex;
    align-items: center;
    gap: 15px;
}

.points-label {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.points-value {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 32px;
    font-weight: bold;
    padding: 10px 25px;
    border-radius: 8px;
    min-width: 80px;
    text-align: center;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ==================== Tree Tabs ==================== */
.skill-tree-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #2d3748;
    padding-bottom: 0;
}

.skill-tree-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 15px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #a0aec0;
    font-size: 16px;
}

.skill-tree-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.skill-tree-tab.active {
    color: #fff;
    border-bottom-color: var(--tree-color, #667eea);
    background: rgba(255, 255, 255, 0.05);
}

.skill-tree-tab[data-tree="COMBAT"].active {
    --tree-color: #e74c3c;
}

.skill-tree-tab[data-tree="DEFENSE"].active {
    --tree-color: #3498db;
}

.skill-tree-tab[data-tree="UTILITY"].active {
    --tree-color: #f39c12;
}

.tree-icon {
    font-size: 28px;
}

.tree-name {
    font-weight: 600;
}

/* ==================== Skill Tree Container ==================== */
#skill-tree-container {
    min-height: 400px;
}

.skill-tree {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

/* ==================== Skill Cards ==================== */
.skill-card {
    background: #1a202c;
    border: 2px solid #2d3748;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--skill-color, #667eea), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-card:hover::before {
    opacity: 1;
}

.skill-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Skill States */
.skill-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.7);
}

.skill-card.locked:hover {
    transform: none;
    box-shadow: none;
}

.skill-card.unlockable {
    border-color: var(--skill-color, #667eea);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.skill-card.unlocked {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    border-color: var(--skill-color, #667eea);
}

/* Combat Tree Color */
.skill-card[data-tree="COMBAT"] {
    --skill-color: #e74c3c;
}

/* Defense Tree Color */
.skill-card[data-tree="DEFENSE"] {
    --skill-color: #3498db;
}

/* Utility Tree Color */
.skill-card[data-tree="UTILITY"] {
    --skill-color: #f39c12;
}

/* Skill Header */
.skill-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.skill-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.skill-info {
    flex: 1;
}

.skill-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.skill-rank {
    font-size: 14px;
    color: #a0aec0;
    margin-top: 4px;
}

.skill-rank.maxed {
    color: #f39c12;
    font-weight: 600;
}

/* Skill Description */
.skill-description {
    color: #cbd5e0;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Skill Tooltip (Current Effect) */
.skill-tooltip {
    background: rgba(102, 126, 234, 0.1);
    border-left: 3px solid var(--skill-color, #667eea);
    padding: 10px;
    border-radius: 4px;
    font-size: 13px;
    color: #e2e8f0;
    margin-bottom: 15px;
}

/* Requirements */
.skill-requirement {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid #e74c3c;
    padding: 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #fc8181;
    margin-bottom: 10px;
}

.skill-requirement.met {
    background: rgba(46, 204, 113, 0.1);
    border-color: #2ecc71;
    color: #68d391;
}

/* Rank Progress */
.rank-progress {
    margin-top: 15px;
}

.rank-dots {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.rank-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2d3748;
    border: 2px solid #4a5568;
    transition: all 0.3s ease;
}

.rank-dot.filled {
    background: var(--skill-color, #667eea);
    border-color: var(--skill-color, #667eea);
    box-shadow: 0 0 8px var(--skill-color, #667eea);
}

/* Level Up Button */
.skill-level-btn {
    width: 100%;
    padding: 10px;
    background: var(--skill-color, #667eea);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.skill-level-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.skill-level-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== Active Skills Panel ==================== */
.active-skills-panel {
    margin-top: 30px;
    background: #1a202c;
    border: 2px solid #2d3748;
    border-radius: 10px;
    padding: 20px;
}

.active-skills-panel h3 {
    color: #fff;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.active-skills-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.active-skill-effect {
    background: rgba(102, 126, 234, 0.1);
    border-left: 3px solid #667eea;
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
    color: #e2e8f0;
}

.active-skill-effect.combat {
    border-left-color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.active-skill-effect.defense {
    border-left-color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

.active-skill-effect.utility {
    border-left-color: #f39c12;
    background: rgba(243, 156, 18, 0.1);
}

/* ==================== Respec Button ==================== */
.btn-warning {
    background: #f39c12;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-warning:hover {
    background: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ==================== Animations ==================== */
@keyframes skillUnlock {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.skill-card.unlocked {
    animation: skillUnlock 0.5s ease;
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .skill-header {
        flex-direction: column;
        gap: 15px;
    }

    .skill-tree {
        grid-template-columns: 1fr;
    }

    .active-skills-list {
        grid-template-columns: 1fr;
    }

    .skill-tree-tabs {
        flex-direction: column;
    }

    .skill-tree-tab {
        border-bottom: none;
        border-left: 3px solid transparent;
    }

    .skill-tree-tab.active {
        border-left-color: var(--tree-color, #667eea);
        border-bottom-color: transparent;
    }
}

/* ==================== Utility Classes ==================== */
.text-muted {
    color: #a0aec0;
    font-style: italic;
}
