.leaderboard-header {
    text-align: center;
    padding: 0 0 40px 0;
    border-bottom: 3px solid #2c2c2c;
    margin-bottom: 40px;
}

.leaderboard-title {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    font-weight: 700;
    color: #2c2c2c;
    margin: 0 0 20px 0;
    position: relative;
}

.leaderboard-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: #d4a574;
}

.leaderboard-subtitle {
    font-family: 'Courier Prime', monospace;
    font-size: 14px;
    color: #8b8b8b;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 30px 0 0 0;
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-button {
    font-family: 'Courier Prime', monospace;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 24px;
    background: #f7f5f0;
    border: 3px solid #2c2c2c;
    color: #2c2c2c;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 #d4a574, 4px 4px 0 3px #2c2c2c;
}

.tab-button.active {
    background: #d4a574;
    color: white;
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 #2c2c2c;
}

.leaderboard-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
}

.leaderboard-item {
    background: #fff;
    border: 3px solid #2c2c2c;
    padding: 25px;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 25px;
}

.leaderboard-item::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border: 2px dashed #d4a574;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.leaderboard-item:hover::before {
    opacity: 1;
}

.leaderboard-item:hover {
    transform: translate(-3px, -3px);
    box-shadow: 6px 6px 0 #d4a574, 6px 6px 0 3px #2c2c2c;
}

.rank-badge {
    width: 50px;
    height: 50px;
    border: 3px solid #2c2c2c;
    background: #f7f5f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    color: #2c2c2c;
    flex-shrink: 0;
    position: relative;
}

.rank-badge span {
    transform: translateY(-2px);
    display: inline-block;
}

.rank-badge.gold {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #2c2c2c;
}

.rank-badge.silver {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #2c2c2c;
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #cd7f32, #daa520);
    color: #2c2c2c;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border: 3px solid #2c2c2c;
    border-radius: 50%;
    background: #d4a574;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c2c2c;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.4);
}

.user-info {
    flex: 0.7;
    min-width: 0;
}

.user-name {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: #2c2c2c;
    margin: 0 0 8px 0;
    cursor: pointer;
    transition: color 0.3s ease;
}

.user-name:hover {
    color: #d4a574;
}

.user-location {
    font-family: 'Courier Prime', monospace;
    font-size: 12px;
    color: #8b8b8b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 5px 0;
}

.member-since {
    font-family: 'Courier Prime', monospace;
    font-size: 11px;
    color: #8b8b8b;
    margin: 0 0 10px 0;
}

/* Redesigned analytics stats - cleaner table-like structure */
.analytics-stats {
    display: flex;
    gap: 8px;
    margin: 0 0 0 0;
    padding: 12px 16px;
    max-width: 400px;
    background: #fafaf8;
    border: 2px solid #e8e6e0;
    border-radius: 4px;
    position:relative;
    overflow-x: auto;
    width: 100%;
    height: 58px;
    align-items: left;
    justify-content: left;
    box-sizing: border-box;
}

.analytics-stats::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border: 1px solid #f0ede6;
    border-radius: 2px;
    pointer-events: none;
}

.analytics-stat {
    font-family: 'Courier Prime', monospace;
    font-size: 9px;
    color: #2c2c2c;
    background: transparent;
    border: none;
    padding: 6px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    min-width: 0;
    border-right: 1px solid #f0ede6;
    white-space: nowrap;
    justify-content: center;
}

.analytics-stat:last-child {
    border-right: none;
}

.analytics-stat-number {
    font-weight: 700;
    color: #d4a574;
    font-size: 10px;
}

.analytics-stat-label {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8b8b8b;
    font-size: 8px;
}

.stats-section {
    display: flex;
    gap: 30px;
    align-items: center;
    flex-shrink: 0;
}

.primary-stat {
    text-align: center;
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 700;
    color: #2c2c2c;
    margin: 0;
    line-height: 1;
}

.stat-label {
    font-family: 'Courier Prime', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8b8b8b;
    margin-top: 5px;
}

.secondary-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    text-align: center;
}

.secondary-stat {
    background: #f7f5f0;
    border: 2px solid #2c2c2c;
    padding: 10px;
    position: relative;
    height: 58px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.secondary-stat::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border: 1px dashed #d4a574;
    pointer-events: none;
}

.secondary-stat .stat-number {
    font-size: 16px;
}

.secondary-stat .stat-label {
    font-size: 9px;
}

.loading-skeleton {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 25px;
    border: 3px solid #e0e0e0;
    background: #f7f5f0;
}

.skeleton-rank {
    width: 50px;
    height: 50px;
    background: #e0e0e0;
    border-radius: 4px;
    animation: skeleton-pulse 1.5s infinite;
}

.skeleton-avatar {
    width: 60px;
    height: 60px;
    background: #e0e0e0;
    border-radius: 50%;
    animation: skeleton-pulse 1.5s infinite;
}

.skeleton-info {
    flex: 1;
}

.skeleton-name {
    width: 200px;
    height: 24px;
    background: #e0e0e0;
    margin-bottom: 8px;
    animation: skeleton-pulse 1.5s infinite;
}

.skeleton-location {
    width: 150px;
    height: 14px;
    background: #e0e0e0;
    margin-bottom: 5px;
    animation: skeleton-pulse 1.5s infinite;
}

.skeleton-date {
    width: 120px;
    height: 12px;
    background: #e0e0e0;
    animation: skeleton-pulse 1.5s infinite;
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #8b8b8b;
}

.empty-state h3 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    margin-bottom: 10px;
    color: #2c2c2c;
}

.empty-state p {
    font-family: 'Courier Prime', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Container for rank and avatar on mobile */
.rank-avatar-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* Improved mobile responsiveness */
@media (max-width: 768px) {
    .leaderboard-title {
        font-size: 36px;
    }
    
    .category-tabs {
        gap: 10px;
        margin-bottom: 30px;
    }
    
    .tab-button {
        font-size: 10px;
        padding: 10px 16px;
    }
    
    .leaderboard-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px 15px;
    }
    
    /* Use the rank-avatar-container for side-by-side layout */
    .rank-avatar-container {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 15px;
    }
    
    /* Stack user info vertically on mobile */
    .user-info {
        width: 100%;
        max-width: 280px;
    }
    
    .user-name {
        font-size: 20px;
    }
    
    /* Keep analytics stats side by side on mobile - made even narrower */
    .analytics-stats {
        gap: 6px;
        padding: 10px 12px;
        max-width: 300px; /* Made narrower for mobile */
        margin: 12px auto 0 auto; /* Center it on mobile */
        height: 50px; /* Adjust height for mobile */
    }
    
    .analytics-stat {
        padding: 5px 8px;
        font-size: 8px;
        flex: 1;
        min-width: 0;
    }
    
    .analytics-stat-number {
        font-size: 9px;
    }
    
    .analytics-stat-label {
        font-size: 7px;
    }
    
    /* Adjust secondary stats to match */
    .secondary-stats {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .secondary-stat {
        height: 50px; /* Match analytics stats height on mobile */
    }
    
    /* Adjust other mobile elements */
    .stats-section {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .rank-badge {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .user-avatar {
        width: 55px;
        height: 55px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .leaderboard-header {
        padding: 40px 0 30px 0;
    }
    
    .leaderboard-title {
        font-size: 28px;
    }
    
    .leaderboard-item {
        padding: 15px 10px;
        gap: 12px;
    }
    
    .user-info {
        max-width: 250px;
    }
    
    .user-name {
        font-size: 18px;
    }
    
    .user-location,
    .member-since {
        font-size: 10px;
    }
    
    /* Even more compact analytics on very small screens - still side by side */
    .analytics-stats {
        max-width: 280px; /* Made even narrower for small screens */
        padding: 8px 10px;
        gap: 4px;
        height: 45px; /* Adjust height for small screens */
    }
    
    .analytics-stat {
        padding: 4px 6px;
        font-size: 7px;
        flex: 1;
        min-width: 0;
    }
    
    .analytics-stat-number {
        font-size: 8px;
    }
    
    .analytics-stat-label {
        font-size: 6px;
    }
    
    /* Match secondary stats */
    .secondary-stats {
        max-width: 280px;
    }
    
    .secondary-stat {
        height: 45px; /* Match analytics stats height on small screens */
    }
    
    .stats-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .secondary-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .rank-badge {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .user-avatar {
        width: 50px;
        height: 50px;
        font-size: 14px;
    }
}

/* ADD THESE STYLES TO YOUR EXISTING leaderboard.css FILE */

.design-mockup {
    width: 60px;
    height: 60px;
    border: 3px solid #2c2c2c;
    background: #f7f5f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.design-mockup img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.design-owner {
    font-family: 'Courier Prime', monospace;
    font-size: 10px;
    color: #8b8b8b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

.owner-link {
    color: #d4a574;
    text-decoration: none;
    font-weight: 700;
}

.owner-link:hover {
    color: #2c2c2c;
}

/* Mobile responsive for design cards */
@media (max-width: 768px) {
    .design-mockup {
        width: 55px;
        height: 55px;
    }
}

@media (max-width: 480px) {
    .design-mockup {
        width: 50px;
        height: 50px;
    }
}

/* Design leaderboard specific styles for three-row layout */
.design-item {
    display: flex;
    align-items: center; /* Changed from flex-start to center for vertical alignment */
    gap: 30px; /* Increased from 20px for more spacing */
    padding: 25px;
    justify-content: space-between; /* Added to spread components evenly */
}

.design-image-small {
    width: 150px;
    height: 150px;
    background: #f7f5f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.design-image-small:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.4);
}

.design-image-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.design-placeholder {
    font-family: 'Courier Prime', monospace;
    font-size: 8px;
    color: #8b8b8b;
    text-align: center;
}

.design-content {
    flex: 2; /* Increased from 1 to take more space */
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

/* Row 1: Title */
.design-title-row {
    width: 100%;
}

.design-title {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: #2c2c2c;
    margin: 0;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1.2;
}

.design-title:hover {
    color: #d4a574;
}

/* Row 2: Designer and Location */
.design-creator-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.design-creator {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    font-weight: 600;
    color: #2c2c2c;
    margin: 0;
}

.design-location {
    font-family: 'Courier Prime', monospace;
    font-size: 11px;
    color: #8b8b8b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.design-date {
    font-family: 'Courier Prime', monospace;
    font-size: 10px;
    color: #8b8b8b;
    margin: 0;
}

/* Row 3: Stats - reuse existing analytics-stats but adjust for design layout */
.design-stats-row {
    width: 100%;
}

.design-stats-row .analytics-stats {
    max-width: 100%;
    margin: 0;
    background: #fafaf8;
    border: 2px solid #e8e6e0;
    border-radius: 4px;
    height: 50px;
}

/* Stats section - ensure it's centered and has proper flex behavior */
.design-item .stats-section {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center align the stats */
    gap: 8px;
    flex-shrink: 0;
    min-width: 120px; /* Give it a minimum width for consistency */
}

.design-item .primary-stat {
    text-align: center;
}

.design-item .secondary-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.design-item .secondary-stat {
    text-align: center;
}

/* Rank badge centering */
.design-item .rank-badge {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile responsiveness for design items */
@media (max-width: 768px) {
    .design-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        align-items: center;
        justify-content: center; /* Center everything in mobile */
    }
    
    .design-image-small {
        width: 120px;
        height: 120px;
        align-self: center;
    }
    
    .design-content {
        width: 100%;
        align-items: center;
        text-align: center;
        flex: 1; /* Reset flex value for mobile */
    }
    
    .design-creator-row {
        justify-content: center;
        text-align: center;
    }
    
    .design-title {
        font-size: 20px;
        text-align: center;
    }
    
    .design-stats-row .analytics-stats {
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .design-item {
        padding: 15px 10px;
        gap: 12px;
    }
    
    .design-image-small {
        width: 120px;
        height: 120px;
    }
    
    .design-title {
        font-size: 18px;
    }
    
    .design-creator-row {
        flex-direction: column;
        gap: 5px;
        align-items: center;
    }
    
    .design-stats-row .analytics-stats {
        max-width: 280px;
        height: 45px;
        padding: 8px 10px;
        gap: 4px;
    }
    
    .design-stats-row .analytics-stat {
        padding: 4px 6px;
        font-size: 7px;
    }
    
    .design-stats-row .analytics-stat-number {
        font-size: 8px;
    }
    
    .design-stats-row .analytics-stat-label {
        font-size: 6px;
    }
}