/* Reset & Container */
.tc-main-container {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
    font-family: var(--font-body);
    user-select: none;
}

/* Header Section */
.tc-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: var(--bg-abyss);
    border-bottom: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.tc-class-icons {
    display: flex;
    gap: 10px;
}

.tc-class-icon {
    width: 44px;
    height: 44px;
    background-size: cover;
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-normal);
    filter: grayscale(100%);
}

.tc-class-icon:hover {
    border-color: var(--cyan-primary);
    filter: grayscale(30%);
    box-shadow: var(--glow-cyan);
}

.tc-class-icon.active {
    border-color: var(--gold-primary);
    filter: grayscale(0%);
    box-shadow: var(--glow-gold);
}

.tc-info-panel {
    display: flex;
    align-items: center;
    gap: 30px;
}

.tc-stats span {
    margin-right: 20px;
    font-size: var(--fs-body);
    font-weight: var(--fw-semibold);
    color: var(--text-secondary);
}

.tc-stats span span {
    color: var(--gold-primary);
    font-size: 1.1em;
}

.tc-btn {
    background: var(--bg-ocean);
    color: var(--text-primary);
    border: 1px solid var(--cyan-primary);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: var(--fw-bold);
    font-family: var(--font-body);
    transition: var(--transition-fast);
}

.tc-btn:hover {
    background: var(--cyan-primary);
    color: var(--bg-abyss);
    box-shadow: var(--glow-cyan);
}

/* Trees */
.tc-trees-wrapper {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 30px;
    background: var(--bg-deep);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.tc-tree {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    width: 320px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.tc-tree-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(180deg, var(--bg-slate), var(--bg-abyss));
    border-bottom: 1px solid var(--border-strong);
}

.tc-tree-icon {
    width: 36px;
    height: 36px;
    background-size: cover;
    border: 1px solid var(--cyan-primary);
    border-radius: var(--radius-sm);
    margin-right: 15px;
    box-shadow: var(--glow-cyan);
}

.tc-tree-title {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tc-tree-name {
    font-size: var(--fs-h3);
    font-weight: var(--fw-bold);
    color: var(--text-primary);
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tc-tree-pts {
    font-size: var(--fs-h3);
    font-weight: var(--fw-bold);
    color: var(--gold-primary);
    font-family: var(--font-display);
}

/* Grid */
.tc-grid {
    display: grid;
    grid-template-columns: repeat(4, 50px);
    grid-template-rows: repeat(7, 50px);
    gap: 15px;
    padding: 20px;
    justify-content: center;
    position: relative;
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* Talent Icon */
.tc-talent {
    position: relative;
    width: 48px;
    height: 48px;
    cursor: pointer;
}

.tc-talent-icon {
    width: 100%;
    height: 100%;
    background-size: cover;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

/* Talent States */
.tc-talent.locked .tc-talent-icon {
    filter: grayscale(100%) brightness(0.5);
    border-color: rgba(255,255,255,0.1);
}

.tc-talent.available .tc-talent-icon {
    filter: grayscale(100%) brightness(1.2);
    border-color: var(--color-success);
}

.tc-talent.active .tc-talent-icon {
    border-color: var(--color-success); 
    filter: none;
    box-shadow: 0 0 10px rgba(0, 255, 152, 0.4);
}

.tc-talent.maxed .tc-talent-icon {
    border-color: var(--gold-primary);
    filter: none;
    box-shadow: var(--glow-gold);
}

/* Rank Label */
.tc-talent-rank {
    position: absolute;
    bottom: -8px;
    right: -8px;
    background: var(--bg-abyss);
    color: var(--color-success);
    border: 1px solid var(--color-success);
    border-radius: 3px;
    font-size: 11px;
    padding: 1px 4px;
    font-weight: var(--fw-bold);
    z-index: 2;
    box-shadow: var(--shadow-sm);
}

.tc-talent.locked .tc-talent-rank {
    display: none;
}

.tc-talent.maxed .tc-talent-rank {
    color: var(--gold-primary);
    border-color: var(--gold-primary);
}

/* Tooltip */
.tc-tooltip {
    position: absolute;
    background: var(--bg-ocean);
    border: 1px solid var(--cyan-primary);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    width: 260px;
    z-index: var(--z-tooltip);
    pointer-events: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-lg), var(--glow-cyan-strong);
    font-size: var(--fs-small);
    line-height: var(--lh-normal);
}

.tc-tt-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-subtle);
}

.tc-tt-name {
    font-weight: var(--fw-bold);
    color: var(--gold-primary);
    font-size: var(--fs-body);
}

.tc-tt-rank {
    color: var(--text-secondary);
}

.tc-tt-req {
    color: var(--color-danger);
    margin-bottom: 6px;
}

.tc-tt-desc {
    color: var(--text-primary);
}

.tc-tt-next {
    margin-top: 10px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Arrows */
.tc-arrow {
    position: absolute;
    z-index: 1;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    opacity: 0.6;
    transition: var(--transition-fast);
    pointer-events: none;
}

.tc-arrow.tc-arrow-down { width: 16px; }
.tc-arrow.tc-arrow-right { height: 16px; }
.tc-arrow.tc-arrow-right-down { width: 40px; height: 40px; }

.tc-arrow.active {
    opacity: 1;
    filter: brightness(1.8) drop-shadow(0 0 4px var(--gold-primary));
}

.tc-talent:hover .tc-talent-icon {
    filter: brightness(1.2);
}
