/* Base Styles */
.nesp-leaderboard {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    margin: 15px auto;
    padding: 16px;
}

.nesp-leaderboard-header {
    background: linear-gradient(90deg,#0d4f80,#0a699f);
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: center;
}

.nesp-leaderboard-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.nesp-lb-actions {
    position: absolute;
    top: 16px;
    right: 16px;
}

.nesp-lb-refresh {
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.nesp-lb-two-cols {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 16px;
}

/* Quick Leaderboard */
.nesp-lb-quick-col {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 12px;
}

.nesp-lb-quick-head {
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 12px;
}

.nesp-lb-quick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.nesp-lb-quick-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #fff;
    border-radius: 6px;
}

.nesp-lb-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: .8rem;
    font-weight: 700;
    background: #e3eaf2;
    color: #1b3d57;
}

.rank-1 .nesp-lb-rank-badge { background: linear-gradient(135deg,#ffdd55,#ffb347); color: #593800; }
.rank-2 .nesp-lb-rank-badge { background: linear-gradient(135deg,#d7dde3,#b5bcc3); color: #2f3740; }
.rank-3 .nesp-lb-rank-badge { background: linear-gradient(135deg,#f7c9a2,#e09b64); color: #613a11; }

.nesp-lb-quick-player {
    font-weight: 600;
}

.nesp-lb-quick-points {
    font-weight: 700;
    color: #1e6ea8;
}

/* Detailed Leaderboard */
.nesp-lb-detailed-col {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 12px;
    overflow-y: auto;
    max-height: 70vh;
}

.nesp-lb-detailed-head, .nesp-lb-detailed-row {
    display: grid;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 6px;
}

.nesp-lb-detailed-head {
    background: #1e6ea8;
    color: #fff;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.nesp-lb-detailed-row {
    background: #fff;
}

.nesp-lb-detailed-player {
    font-weight: 600;
}

.nesp-lb-detailed-total,
.nesp-lb-detailed-loners,
.nesp-lb-round-score {
    font-weight: 700;
    font-size: 1.1em;
}

.nesp-lb-detailed-total {
    color: #1e6ea8;
    text-align: right;
}

.nesp-lb-detailed-loners {
    color: #ffc107;
    text-align: right;
}

/* Zebra Striping */
.nesp-lb-quick-row:nth-child(odd) {
    background: #f0f0f0;
}

.nesp-lb-detailed-row:nth-child(odd) {
    background: #f0f0f0;
}

/* Suit Colors */
.nesp-lb-card-suit--red {
    color: #c4002f;
}

.nesp-lb-card-rank.nesp-lb-card-suit--red {
    color: #c4002f;
}

/* Loner Leader Glow */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 5px rgba(255, 193, 7, 0.4);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 193, 7, 0.8);
    }
    100% {
        box-shadow: 0 0 5px rgba(255, 193, 7, 0.4);
    }
}

.loner-leader {
    animation: pulse-glow 2s infinite;
    border-radius: 6px; /* Ensure the glow follows the border radius */
}

/* Tournament Selector Styles */
.nesp-smart-scoring-container,
.nesp-smart-leaderboard-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.nesp-tournament-header {
    text-align: center;
    margin-bottom: 30px;
}

.nesp-tournament-header h3 {
    color: #1a1a1a;
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.nesp-tournament-header p {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

.nesp-tournament-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.nesp-tournament-card {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nesp-tournament-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.nesp-card-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    z-index: 1;
}

.nesp-gradient-active {
    background: linear-gradient(90deg, #00d4aa, #00c7b7);
}

.nesp-gradient-completed {
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.nesp-card-content {
    padding: 24px;
    position: relative;
    z-index: 2;
}

.nesp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.nesp-tournament-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    flex: 1;
}

.nesp-tournament-date {
    font-size: 0.9rem;
    color: #666;
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 6px;
    margin-left: 12px;
}

.nesp-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

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

.nesp-stat-label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 4px;
}

.nesp-stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
}

.nesp-card-leader {
    background: #f9fafb;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.nesp-leader-label {
    font-size: 0.85rem;
    color: #666;
    margin-right: 8px;
}

.nesp-leader-name {
    font-weight: 600;
    color: #1a1a1a;
}

.nesp-leader-points {
    color: #00d4aa;
    font-weight: 500;
    margin-left: 4px;
}

.nesp-card-actions {
    display: flex;
    gap: 12px;
}

.nesp-score-button {
    flex: 1;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nesp-button-primary {
    background: linear-gradient(135deg, #00d4aa, #00c7b7);
    color: white;
}

.nesp-button-primary:hover {
    background: linear-gradient(135deg, #00c7b7, #00b8aa);
    transform: translateY(-1px);
    color: white;
}

.nesp-button-secondary {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.nesp-button-secondary:hover {
    background: #e5e7eb;
    color: #374151;
    transform: translateY(-1px);
}

.nesp-tournament-card.completed .nesp-button-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.nesp-tournament-card.completed .nesp-button-primary:hover {
    background: linear-gradient(135deg, #5b56f0, #7c3aed);
}

.nesp-no-tournaments {
    text-align: center;
    padding: 40px;
    background: #f9fafb;
    border-radius: 12px;
}

.nesp-no-tournaments p {
    color: #6b7280;
    font-size: 1.1rem;
    margin: 0;
}

.nesp-scoring-interface {
    margin-top: 30px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nesp-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1rem;
}

.nesp-error {
    text-align: center;
    padding: 40px;
    color: #dc2626;
    background: #fef2f2;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .nesp-tournament-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .nesp-tournament-header h3 {
        font-size: 1.6rem;
    }
    
    .nesp-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nesp-tournament-date {
        margin-left: 0;
        margin-top: 8px;
    }
    
    .nesp-card-actions {
        flex-direction: column;
    }
}

/* SCORING INTERFACE STYLES */
.nesp-scoring-app { 
    --nesp-card-size: 84px; 
    --nesp-gap: 8px; 
    max-width: 900px; 
    margin: 0 auto; 
    padding: 12px; 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif; 
}

.nesp-scoring-header { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    margin-bottom: 8px; 
}

.nesp-round-badge { 
    font-weight: 700; 
    font-size: 1.1rem; 
}

.nesp-players-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(var(--nesp-card-size,84px),1fr)); 
    gap: var(--nesp-gap,8px); 
}

.nesp-player-card { 
    background: #fff; 
    border: 1px solid #ddd; 
    border-radius: 8px; 
    padding: 8px; 
    text-align: center; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.04); 
    cursor: pointer; 
    user-select: none; 
    position: relative;
}

.nesp-player-card.scored { 
    opacity: 0.45; 
    transform: scale(.98); 
}

.nesp-card-rank { 
    font-size: 1.1rem; 
    font-weight: 700; 
    display: block; 
}

.nesp-card-suit { 
    font-size: 1rem; 
}

.nesp-player-name { 
    font-size: 0.85rem; 
    color: #666; 
    display: block; 
    margin-top: 4px; 
    font-weight: 500; 
    word-break: break-word; 
}

/* Card colors for red suits */
.nesp-player-card.nesp-card--red .nesp-card-suit,
.nesp-player-card.nesp-card--red .nesp-card-rank {
    color: #d63638;
}

.nesp-player-card.nesp-card--black .nesp-card-suit,
.nesp-player-card.nesp-card--black .nesp-card-rank {
    color: #000;
}

.nesp-card-class {
    font-size: 0.8rem;
    opacity: 0.7;
    display: block;
    margin-bottom: 2px;
}

/* Bottom sheet for score entry */
.nesp-sheet { 
    position: fixed; 
    left: 0; 
    right: 0; 
    bottom: 0; 
    background: #fff; 
    border-top-left-radius: 12px; 
    border-top-right-radius: 12px; 
    box-shadow: 0 -8px 24px rgba(0,0,0,0.12); 
    padding: 12px; 
    transform: translateY(110%); 
    transition: transform .18s ease-out; 
    z-index: 9999; 
}

.nesp-sheet.open { 
    transform: translateY(0); 
}

.nesp-bubbles { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
    justify-content: center; 
    margin-bottom: 8px; 
}

.nesp-bubble { 
    width: 44px; 
    height: 44px; 
    border-radius: 999px; 
    background: #f3f3f3; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: 600; 
    cursor: pointer; 
}

.nesp-bubble.selected { 
    background: #0073aa; 
    color: #fff; 
}

.nesp-actions { 
    display: flex; 
    gap: 8px; 
    justify-content: flex-end; 
    margin-top: 8px; 
}

.nesp-btn { 
    padding: 8px 12px; 
    border-radius: 6px; 
    background: #0073aa; 
    color: #fff; 
    border: none; 
    cursor: pointer; 
}

.nesp-btn.ghost { 
    background: #f3f3f3; 
    color: #111; 
}

.nesp-refresh-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.nesp-toast { 
    position: fixed; 
    left: 50%; 
    transform: translateX(-50%); 
    bottom: 16px; 
    background: #111; 
    color: #fff; 
    padding: 8px 12px; 
    border-radius: 6px; 
    z-index: 10000; 
}

/* Tournament Selector Styles */
.nesp-smart-leaderboard-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #fafafa;
}

.nesp-tournament-header {
    text-align: center;
    margin-bottom: 40px;
}

.nesp-tournament-header h3 {
    color: #1a1a1a;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    background: linear-gradient(135deg, #0d4f80, #0a699f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nesp-tournament-header p {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 400;
}

.nesp-tournament-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.nesp-tournament-card {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0,0,0,0.05);
    min-height: 240px;
}

.nesp-tournament-card:hover,
.nesp-tournament-card.hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    border-color: rgba(13,79,128,0.2);
}

.nesp-tournament-card.active .nesp-card-gradient {
    background: linear-gradient(135deg, 
        rgba(13,79,128,0.9) 0%, 
        rgba(10,105,159,0.8) 50%, 
        rgba(41,128,185,0.7) 100%);
}

.nesp-tournament-card.completed .nesp-card-gradient {
    background: linear-gradient(135deg, 
        rgba(39,174,96,0.9) 0%, 
        rgba(46,204,113,0.8) 50%, 
        rgba(52,152,219,0.7) 100%);
}

.nesp-card-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    z-index: 1;
    transition: height 0.3s ease;
}

.nesp-tournament-card:hover .nesp-card-gradient {
    height: 12px;
}

.nesp-card-content {
    padding: 24px;
    position: relative;
    z-index: 2;
}

.nesp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.nesp-tournament-name {
    color: #1a1a1a;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    flex: 1;
    margin-right: 12px;
}

.nesp-tournament-date {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 4px 10px;
    background: #f5f5f5;
    border-radius: 12px;
    white-space: nowrap;
}

.nesp-card-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 16px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.nesp-stat {
    flex: 1;
    text-align: center;
}

.nesp-stat-label {
    display: block;
    color: #888;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nesp-stat-value {
    display: block;
    color: #1a1a1a;
    font-size: 1.3rem;
    font-weight: 700;
}

.nesp-card-leader {
    margin-bottom: 20px;
    padding: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border-left: 4px solid #0d4f80;
}

.nesp-leader-label {
    color: #666;
    font-size: 0.85rem;
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
}

.nesp-leader-name {
    color: #1a1a1a;
    font-weight: 700;
    font-size: 1.1rem;
    margin-right: 8px;
}

.nesp-leader-points {
    color: #0d4f80;
    font-weight: 600;
    font-size: 0.95rem;
}

.nesp-card-actions {
    text-align: center;
}

.nesp-score-button {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #0d4f80 0%, #0a699f 100%);
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nesp-score-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13,79,128,0.3);
    background: linear-gradient(135deg, #0a699f 0%, #0d4f80 100%);
}

.nesp-no-tournaments {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.nesp-no-tournaments p {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nesp-tournament-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .nesp-tournament-header h3 {
        font-size: 2rem;
    }
    
    .nesp-tournament-header p {
        font-size: 1rem;
    }
    
    .nesp-card-content {
        padding: 20px;
    }
    
    .nesp-card-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .nesp-tournament-name {
        margin-right: 0;
        font-size: 1.2rem;
    }
    
    .nesp-card-stats {
        gap: 12px;
    }
    
    .nesp-stat-value {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .nesp-smart-leaderboard-container {
        padding: 16px;
    }
    
    .nesp-tournament-header {
        margin-bottom: 30px;
    }
    
    .nesp-card-content {
        padding: 16px;
    }
}

/* Tournament Completion Celebration Styles */
.nesp-winners-celebration {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.3);
    border: 2px solid rgba(255, 215, 0, 0.5);
    background: linear-gradient(135deg, #fff9e6 0%, #fff 100%);
    transition: all 0.6s ease;
}

.nesp-winners-celebration .nesp-lb-quick-head span {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.2em;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

/* Winner Row Animation */
.nesp-winner-row {
    animation: winnerGlow 2s ease-in-out infinite alternate;
}

/* Special animations for podium winners */
.nesp-winner-size-1.nesp-winner-row {
    animation: goldWinnerGlow 1.5s ease-in-out infinite alternate;
}

.nesp-winner-size-2.nesp-winner-row {
    animation: silverWinnerGlow 1.8s ease-in-out infinite alternate;
}

.nesp-winner-size-3.nesp-winner-row {
    animation: bronzeWinnerGlow 2.1s ease-in-out infinite alternate;
}

@keyframes goldWinnerGlow {
    0% { 
        background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 237, 78, 0.2));
        box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
        transform: scale(1.15) translateX(0);
    }
    100% { 
        background: linear-gradient(135deg, rgba(255, 215, 0, 0.5), rgba(255, 237, 78, 0.3));
        box-shadow: 0 8px 25px rgba(255, 215, 0, 0.6);
        transform: scale(1.15) translateX(3px);
    }
}

@keyframes silverWinnerGlow {
    0% { 
        background: linear-gradient(135deg, rgba(192, 192, 192, 0.3), rgba(232, 232, 232, 0.2));
        box-shadow: 0 6px 20px rgba(192, 192, 192, 0.4);
        transform: scale(1.12) translateX(0);
    }
    100% { 
        background: linear-gradient(135deg, rgba(192, 192, 192, 0.5), rgba(232, 232, 232, 0.3));
        box-shadow: 0 8px 25px rgba(192, 192, 192, 0.6);
        transform: scale(1.12) translateX(2px);
    }
}

@keyframes bronzeWinnerGlow {
    0% { 
        background: linear-gradient(135deg, rgba(205, 127, 50, 0.3), rgba(218, 165, 32, 0.2));
        box-shadow: 0 6px 20px rgba(205, 127, 50, 0.4);
        transform: scale(1.08) translateX(0);
    }
    100% { 
        background: linear-gradient(135deg, rgba(205, 127, 50, 0.5), rgba(218, 165, 32, 0.3));
        box-shadow: 0 8px 25px rgba(205, 127, 50, 0.6);
        transform: scale(1.08) translateX(1px);
    }
}

@keyframes winnerGlow {
    0% { 
        background: rgba(255, 215, 0, 0.1); 
        transform: translateX(0);
    }
    100% { 
        background: rgba(255, 215, 0, 0.2); 
        transform: translateX(2px);
    }
}

/* Progressive sizing for top 5 winners */
.nesp-winner-size-1 {
    transform: scale(1.15);
    font-weight: 900;
    z-index: 5;
    position: relative;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 237, 78, 0.2));
    border: 2px solid rgba(255, 215, 0, 0.6);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.nesp-winner-size-1 .nesp-lb-rank-badge {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
    font-size: 1.1em;
    font-weight: 900;
    border: 2px solid #ffd700;
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.5);
}

.nesp-winner-size-2 {
    transform: scale(1.12);
    font-weight: 800;
    z-index: 4;
    position: relative;
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.3), rgba(232, 232, 232, 0.2));
    border: 2px solid rgba(192, 192, 192, 0.6);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(192, 192, 192, 0.4);
}

.nesp-winner-size-2 .nesp-lb-rank-badge {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #000;
    font-weight: 800;
    border: 2px solid #c0c0c0;
    box-shadow: 0 3px 10px rgba(192, 192, 192, 0.5);
}

.nesp-winner-size-3 {
    transform: scale(1.08);
    font-weight: 700;
    z-index: 3;
    position: relative;
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.3), rgba(218, 165, 32, 0.2));
    border: 2px solid rgba(205, 127, 50, 0.6);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(205, 127, 50, 0.4);
}

.nesp-winner-size-3 .nesp-lb-rank-badge {
    background: linear-gradient(135deg, #cd7f32, #daa520);
    color: #fff;
    font-weight: 700;
    border: 2px solid #cd7f32;
    box-shadow: 0 3px 10px rgba(205, 127, 50, 0.5);
}

.nesp-winner-size-4 {
    transform: scale(1.05);
    font-weight: 600;
    z-index: 2;
    position: relative;
}

.nesp-winner-size-5 {
    transform: scale(1.03);
    font-weight: 600;
    z-index: 1;
    position: relative;
}

/* Loner Winners Section */
.nesp-loner-winners-section {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border-radius: 12px;
    border: 2px solid rgba(40, 167, 69, 0.3);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.nesp-loner-winners-header {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #28a745, #20c997);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nesp-loner-winners-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nesp-loner-winner-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.nesp-loner-winner-player {
    font-weight: 600;
    color: #1a1a1a;
}

.nesp-loner-winner-count {
    font-weight: 700;
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Responsive adjustments for celebration */
@media (max-width: 768px) {
    .nesp-winners-celebration {
        transform: scale(1.02);
    }
    
    .nesp-winner-size-1 {
        transform: scale(1.08);
    }
    
    .nesp-winner-size-2 {
        transform: scale(1.06);
    }
    
    .nesp-winner-size-3 {
        transform: scale(1.04);
    }
    
    .nesp-winner-size-4,
    .nesp-winner-size-5 {
        transform: scale(1.02);
    }
}

/* Scoring Tournament Selector Styles (separate from leaderboard to avoid conflicts) */
.nesp-scoring-tournament-selector {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #f0f2f5;
}

.nesp-scoring-tournament-header {
    text-align: center;
    margin-bottom: 40px;
}

.nesp-scoring-tournament-header h3 {
    color: #1a1a1a;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nesp-scoring-tournament-header p {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 400;
}

.nesp-scoring-tournament-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.nesp-scoring-tournament-card {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0,0,0,0.05);
    min-height: 220px;
}

.nesp-scoring-tournament-card:hover,
.nesp-scoring-tournament-card.hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    border-color: rgba(231,76,60,0.3);
}

.nesp-scoring-card-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    z-index: 1;
    transition: height 0.3s ease;
    background: linear-gradient(135deg, 
        rgba(231,76,60,0.9) 0%, 
        rgba(192,57,43,0.8) 50%, 
        rgba(155,89,182,0.7) 100%);
}

.nesp-scoring-tournament-card:hover .nesp-scoring-card-gradient {
    height: 12px;
}

.nesp-scoring-card-content {
    padding: 24px;
    position: relative;
    z-index: 2;
}

.nesp-scoring-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.nesp-scoring-tournament-name {
    color: #1a1a1a;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    flex: 1;
    margin-right: 12px;
}

.nesp-scoring-tournament-date {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 4px 10px;
    background: #f8f9fa;
    border-radius: 12px;
    white-space: nowrap;
}

.nesp-scoring-card-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 16px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.nesp-scoring-stat {
    flex: 1;
    text-align: center;
}

.nesp-scoring-stat-label {
    display: block;
    color: #888;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nesp-scoring-stat-value {
    display: block;
    color: #1a1a1a;
    font-size: 1.2rem;
    font-weight: 700;
}

.nesp-scoring-card-actions {
    text-align: center;
}

.nesp-scoring-button {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nesp-scoring-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231,76,60,0.3);
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
}

.nesp-scoring-no-tournaments {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.nesp-scoring-no-tournaments p {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

/* Responsive Design for Scoring Selector */
@media (max-width: 768px) {
    .nesp-scoring-tournament-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .nesp-scoring-tournament-header h3 {
        font-size: 2rem;
    }
    
    .nesp-scoring-tournament-header p {
        font-size: 1rem;
    }
    
    .nesp-scoring-card-content {
        padding: 20px;
    }
    
    .nesp-scoring-card-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .nesp-scoring-tournament-name {
        margin-right: 0;
        font-size: 1.2rem;
    }
    
    .nesp-scoring-card-stats {
        gap: 12px;
    }
    
    .nesp-scoring-stat-value {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .nesp-scoring-tournament-selector {
        padding: 16px;
    }
    
    .nesp-scoring-tournament-header {
        margin-bottom: 30px;
    }
    
    .nesp-scoring-card-content {
        padding: 16px;
    }
}

