/**
 * Prestige Tree UI Styles
 */

/* View Toggle */
.skill-tree-view-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  justify-content: center;
}

.view-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 13px;
}

.view-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.view-toggle-btn.active {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.3), rgba(0, 136, 255, 0.2));
  border-color: #00d4ff;
  color: #fff;
}

.view-icon {
  font-size: 14px;
}

/* Canvas View Container */
#skill-tree-canvas-view {
  position: relative;
  width: 100%;
  min-height: 450px;
}

#skill-tree-canvas-view.hidden {
  display: none;
}

/* Canvas Wrapper */
.tree-canvas-wrapper {
  width: 100%;
  height: 450px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(180deg,
    rgba(0, 20, 40, 0.9) 0%,
    rgba(0, 10, 30, 0.95) 100%);
  border: 1px solid rgba(0, 212, 255, 0.2);
  box-shadow:
    inset 0 0 50px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(0, 212, 255, 0.1);
}

#prestige-tree-canvas {
  width: 100%;
  height: 100%;
  cursor: grab;
}

#prestige-tree-canvas:active {
  cursor: grabbing;
}

/* Tree Controls */
.tree-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 10;
}

.tree-control-btn {
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tree-control-btn:hover {
  background: rgba(0, 212, 255, 0.3);
  border-color: #00d4ff;
}

.tree-control-btn:active {
  transform: scale(0.95);
}

/* Tree Legend */
.tree-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-top: 10px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}

.legend-color.production { background: #4caf50; color: #4caf50; }
.legend-color.clicking { background: #ffd700; color: #ffd700; }
.legend-color.prestige { background: #9c27b0; color: #9c27b0; }
.legend-color.automation { background: #00bcd4; color: #00bcd4; }
.legend-color.special { background: #ff6600; color: #ff6600; }

/* Node States */
.tree-node {
  transition: transform 0.2s ease;
}

.tree-node:hover {
  transform: scale(1.1);
}

/* Skill Tree Content Override */
.skill-tree-content {
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
}

/* Hidden List View */
#skill-tree-list-view.hidden {
  display: none;
}

/* Tooltip Styling (rendered on canvas but here for reference) */
.tree-tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(0, 212, 255, 0.5);
  border-radius: 8px;
  padding: 12px;
  max-width: 250px;
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.tree-tooltip-name {
  color: #00d4ff;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 5px;
}

.tree-tooltip-desc {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 8px;
}

.tree-tooltip-cost {
  color: #ffd700;
  font-size: 12px;
}

.tree-tooltip-level {
  color: #4caf50;
  font-size: 11px;
  margin-top: 5px;
}

/* Animation for node purchases */
@keyframes node-purchase-pulse {
  0% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.2); filter: brightness(1.5); }
  100% { transform: scale(1); filter: brightness(1); }
}

/* Mobile/Tablet responsive */
@media (max-width: 768px) {
  .skill-tree-view-toggle {
    flex-direction: column;
    align-items: stretch;
  }

  .view-toggle-btn {
    justify-content: center;
  }

  .tree-canvas-wrapper {
    height: 350px;
  }

  #skill-tree-canvas-view {
    min-height: 350px;
  }

  .tree-controls {
    top: 5px;
    right: 5px;
  }

  .tree-control-btn {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }

  .skill-tree-content {
    max-width: 100%;
    padding: 15px;
  }
}
