/* ========================================
   天赋栏样式 - 天赋图标、提示框
   ======================================== */

.talent-bar {
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    flex-shrink: 0;
}

.talent-bar-header {
    padding: 4px 6px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.talent-bar-header.player-header {
    color: var(--primary-color);
    border-bottom-color: rgba(0, 242, 255, 0.3);
}

.talent-bar-header.npc-header {
    color: var(--enemy-color);
    border-bottom-color: rgba(255, 46, 77, 0.3);
}

.talent-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    align-items: center;
    padding: 4px;
    min-width: 260px;
}

.talent-icon {
    position: relative;
    width: 34px;
    height: 34px;
    cursor: pointer;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.talent-icon:hover {
    transform: scale(1.2);
    z-index: 100;
}

.talent-icon-wrapper {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(20, 30, 40, 0.9) 0%,
            rgba(10, 15, 25, 0.95) 100%);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.player-talent-bar .talent-icon-wrapper {
    border-color: rgba(0, 242, 255, 0.3);
    box-shadow: 0 0 4px rgba(0, 242, 255, 0.1);
}

.player-talent-bar .talent-icon:hover .talent-icon-wrapper {
    border-color: rgba(0, 242, 255, 0.6);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.3);
}

.npc-talent-bar .talent-icon-wrapper {
    border-color: rgba(255, 46, 77, 0.3);
    box-shadow: 0 0 4px rgba(255, 46, 77, 0.1);
}

.npc-talent-bar .talent-icon:hover .talent-icon-wrapper {
    border-color: rgba(255, 46, 77, 0.6);
    box-shadow: 0 0 10px rgba(255, 46, 77, 0.3);
}

.talent-svg {
    width: 24px;
    height: 24px;
}

/* 移除等级徽章，等级显示在提示框中 */
.talent-level-badge {
    display: none;
}

/* 天赋提示框 */
.talent-tooltip {
    position: fixed;
    width: 260px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(15, 20, 30, 0.98) 0%, rgba(10, 15, 25, 0.99) 100%);
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 9999;
    pointer-events: none;
    backdrop-filter: blur(10px);
}

.talent-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

.player-tooltip {
    border: 1px solid rgba(0, 242, 255, 0.5);
    box-shadow:
        0 0 15px rgba(0, 242, 255, 0.2),
        0 4px 15px rgba(0, 0, 0, 0.6);
}

.npc-tooltip {
    border: 1px solid rgba(255, 46, 77, 0.5);
    box-shadow:
        0 0 15px rgba(255, 46, 77, 0.2),
        0 4px 15px rgba(0, 0, 0, 0.6);
}

.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.tooltip-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.tooltip-center-group {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.tooltip-level-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tooltip-level-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0.7;
}

.player-tooltip .tooltip-level-label {
    color: var(--primary-color);
}

.npc-tooltip .tooltip-level-label {
    color: var(--enemy-color);
}

.tooltip-level-box {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
}

.player-tooltip .tooltip-level-box {
    color: var(--primary-color);
    border: 1px solid rgba(0, 242, 255, 0.3);
}

.npc-tooltip .tooltip-level-box {
    color: var(--enemy-color);
    border: 1px solid rgba(255, 46, 77, 0.3);
}

.tooltip-mult-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tooltip-mult-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0.7;
}

.player-tooltip .tooltip-mult-label {
    color: var(--primary-color);
}

.npc-tooltip .tooltip-mult-label {
    color: var(--enemy-color);
}

.tooltip-mult {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
}

.player-tooltip .tooltip-mult {
    color: var(--primary-color);
    border: 1px solid rgba(0, 242, 255, 0.3);
}

.npc-tooltip .tooltip-mult {
    color: var(--enemy-color);
    border: 1px solid rgba(255, 46, 77, 0.3);
}

.tooltip-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.tooltip-condition {
    font-size: 0.7rem;
    color: #a0a8b0;
    line-height: 1.5;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.tooltip-effect {
    font-size: 0.7rem;
    color: #c0c8d0;
    line-height: 1.5;
    margin-bottom: 8px;
}

.tooltip-priority {
    font-size: 0.7rem;
    color: #c0c8d0;
    line-height: 1.5;
    margin-bottom: 6px;
}

.tooltip-upgrade-progress {
    font-size: 0.65rem;
    color: #666;
    line-height: 1.4;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.tooltip-upgrade-count {
    font-weight: 700;
}

.player-tooltip .tooltip-upgrade-count {
    color: var(--primary-color);
}

.npc-tooltip .tooltip-upgrade-count {
    color: var(--enemy-color);
}

/* 天赋激活高亮效果 */
.talent-icon.talent-active {
    animation: talent-activate 0.4s ease-out;
}

@keyframes talent-activate {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

/* 飘字动画 */
.float-text {
    position: fixed;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 900;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
    animation: float-up 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.float-text.player-float {
    color: var(--primary-color);
    text-shadow: 
        0 0 8px rgba(0, 242, 255, 0.8),
        0 0 15px rgba(0, 242, 255, 0.5);
}

.float-text.npc-float {
    color: var(--enemy-color);
    text-shadow: 
        0 0 8px rgba(255, 46, 77, 0.8),
        0 0 15px rgba(255, 46, 77, 0.5);
}

@keyframes float-up {
    0% {
        transform: translate(-50%, 0) scale(1);
        opacity: 1;
    }
    
    40% {
        transform: translate(-50%, -35px) scale(1.15);
        opacity: 1;
    }
    
    100% {
        transform: translate(-50%, -80px) scale(0.9);
        opacity: 0;
    }
}

/* ========================================
   隐藏天赋样式（需要6个骰子解锁）
   ======================================== */

/* 隐藏天赋图标保持与普通天赋相同的边框颜色 */
/* 三对、双三条、全顺使用与普通天赋相同的边框 */

/* 六条边框也保持与普通天赋一致 */

/* ========================================
   专有名词解释框样式
   ======================================== */

/* 提示框容器：包含主提示框和关键词解释框 */
.talent-tooltip-container {
    position: fixed;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 9999;
    pointer-events: none;
}

.talent-tooltip-container.visible {
    opacity: 1;
    visibility: visible;
}

/* 当tooltip在容器内时，移除其自身的定位和过渡 */
.talent-tooltip-container .talent-tooltip {
    position: relative;
    opacity: 1;
    visibility: visible;
    transition: none;
}

/* 关键词解释框 */
.keyword-tooltip {
    width: 260px;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(20, 25, 35, 0.98) 0%, rgba(15, 20, 30, 0.99) 100%);
    border-radius: 6px;
    backdrop-filter: blur(10px);
}

.player-keyword-tooltip {
    border: 1px solid rgba(0, 242, 255, 0.4);
    box-shadow:
        0 0 12px rgba(0, 242, 255, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.5);
}

.npc-keyword-tooltip {
    border: 1px solid rgba(255, 46, 77, 0.4);
    box-shadow:
        0 0 12px rgba(255, 46, 77, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.5);
}

.keyword-item {
    /* 单个关键词条目 */
}

.keyword-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.player-keyword-tooltip .keyword-name {
    color: var(--primary-color);
}

.npc-keyword-tooltip .keyword-name {
    color: var(--enemy-color);
}

.keyword-desc {
    font-size: 0.68rem;
    color: #b0b8c0;
    line-height: 1.5;
}

/* 效果描述中的关键词高亮 */
.effect-keyword {
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
}

.effect-keyword.keyword-player {
    color: var(--primary-color);
    border-bottom: 1px dashed rgba(0, 242, 255, 0.5);
}

.effect-keyword.keyword-npc {
    color: var(--enemy-color);
    border-bottom: 1px dashed rgba(255, 46, 77, 0.5);
}
