/* CloudArcade Game Leaderboard Plugin Styles */
.game-leaderboard-card {
    background: linear-gradient(145deg, rgba(16, 24, 38, 0.92), rgba(10, 16, 26, 0.88));
    border: 1px solid rgba(212, 173, 97, 0.3);
    border-radius: 16px;
    padding: 18px 16px;
    margin-bottom: 20px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(14px);
    color: #f4ebd3;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-leaderboard-card:hover {
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
    border-color: rgba(232, 198, 124, 0.5);
}

.lb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(212, 173, 97, 0.2);
}

.lb-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lb-icon {
    font-size: 1.25rem;
    color: #e8c67c;
    animation: lb-pulse 2s infinite ease-in-out;
}

@keyframes lb-pulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.15); opacity: 1; }
}

.lb-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #f4ebd3;
    margin: 0;
}

.lb-refresh-btn {
    background: transparent;
    border: none;
    color: #a39982;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
    transition: color 0.2s ease, transform 0.3s ease;
}

.lb-refresh-btn:hover {
    color: #e8c67c;
    transform: rotate(180deg);
}

.lb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 420px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 173, 97, 0.3) transparent;
}

.lb-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s ease, transform 0.15s ease;
}

.lb-item:hover {
    background: rgba(232, 198, 124, 0.08);
    transform: translateX(2px);
}

.lb-item.is-current-user {
    background: rgba(63, 139, 130, 0.25);
    border-color: rgba(63, 139, 130, 0.5);
}

.lb-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.lb-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0b1016;
    background: #3a424e;
    flex-shrink: 0;
}

.lb-badge.rank-1 {
    background: linear-gradient(135deg, #ffe066, #cf9a3a);
    box-shadow: 0 0 10px rgba(232, 198, 124, 0.5);
    color: #1a1204;
}

.lb-badge.rank-2 {
    background: linear-gradient(135deg, #e0e0e0, #9e9e9e);
    box-shadow: 0 0 8px rgba(220, 220, 220, 0.3);
    color: #111;
}

.lb-badge.rank-3 {
    background: linear-gradient(135deg, #e5a96c, #a8652d);
    box-shadow: 0 0 8px rgba(229, 169, 108, 0.3);
    color: #fff;
}

.lb-username {
    font-size: 0.88rem;
    font-weight: 600;
    color: #f4ebd3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-score {
    font-family: monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: #e8c67c;
    white-space: nowrap;
    margin-left: 8px;
}

.lb-empty, .lb-loading {
    text-align: center;
    padding: 20px 10px;
    color: #a39982;
    font-size: 0.85rem;
}

.lb-loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(232, 198, 124, 0.3);
    border-radius: 50%;
    border-top-color: #e8c67c;
    animation: lb-spin 0.8s linear infinite;
    margin-bottom: 6px;
}

@keyframes lb-spin {
    to { transform: rotate(360deg); }
}
