.class-balance-page-wrapper {
  background-image: linear-gradient(rgba(10, 12, 16, 0.8), rgba(10, 12, 16, 0.8)), url('../assets/bgs/experimental/v3.jpeg');
}

.cb-container {
  display: flex;
  flex-direction: column;
  max-width: 1500px;
  margin: 0 auto;
  gap: 40px;
  padding: 0 2rem;
  align-items: stretch;
}

.cb-race-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
}

.cb-race-btn {
  font-family: inherit;
  flex-shrink: 0;
  text-decoration: none;
}

.cb-class-tree-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.cb-tree-group {
  display: flex;
  align-items: stretch;
}

@media (max-width: 992px) {
  .cb-tree-group {
    flex-direction: column;
    gap: 10px;
  }
}

.cb-tree-base {
  width: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-bright);
  font-family: var(--font-heading);
  font-weight: bold;
  font-size: 16px;
  position: relative;
  text-align: center;
}

.cb-tree-scroll-wrapper {
  overflow-x: auto;
  padding: 20px 0 40px 0;
  width: 100%;
}

.cb-tree-group-new {
  display: flex;
  align-items: center;
  margin-bottom: 60px;
  width: max-content;
  margin-left: auto;
  margin-right: auto;
}

.cb-tree-children {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-left: 60px;
  position: relative;
}

.cb-tree-children::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 30px;
  height: 1px;
  background: var(--border-color);
}

.cb-tree-branch {
  display: flex;
  align-items: center;
  position: relative;
}

.cb-tree-branch::before {
  content: '';
  position: absolute;
  left: -30px;
  top: 50%;
  width: 30px;
  height: 1px;
  background: var(--border-color);
}

.cb-tree-branch::after {
  content: '';
  position: absolute;
  left: -30px;
  width: 1px;
  background: var(--border-color);
}

.cb-tree-branch:first-child:not(:last-child)::after {
  top: 50%;
  bottom: -10px;
}

.cb-tree-branch:last-child:not(:first-child)::after {
  bottom: 50%;
  top: -10px;
}

.cb-tree-branch:not(:first-child):not(:last-child)::after {
  top: -10px;
  bottom: -10px;
}

.cb-tree-branch:first-child:last-child::after {
  display: none;
}

.cb-tree-root-branch::before,
.cb-tree-root-branch::after {
  display: none !important;
}

.cb-tree-node,
.cb-tree-base {
  position: relative;
}

.cb-tree-base.dl-gold-frame-outer {
  margin: 0 !important;
}

@media (max-width: 992px) {
  .cb-tree-children {
    padding-left: 30px;
    gap: 15px;
  }

  .cb-tree-children::before {
    width: 15px;
  }

  .cb-tree-branch::before {
    width: 15px;
    left: -15px;
  }

  .cb-tree-branch::after {
    left: -15px;
  }

  .cb-tree-branch:first-child:not(:last-child)::after {
    bottom: -7.5px;
  }

  .cb-tree-branch:last-child:not(:first-child)::after {
    top: -7.5px;
  }

  .cb-tree-branch:not(:first-child):not(:last-child)::after {
    top: -7.5px;
    bottom: -7.5px;
  }
}

.cb-tree-node {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 20px;
  border: 1px solid var(--border-color);
  background: rgba(10, 10, 10, 0.7);
  cursor: pointer;
  transition: var(--transition-fast);
  width: 220px;
  flex-shrink: 0;
  border-radius: 4px;
}

.cb-tree-node:hover,
.cb-tree-node.active {
  border-color: var(--gold-main);
  background: rgba(213, 179, 134, 0.1);
}

.cb-tree-node img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

.cb-tree-node span {
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
}

.cb-main {
  width: 100%;
}

.cb-skills-container {
  margin-top: 30px;
}

.cb-category-block {
  margin-bottom: 40px;
}

.cb-category-title {
  font-family: var(--font-heading);
  color: var(--gold-main);
  font-size: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.cb-skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 20px;
}

@media (max-width: 576px) {
  .cb-skill-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 15px;
  }
}

.cb-skill-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: var(--transition-fast);
  cursor: pointer;
}

.cb-skill-item:hover {
  transform: translateY(-3px);
}

.cb-skill-icon-wrapper {
  position: relative;
  width: 64px;
  height: 64px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: var(--transition-fast);
}

.cb-skill-item:hover .cb-skill-icon-wrapper {
  border-color: var(--gold-main);
  box-shadow: 0 0 15px rgba(213, 179, 134, 0.4);
}

.cb-skill-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
}

.cb-skill-name {
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
  transition: var(--transition-fast);
}

.cb-skill-item:hover .cb-skill-name {
  color: var(--white);
}

.cb-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 10px;
  font-weight: bold;
  font-family: var(--font-body);
  padding: 2px 6px;
  border-radius: 3px;
  color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cb-badge-edit {
  background: var(--bg-card);
  border: 1px solid var(--gold-main);
  color: var(--gold-main);
}

.cb-badge-new {
  background: var(--gold-main);
  color: var(--bg-primary);
}

.cb-badge-edit::before {
  content: '✎';
  font-size: 12px;
  line-height: 1;
}

.cb-detail-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.cb-back-link {
  display: inline-flex;
  align-items: center;
  color: var(--gold-main);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 16px;
  margin-bottom: 20px;
  transition: var(--transition-fast);
}

.cb-back-link:hover {
  color: var(--white);
}

.cb-back-link svg {
  margin-right: 8px;
}

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

.cb-detail-icon {
  width: 80px;
  height: 80px;
  border: 2px solid var(--gold-main);
  border-radius: 6px;
  box-shadow: 0 0 20px rgba(213, 179, 134, 0.2);
}

.cb-detail-title-area h1 {
  font-family: var(--font-heading);
  color: var(--white);
  font-size: 36px;
  margin: 0 0 5px 0;
}

.cb-detail-category {
  font-family: var(--font-body);
  color: var(--text-muted);
  font-size: 14px;
}

.cb-level-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.cb-level-btn {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 14px;
  transition: var(--transition-fast);
}

.cb-level-btn:hover {
  border-color: var(--gold-main);
  color: var(--gold-bright);
}

.cb-level-btn.active {
  background: rgba(213, 179, 134, 0.15);
  border-color: var(--gold-main);
  color: var(--gold-main);
}

.cb-comparison-grid {
  display: flex;
  gap: 30px;
  align-items: stretch;
}

@media (max-width: 992px) {
  .cb-comparison-grid {
    flex-direction: column;
  }
}

.cb-col {
  flex: 1;
  background: rgba(12, 14, 18, 0.75);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 30px;
  position: relative;
}

.cb-col-title {
  font-family: var(--font-heading);
  font-size: 20px;
  margin-bottom: 20px;
  text-align: center;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cb-col-original .cb-col-title {
  color: var(--text-muted);
}

.cb-col-changed .cb-col-title {
  color: var(--gold-bright);
}

.cb-info-type {
  font-family: var(--font-body);
  color: var(--gold-main);
  font-size: 14px;
  margin-bottom: 15px;
  font-weight: 600;
}

.cb-info-desc {
  font-family: var(--font-body);
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 25px;
}

.cb-info-stats {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cb-info-stats li {
  font-family: var(--font-body);
  color: var(--gray-light);
  font-size: 14px;
  padding: 8px 12px;
  margin-bottom: 5px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  display: flex;
  align-items: center;
}

.cb-info-stats li::before {
  content: '▸';
  color: var(--gold-main);
  margin-right: 10px;
}

.cb-highlight-diff {
  background: rgba(213, 179, 134, 0.1) !important;
  border-left: 3px solid var(--gold-main);
  color: var(--gold-bright) !important;
}

.cb-info-desc.cb-highlight-diff {
  padding: 10px 15px;
  border-radius: 4px;
}

/* Modal Styles */
.sm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sm-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.sm-content {
  width: 90%;
  max-width: 1200px;
  height: 80vh;
  position: relative;
  display: flex;
  flex-direction: column;
}

.sm-close {
  position: absolute;
  top: 30px;
  right: 35px;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  z-index: 50;
  transition: color 0.2s;
}

.sm-close:hover {
  color: var(--gold-main);
}

.sm-grid {
  display: block;
  flex: 1;
  overflow-y: auto;
}

.sm-col {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
}

.sm-col-original {
  background: transparent;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sm-col-changed {
  background: rgba(255, 255, 255, 0.02);
}

.sm-col-empty {
  background: transparent;
}

.sm-header {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
}

.sm-icon {
  width: 50px;
  height: 50px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-right: 15px;
}

.sm-title-area {
  flex: 1;
}

.sm-title {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  font-family: var(--font-heading);
}

.sm-level {
  color: #8c9bb0;
  font-size: 14px;
  margin-left: 8px;
}

.sm-badge {
  background: #e0b469;
  color: #1a1e26;
  font-size: 10px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
  margin-left: 15px;
}

.sm-stats {
  margin-bottom: 25px;
  background: rgba(12, 14, 18, 0.4);
  padding: 15px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sm-stat-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
}

.sm-stat-item:last-child {
  margin-bottom: 0;
}

.sm-stat-item .stat-key {
  color: #7b86a8;
  min-width: 140px;
}

.sm-stat-item .stat-val {
  color: #e2e8f0;
  font-weight: 500;
}

.sm-stat-item .stat-val.color-mp {
  color: #60a5fa;
}

.sm-stat-item .stat-val.color-time {
  color: #4ade80;
}

.sm-stat-item .stat-val.color-number {
  color: #60a5fa;
}

.stat-changed-highlight {
  position: relative;
}

.stat-changed-highlight .stat-key {
  color: var(--gold-main);
}

.stat-changed-highlight .stat-val {
  color: var(--gold-bright);
  font-weight: 700;
  background: rgba(213, 179, 134, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

.sm-desc {
  color: #fff;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 40px;
}

.sm-levels-title {
  background: #e0b469;
  color: #1a1e26;
  font-size: 12px;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 15px;
  align-self: flex-start;
}

.sm-levels-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.sm-level-row {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
  border-left: 3px solid transparent;
}

.sm-level-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sm-level-row.active {
  background: rgba(255, 255, 255, 0.1);
  border-left-color: #e0b469;
}

.sm-level-row-icon {
  width: 24px;
  height: 24px;
  margin-right: 12px;
  border-radius: 2px;
}

.sm-level-row-name {
  color: #fff;
  font-size: 14px;
  flex: 1;
}

.sm-level-row-badge {
  background: #e0b469;
  color: #1a1e26;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 3px;
}

/* Modal Stage 1 Styles */
.sm-stage-1-content {
  padding-top: 10px;
}

.sm-skill-group {
  margin-bottom: 30px;
}

.sm-group-title {
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--gold-bright);
  background: rgba(12, 14, 18, 0.9);
  border: 1px solid var(--gold-main);
  padding: 8px 15px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.sm-category-block {
  margin-bottom: 25px;
}

.sm-category-subtitle {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--white);
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.sm-skill-grid-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sm-skill-item {
  position: relative;
  width: 44px;
  height: 44px;
  cursor: pointer;
  border-radius: 3px;
  transition: transform 0.2s, box-shadow 0.2s;
  background: rgba(0, 0, 0, 0.5);
}

.sm-skill-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 10px rgba(213, 179, 134, 0.5);
  z-index: 5;
}

.sm-skill-icon-only {
  width: 100%;
  height: 100%;
  border-radius: 3px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: border-color 0.2s;
}

.sm-skill-item:hover .sm-skill-icon-only {
  border-color: var(--gold-main);
}

.sm-badge-overlay {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 9px;
  font-family: var(--font-body);
  font-weight: bold;
  padding: 1px 4px;
  border-radius: 2px;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.sm-badge-edit {
  background: var(--bg-card);
  border: 1px solid var(--gold-main);
  color: var(--gold-main);
  font-size: 11px;
  line-height: 1;
  padding: 2px 4px;
}

.sm-badge-new {
  background: var(--gold-main);
  color: var(--bg-primary);
}

.sm-back-btn {
  background: none;
  border: none;
  color: var(--gold-main);
  font-family: var(--font-heading);
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.sm-back-btn:hover {
  color: var(--gold-bright);
}

/ *   C l a s s   S k i l l s   P a g e   S p e c i f i c   S t y l e s   * /     . p a g e - s k i l l - g r o u p    {
     m a r g i n - b o t t o m :    4 0 p x ;
     
}

     . p a g e - g r o u p - t i t l e    {
     f o n t - f a m i l y :    v a r ( - - f o n t - h e a d i n g ) ;
     c o l o r :    v a r ( - - g o l d - b r i g h t ) ;
     f o n t - s i z e :    1 6 p x ;
     f o n t - w e i g h t :    7 0 0 ;
     p a d d i n g :    1 0 p x   1 5 p x ;
     b o r d e r - l e f t :    3 p x   s o l i d   v a r ( - - g o l d - m a i n ) ;
     b a c k g r o u n d :    r g b a ( 2 1 3 ,    1 7 9 ,    1 3 4 ,    0 . 1 ) ;
     t e x t - t r a n s f o r m :    u p p e r c a s e ;
     m a r g i n - b o t t o m :    2 5 p x ;
     l e t t e r - s p a c i n g :    1 p x ;
     
}

     . p a g e - c a t e g o r y - b l o c k    {
     m a r g i n - b o t t o m :    3 0 p x ;
     m a r g i n - l e f t :    1 5 p x ;
     
}

     . p a g e - c a t e g o r y - s u b t i t l e    {
     f o n t - f a m i l y :    v a r ( - - f o n t - b o d y ) ;
     c o l o r :    v a r ( - - w h i t e ) ;
     f o n t - s i z e :    1 6 p x ;
     f o n t - w e i g h t :    6 0 0 ;
     p a d d i n g - b o t t o m :    8 p x ;
     b o r d e r - b o t t o m :    1 p x   s o l i d   r g b a ( 2 5 5 ,  2 5 5 ,  2 5 5 ,  0 . 0 5 ) ;
     m a r g i n - b o t t o m :    1 5 p x ;
     
}

     . p a g e - s k i l l - g r i d    {
     d i s p l a y :    f l e x ;
     f l e x - w r a p :    w r a p ;
     g a p :    8 p x ;
     
}

     