/* Modern Leaderboard Styles */

:root {
    --primary-color: #4a6cff;
    --primary-dark: #3955cc;
    --secondary-color: #f7f8fc;
    --text-color: #333;
    --text-light: #666;
    --border-color: #eee;
    --success-color: #30a14e;
    --warning-color: #ff9800;
    --danger-color: #e91e63;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --radius: 8px;
  }
  
  /* Common Elements */
  .cp-button {
    display: inline-block;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    line-height: 1.5;
  }
  
  .cp-button-primary {
    background-color: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
  }
  
  .cp-button-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
  }
  
  .cp-button-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
  }
  
  .cp-button-outline:hover {
    background-color: rgba(74, 108, 255, 0.1);
    color: var(--primary-dark);
  }
  
  .cp-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    fill: currentColor;
  }
  
  .cp-points-value {
    background: var(--primary-color);
    color: white;
    border-radius: 10px;
    padding: 1px 6px;
    margin-right: 5px;
    font-size: 10px;
    font-weight: bold;
    display: inline-block;
    min-width: 20px;
    text-align: center;
  }
  
  /* Leaderboard Container */
  .cp-leaderboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
  }
  
  /* Profile Section */
  .cp-profile-section {
    background-color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
  }
  
  .cp-profile-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    align-items: center;
  }
  
  @media (max-width: 768px) {
    .cp-profile-grid {
      grid-template-columns: 1fr;
    }
  }
  
  .cp-profile-circle {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
  }
  
  .cp-profile-image {
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    top: 10px;
    left: 10px;
    border: 3px solid white;
    z-index: 2;
  }
  
  .cp-progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 150px;
    height: 150px;
  }
  
  .cp-progress-ring-circle {
    transition: stroke-dashoffset 0.35s;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    stroke: var(--primary-color);
  }
  
  .cp-level-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    border: 3px solid white;
    z-index: 3;
  }
  
  .cp-profile-info {
    text-align: center;
    margin-top: 20px;
  }
  
  .cp-profile-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
  }
  
  .cp-profile-level {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 15px;
    font-size: 18px;
  }
  
  .cp-profile-points {
    font-size: 16px;
    margin-bottom: 15px;
  }
  
  .cp-profile-next-level {
    font-size: 14px;
    color: var(--text-light);
  }
  
  /* Levels Section */
  .cp-levels-section {
    background-color: white;

    padding: 30px;
    margin-bottom: 30px;
  }
  
  .cp-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .cp-levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
  }
  
  .cp-level-card {
    background-color: var(--secondary-color);
    border-radius: var(--radius);
    padding: 15px;
    display: flex;
    align-items: center;
    position: relative;
    transition: all 0.2s ease;
  }
  
  .cp-level-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
  }
  
  
  .cp-level-card.disabled {
    opacity: 0.5;
  }
  
  .cp-level-badge {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 12px;
    font-size: 16px;
  }
  
  .cp-level-info {
    flex: 1;
  }
  
  .cp-level-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 3px;
  }
  
  .cp-level-meta {
    font-size: 12px;
    color: var(--text-light);
  }
  
  .cp-level-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
  }
  
  .cp-level-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px;
    color: var(--text-light);
    transition: color 0.2s ease;
  }
  
  .cp-level-actions button:hover {
    color: var(--primary-color);
  }
  
  .cp-edit-level, .cp-toggle-level {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: var(--text-light);
  }
  
  .cp-edit-level:hover {
    color: var(--primary-color);
  }
  
  .cp-toggle-level.disabled {
    color: var(--text-light);
  }
  
  .cp-toggle-level:not(.disabled) {
    color: var(--success-color);
  }
  
  /* Leaderboard Tabs */
  .cp-leaderboard-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
  }
  
  .cp-leaderboard-tab {
    padding: 10px 20px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-light);
    position: relative;
    transition: color 0.2s ease;
    text-decoration: none;
  }
  
  .cp-leaderboard-tab:hover {
    color: var(--primary-color);
  }
  
  .cp-leaderboard-tab.active {
    color: var(--primary-color);
  }
  
  .cp-leaderboard-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
  }
  
  /* Leaderboard Grid */
  .cp-leaderboards-section {
    background-color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
  }
  
  .cp-leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  @media (max-width: 992px) {
    .cp-leaderboard-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  @media (max-width: 768px) {
    .cp-leaderboard-grid {
      grid-template-columns: 1fr;
    }
  }
  
  .cp-leaderboard-column {
    background-color: var(--secondary-color);
    border-radius: var(--radius);
    padding: 20px;
  }
  
  .cp-leaderboard-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
  }
  
  .cp-user-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
  }
  
  .cp-user-item:last-child {
    border-bottom: none;
  }
  
  .cp-user-rank {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
    font-size: 14px;
  }
  
  .cp-medal {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 10px;
  }
  
  .cp-medal-1 {
    background-color: #ffd700;
  }
  
  .cp-medal-2 {
    background-color: #c0c0c0;
  }
  
  .cp-medal-3 {
    background-color: #cd7f32;
  }
  
  .cp-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 10px;
  }
  
  .cp-user-info {
    flex: 1;
  }
  
  .cp-user-name {
    font-weight: 500;
    margin-bottom: 2px;
    font-size: 14px;
  }
  
  .cp-user-level {
    font-size: 12px;
    color: var(--primary-color);
  }
  
  .cp-user-points {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 14px;
  }
  
  .cp-user-item.current-user {
    background-color: rgba(74, 108, 255, 0.1);
    border-radius: var(--radius);
    padding: 10px;
    margin: 0 -10px;
  }
  
  /* Edit Level Modal */
  .cp-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
  }
  
  .cp-modal-content {
    background-color: white;
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    padding: 20px;
    position: relative;
  }
  
  .cp-modal-header {
    margin-bottom: 20px;
  }
  
  .cp-modal-title {
    font-size: 18px;
    font-weight: 600;
  }
  
  .cp-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-light);
  }
  
  .cp-modal-body {
    margin-bottom: 20px;
  }
  
  .cp-form-group {
    margin-bottom: 15px;
  }
  
  .cp-form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
  }
  
  .cp-form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
  }
  
  .cp-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
  }
  
  .cp-modal-cancel {
    padding: 8px 16px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
  }
  
  .cp-modal-save {
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
  }
  
  /* SVG Icons */
  .cp-level-icons {
    display: none;
  }